|
1 | 1 | import { Callout } from 'nextra/components'; |
2 | 2 |
|
3 | | -# Process Data |
| 3 | +# Data Objects and Variables |
4 | 4 |
|
5 | | -Process data can be stored in _Variables_. Variables are currently created on the process level within the _Automation_ of the Property panel or directly from within the UserTask Editor. |
6 | | -The specification of a Process Variable is serialized into BPMN. |
| 5 | +For automating processes, the transfer and storing of data is essential. |
| 6 | +In an automated process, data is stored as so-called _"Data Objects"_ or _"Variables"_. |
| 7 | +There are two location where data is stored: in the process instance or in the global Data Store. |
| 8 | +The data inside the global Data Store is independent of one process and is managed inside the Management System. |
| 9 | +Therefore, the definition of this data must not be serialized in the BPMN process. |
| 10 | +So, this page only describes the serialization of process data created within a process instance. |
7 | 11 |
|
8 | | -<Callout type='info'> |
9 | | - The serialization of Process Variables in PROCEED is not yet BPMN conform. There is no `itemDefinition`, `dataObject` |
10 | | - or `ioSpecification` created at design time and this elements are also not considered during execution of the process |
11 | | - at runtime. |
12 | | -</Callout> |
| 12 | +# Process Data Serialization |
| 13 | + |
| 14 | +Process Data Objects can be created in the following ways: |
| 15 | +1. On the _process level_: within the _Automation_ tab of the Property panel there is a table to create Variables |
| 16 | +1. Inside a _UserTask_: for using process data, the UserTask editor offers a direct possibility to create new Variables |
| 17 | +1. Inside a _ScriptTask_: the `variable.XXX` library functions offers functionality to create new Variables |
| 18 | + |
| 19 | +Only for the first two options, it is possible to serialize the variable specification in the BPMN, because there definition happens at process design-time. (The creation within ScriptTask happens at runtime, so the Variables are not serialized in BPMN. But ScriptTasks can also access defined Variables from the process level or UserTask.) |
13 | 20 |
|
14 | 21 | Variables are serializes as follows: |
15 | 22 |
|
@@ -44,19 +51,31 @@ Variables are serializes as follows: |
44 | 51 | ... |
45 | 52 | ``` |
46 | 53 |
|
47 | | -A process variable is accessible within the process level and all of its sub-processes or tasks. |
| 54 | +<Callout type='info'> |
| 55 | + The serialization of Process Variables in PROCEED is not yet BPMN conform. There is no `itemDefinition`, `dataObject` |
| 56 | + or `ioSpecification` created at design time and this elements are also not considered during execution of the process |
| 57 | + at runtime. |
| 58 | +</Callout> |
| 59 | + |
| 60 | +## Runtime behaviour |
48 | 61 |
|
49 | | -During execution, _Activities/Tasks_ usually first **write** into local Task variables. After finishing the Tasks, the Engine writes the local variable states into the global variable states of the process instance. |
50 | | -(_Exception:_ Script Tasks have a function to directly change the state of a global variable.) |
51 | | -If two Activities/Tasks write in parallel to the same global variable, the latest executions wins and overrides the global variable value. |
| 62 | +During runtime, a process variable is accessible within the process level and all of its Sub-Processes, Activities, Tasks, Gateways or Events. |
| 63 | +Tasks usually first copy the process variables into local task variables ([the _local_ scope](../script-task-api)). |
| 64 | +During execution of the Task, this local data can be modified and after finishing the tasks, the local variable states are written back into the process variable states of the process instance. |
| 65 | +(_Exception:_ Script Tasks have functions that can directly change the state of a process variable.) |
| 66 | +If two parallel Tasks write to the same process Variable after the Task finishes, the latest executions wins and overrides the process variable value. |
52 | 67 |
|
| 68 | +{/* |
53 | 69 | This behaviour is a little bit different with a running _call activity_, because it is started as a |
54 | 70 | completely separated process. Therefore, the current process variables are |
55 | 71 | copied into the call activity execution at its start. After its execution, all |
56 | 72 | _changed_ or _new_ variables from the call activity process are copied into the |
57 | 73 | parent process. So, this maybe overrides a process variable at the end of the |
58 | 74 | execution. |
| 75 | +*/} |
59 | 76 |
|
| 77 | +{/* |
60 | 78 | _Advanced:_ Moreover, within PROCEED it can happen that parts of the process are executed on |
61 | 79 | another Machine. When two parts are _merged_ on one Machine, newer variables |
62 | 80 | changes override older values. |
| 81 | +*/} |
0 commit comments