You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subprocesses can be divided into _embedded_ subprocesses and _call activities_.
1
+
# Subprocesses and Call Activities
2
+
3
+
In BPMN, subprocesses can be divided into _embedded_ subprocesses and _call activities_.
2
4
The former are usual processes enclosed inside the parent process and don't live by its own.
3
5
Embedded subprocesses are mainly used to reduce the visual complexity of a process.
4
6
Therefore, they can be in an expanded and in a collapsed (with a plus symbol) state.
@@ -20,7 +22,7 @@ In both cases, the semantic part is contained in the parent process.
20
22
21
23
In the PROCEED MS it is not possible to convert a collapsed subprocess into an expanded one, because this would interfere with the graphical layout of the remaining process and would maybe shift or overlap some other elements.
@@ -53,19 +55,10 @@ In the PROCEED MS it is not possible to convert a collapsed subprocess into an e
53
55
## Call Activities
54
56
55
57
A call activity references another process, so that one process can be reused in multiple other processes.
56
-
Currently the PROCEED MS can store processes private (in the users browser storage) and publicly (on the server).
57
-
Other processes can only be selected as call activity if the referenced process is public.
58
-
59
-
Reason why only public processes can be selected for call activities...
60
-
61
-
- if a process is public which references private processes as call activities, other users can't open them and would be confused
62
-
- only public processes can be deployed, so we would need to check if every call activity is available on the server
63
-
- an option would be to allow private processes reference other private processes, and if the parent process is made public then also transform all referenced processes
64
-
- public and private processes are only an intermediate solution until the user mgmt exists
65
58
66
59
The following code shows how call activities are serialized:
<callActivityid="Task_0ul33bj"name="Call the global process"calledElement="p33c24:Process_1wqd8fv">
83
-
...
84
76
</callActivity>
85
77
...
86
78
</process>
87
79
</definitions>
88
80
```
89
81
90
-
- the imported process is not contained within the same BPMN file (not within `<definitions>`, this would be another option)
82
+
- the imported process is not contained within the same BPMN file (not within `<definitions>`)
91
83
- the `import` element can occur multiple times for multiple processes, but always as the first child element of `definitions` (not after `<process>`)
92
84
- the `import` attribute `namespace` is the `targetNamespace` of the imported process
93
-
-a prefix is defined for the namespace of the imported process
94
-
- the `import` attribute `location`is the `definitions id` of the imported BPMN file
85
+
-the _prefix_`p33c24`is defined for the namespace of the imported process on top in `definitions`
86
+
- the `import` attribute `location`contains the `id` and `processVersionId` separated by a colon of the `definitions` element of the imported BPMN file
95
87
- the `import` attribute `importType` indicates that the imported file is a BPMN file (static value)
96
-
- the `callActivity` attribute `calledElement` links to the process `id` of the imported process
88
+
- the `callActivity` attribute `calledElement` links to the `id` of `process` of the imported process
@@ -115,7 +114,13 @@ The following code shows how call activities are serialized:
115
114
</definitions>
116
115
```
117
116
118
-
#### Data transfer to and from Call Activities
117
+
### Why don't we use another `<process>` element inside `<definitions>`?
118
+
119
+
- before deployment we would have to copy the other process and its graphical model into the `<definitions>` element; after an import we would have to split it again into two processes
120
+
- problem: if we want to start a process, the executor has to select one process of all the available processes inside `<definitions>`. There is no standard way to say which one of all processes is the main one
121
+
- we could use the `executable` or `processType` attribute, but this would somehow change the original semantics
122
+
123
+
### Data transfer to and from Call Activities
119
124
120
125
_Attention: this is not BPMN standard conform yet_
121
126
@@ -127,48 +132,14 @@ This may results in a set of updated/overwritten variables, but it can also cont
127
132
128
133
Note that changes to variables, which are performed in the main process in parallel to the call activity execution, do not affect the variables of the latter during its runtime (there is no variable synchonization between a call activity and parallel activities). Depending on which of the parallel activities ends last, the existing variables are overwritten.
129
134
130
-
#### What is currently done at the Management System to link a Call Activity
135
+
###Deployment and Executionof Call Activities
131
136
132
-
- at _design time_: if the link to the global process is created, the modeler does the following:
137
+
If a process with Call Activities is deployed to a Process Engine, the MS does the following steps:
133
138
134
-
1. sets the `namespace` and adds a XML prefix to `definitions` ((`p+(last 5 chars from the imported namespace)`) )
135
-
2. sets the `location`: just the name of the BPMN file (not the folder)
136
-
3. sets `calledElement`
137
-
4. checks if the imported process has exactly one non-typed starting event
138
-
5. checks for cyclic references, if other call activities exists in the referenced process
139
-
140
-
- at _deployment time_:
141
-
142
-
- checks if there is `<import>` inside definitions
143
-
- deploys all imported processes and recursive processes to a sub-endpoint under `/imported/{processName}`
144
-
- deploys all user tasks of imported processes and recursive processes to a sub-endpoint under `/imported/user-tasks/{html-file}`
145
-
- checks for cyclic references, if other call activities exists in the referenced process
146
-
147
-
- at _execution time_:
148
-
- the referenced process is started with the non-typed start event
149
-
150
-
**Why don't we use another `<process>` element inside `<definitions>`?**
151
-
152
-
- before deployment we would have to copy the other process and its graphical model into the `<definitions>` element; after an import we would have to split it again into two processes
153
-
- problem: if we want to start a process, the executor has to select one process of all the available processes inside `<definitions>`. There is no standard way to say which one of all processes is the main one
154
-
- we could use the `executable` or `processType` attribute, but this would somehow change the original semantics
155
-
156
-
## Exporting Sub Processes
157
-
158
-
If a process is exported that contains call activities (other referenced processes), the folder structure of the zip file is as follows:
159
-
160
-
```
161
-
/PROCEED-Processes_BPMN.zip
162
-
- {Process-Name_ABC}/
163
-
--- {Process-Name_ABC}.bpmn
164
-
--- User-Tasks/
165
-
----- {User_Task-Name}.html
166
-
----- {User_Task-Name}.html
167
-
- {Process-Name_XYZ}/
168
-
--- {Process-Name_XYZ}.bpmn
169
-
--- User-Tasks/
170
-
----- {User_Task-Name}.html
171
-
----- {User_Task-Name}.html
172
-
```
139
+
- checks if there are `<import>` elements after `definitions`
140
+
- checks if the imported process has at least one non-typed starting event
141
+
- checks for cyclic references, if other call activities exists in the referenced process and they are not building a loop
142
+
- deploys all imported processes and recursive processes to a sub-endpoint under `/imported/{processName}`
143
+
- deploys all user tasks of imported processes and recursive processes to a sub-endpoint under `/imported/user-tasks/{html-file}`
173
144
174
-
Every process is exported with its own folder and its own user tasks.
145
+
At _execution time_: The referenced processes are started with all the non-typed start events
0 commit comments