Skip to content

Commit

Permalink
Updated process to bpmnDsl.
Browse files Browse the repository at this point in the history
  • Loading branch information
pme123 committed Dec 6, 2024
1 parent 4a2b1ea commit a7eecd5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
23 changes: 19 additions & 4 deletions 00-documentation/src/docs/bpmnDsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@ object MyProcess extends CompanyBpmnProcessDsl:
)
end MyProcess
```
Next to the _In_ and _Out_ classes we have an _InitIn_ and _InConfig_ class.

### InitIn
Each process has an _InitWorker_ that is the first worker that is called when the process is started.

Use this class to:
- init the _Process Variables_ that are needed in the process (e.g. counters, variables used in expressions that must be defined (Camunda 7 restriction)).
- init the _Process Variables_ with default values, that are not provided by the client.
So you can be sure that they are always set - from Option to required in the process.

### InConfig
These are technical _Process Variables_, like:
- Control the process flow (e.g. timers).
- Mocking of services and sub-processes.

@:callout(info)
The _InitWorker_ will automatically put these variables on the process.
That means you can override them for example in _Postman_.
@:@

## Business Rule Tasks (Decision DMNs)

Expand Down Expand Up @@ -127,7 +146,6 @@ This is a single result with one _simple value_.

```scala
singleEntry(
decisionDefinitionKey = "singleEntry",
in = Input("A"),
out = 1
)
Expand All @@ -139,7 +157,6 @@ This is a single result with more than one value (_domain object_).

```scala
singleResult(
decisionDefinitionKey = "singleResult",
in = Input("A"),
out = ManyOutResult(1, "🤩")
)
Expand All @@ -151,7 +168,6 @@ This is a list of _simple values_.

```scala
collectEntries(
decisionDefinitionKey = "collectEntries",
in = Input("A"),
out = Seq(1, 2)
)
Expand All @@ -163,7 +179,6 @@ This is a list of _domain objects_.

```scala
resultList(
decisionDefinitionKey = "resultList",
in = Input("A"),
out = List(ManyOutResult(1, "🤩"), ManyOutResult(2, "😂"))
)
Expand Down
15 changes: 5 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,9 @@ lazy val documentation =
// .renderMessages(MessageFilter.None)
,
laikaSite / target := baseDirectory.value / ".." / "docs",
laikaExtensions := Seq(GitHubFlavor, SyntaxHighlighting),
mdocIn := baseDirectory.value / "src" / "main" / "mdoc",
mdocVariables := Map(
"VERSION" -> version.value
)
laikaExtensions := Seq(GitHubFlavor, SyntaxHighlighting)
)
.enablePlugins(LaikaPlugin, MdocPlugin)
.enablePlugins(LaikaPlugin)

// layer 01
lazy val domain = project
Expand Down Expand Up @@ -109,10 +105,9 @@ lazy val bpmn = project
.settings(
autoImportSetting,
libraryDependencies ++= Seq(
osLibDependency,
osLibDependency,
chimneyDependency // mapping
)
)
))
.dependsOn(domain)

// layer 03
Expand Down Expand Up @@ -150,7 +145,7 @@ lazy val worker = project
.settings(
projectSettings("worker"),
unitTestSettings,
autoImportSetting
autoImportSetting,
)
.dependsOn(bpmn)

Expand Down

0 comments on commit a7eecd5

Please sign in to comment.