Skip to content

Commit a7eecd5

Browse files
committed
Updated process to bpmnDsl.
1 parent 4a2b1ea commit a7eecd5

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

00-documentation/src/docs/bpmnDsl.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,25 @@ object MyProcess extends CompanyBpmnProcessDsl:
9797
)
9898
end MyProcess
9999
```
100+
Next to the _In_ and _Out_ classes we have an _InitIn_ and _InConfig_ class.
101+
102+
### InitIn
103+
Each process has an _InitWorker_ that is the first worker that is called when the process is started.
104+
105+
Use this class to:
106+
- init the _Process Variables_ that are needed in the process (e.g. counters, variables used in expressions that must be defined (Camunda 7 restriction)).
107+
- init the _Process Variables_ with default values, that are not provided by the client.
108+
So you can be sure that they are always set - from Option to required in the process.
109+
110+
### InConfig
111+
These are technical _Process Variables_, like:
112+
- Control the process flow (e.g. timers).
113+
- Mocking of services and sub-processes.
114+
115+
@:callout(info)
116+
The _InitWorker_ will automatically put these variables on the process.
117+
That means you can override them for example in _Postman_.
118+
@:@
100119

101120
## Business Rule Tasks (Decision DMNs)
102121

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

128147
```scala
129148
singleEntry(
130-
decisionDefinitionKey = "singleEntry",
131149
in = Input("A"),
132150
out = 1
133151
)
@@ -139,7 +157,6 @@ This is a single result with more than one value (_domain object_).
139157

140158
```scala
141159
singleResult(
142-
decisionDefinitionKey = "singleResult",
143160
in = Input("A"),
144161
out = ManyOutResult(1, "🤩")
145162
)
@@ -151,7 +168,6 @@ This is a list of _simple values_.
151168

152169
```scala
153170
collectEntries(
154-
decisionDefinitionKey = "collectEntries",
155171
in = Input("A"),
156172
out = Seq(1, 2)
157173
)
@@ -163,7 +179,6 @@ This is a list of _domain objects_.
163179

164180
```scala
165181
resultList(
166-
decisionDefinitionKey = "resultList",
167182
in = Input("A"),
168183
out = List(ManyOutResult(1, "🤩"), ManyOutResult(2, "😂"))
169184
)

build.sbt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,9 @@ lazy val documentation =
6767
// .renderMessages(MessageFilter.None)
6868
,
6969
laikaSite / target := baseDirectory.value / ".." / "docs",
70-
laikaExtensions := Seq(GitHubFlavor, SyntaxHighlighting),
71-
mdocIn := baseDirectory.value / "src" / "main" / "mdoc",
72-
mdocVariables := Map(
73-
"VERSION" -> version.value
74-
)
70+
laikaExtensions := Seq(GitHubFlavor, SyntaxHighlighting)
7571
)
76-
.enablePlugins(LaikaPlugin, MdocPlugin)
72+
.enablePlugins(LaikaPlugin)
7773

7874
// layer 01
7975
lazy val domain = project
@@ -109,10 +105,9 @@ lazy val bpmn = project
109105
.settings(
110106
autoImportSetting,
111107
libraryDependencies ++= Seq(
112-
osLibDependency,
108+
osLibDependency,
113109
chimneyDependency // mapping
114-
)
115-
)
110+
))
116111
.dependsOn(domain)
117112

118113
// layer 03
@@ -150,7 +145,7 @@ lazy val worker = project
150145
.settings(
151146
projectSettings("worker"),
152147
unitTestSettings,
153-
autoImportSetting
148+
autoImportSetting,
154149
)
155150
.dependsOn(bpmn)
156151

0 commit comments

Comments
 (0)