Help ELMA BPM Platform
×
Menu

Activity Markers


Markers show that activities have additional execution parameters. There are several types of activity markers in ELMA BPM:
You can use markers for the following operations:
The list of the available markers depends on the activity type:
Click the Change Marker button to select one of the available markers; a new corresponding tab will appear in the activity settings window.
Fig. 1. The Change Marker button and the marker selecting window.

Conditional Operation

When you select this marker, the Execution Condition tab appears in the settings window.
Execution Condition tab
A condition for executing an activity can be set as a table with one or several conditions (fig. 2) or as a script (fig. 3).
Setting a Condition as a Table
You can sequentially add one or several conditions in a table and specify the comparison operator. The conditions will be checked and if the result is "True", the activity will be started; otherwise, ELMA skips the activity and the process continues using the default sequence flow.
In each condition, a context variable is compared with another context variable or with the specified values.
Fig. 2. The Execution Condition tab. Table.
- Add a condition. - Delete a condition.
A Link is an operation used to calculate the result of the condition check:
You can specify a link if you enter more then one condition.
Attention!
In the table the AND, NAND links have priority over the OR, NOR links. For example, Condition1 OR Condition2 AND Conditions3 NOR Condition4 NAND Condition5 = Condition1 OR (Condition2 And Condition3) NOR (Condition4 NAND Condition5).
To select operands, operations and a link, click the respective links in the table.
Setting a Condition as a Script
Select a script in the drop-down list. A script is a function written in C#. You can either select an existing script from the drop-down list or create a new one by clicking the cross icon . The script must return the Boolean value (data type C# bool, “true” or “false” values).
If you click the Go to button you will be redirected to the script page on the Script tab. This tab provides tools for writing scripts in C#, for example, syntax highlighting, code completion (IntelliSense technology), links to assemblies and web services.
Fig. 3. The Execution Condition tab. Script.

Loop

When you select this marker, the Loop Execution Condition tab appears in the settings window.
Loop Execution Condition
In the Do-While Check Time specify whether the condition is checked before or after the operation. Suppose the condition is not true when the process flow reaches the operation. The system will still perform it, if you specify to check the condition after the operation. If the condition is checked before the operation and it is not true, the system will not execute it.
You can specify conditions as a table or as a script, in the same manner as described earlier in the Conditional Operation section.
The operation will loop while certain condition is true. If the condition is not true, the process continues.
Fig. 4. The Loop Execution Condition tab.

Multiple Execution

This marker is available only for External Sub-Processes (fig. 5).
You can use this marker if you need to simultaneously start multiple instances of a sub-process. The system executes these instances independently of the parent process while still executing the parent process in accordance with the model.
In most cases, the Multiple Execution marker is used when a user needs to start a sub-process instance and still be able to work without suspending the parent process.
When you select this marker, the Multiple Execution tab appears in the settings window.
Multiple Execution Tab
On this tab, specify the required number of the sub-process instances. You can specify an exact value (fig. 5) or a context variable that will store the number of the sub-process instances (fig. 6).
Fig. 5. The Multiple Execution tab. The exact number of the sub processes.
A context variable is an integer type variable. The variable value must be defined by a script or by a user, before the process reaches this activity.
The Add Variable button allows you to create a context variable of the integer type that will store the number of the sub-process instances.
Fig. 6. The Multiple Execution tab. Specifying a context variable that will store the number of sub-process instances.
Example
Usually you need to start multiple external sub-processes with different context variable values. The example will graphically represent a situation where the same task will be assigned to multiple users. For this, define the initiator, executors and their number. As different users can initiate a process, a dynamic swimlane is used to represent them in the graphic model (fig. 7); a script will define the number of executors. Each new sub-process will be started in turns for each executor.
Fig. 7. The Multiple Execution tab. Configuring the dynamic swimlane settings in the parent process.
As a result, you get the following context variables of the parent process necessary to start multiple sub-processes:
Along with necessary variables, we define additional variables used in the sub-process:
According to the process logic, the Initiator must enter the name and the text of the task and make a list of executors. Therefore, in the swimlane that represents the Initiator place the task Assign the task and select executors. Configure the task form so that it displays fields for the specified context variables (fig. 8).
Fig. 8. Multiple Execution marker. Configuring the task “Assign the task and select executors”.
After the Initiator has filled in the required fields (the task name, task text and executors list), the system must calculate the number of executors in the list. To count the list items, a Scrip activity is used:
context.NumberOfExecutors = context.ListOfExecutors.Count;
An XOR Gateway is used to split the flow in two outgoing paths:
Fig. 9. Multiple Execution marker. Configuring the connector towards the multiple sub-processes.
Now it is necessary to write a script that describes the selection of the executor and starts the sub-process. In the script, the value of the last list item must be assigned to the Task Executor variable; the number of list items (stored in the Number of Executors variable) must be decremented by 1:
сontext.NumberOfExecutors = context. NumberOfExecutors - 1;
context.TaskExecutor = context.ListOfExecutors.ToArray()[(int)context.NumberOfExecutors].Executor;
Please note that the counter will be first reduced by one, and only then its value can be used as an array element number. It is done because array elements in C# are numbered from 0, so the first element in an array has the index 0, while the last element has an index equal to one less than the number of items in the array.
Now it is time to pass the configured context variables in the external sub-process. To do this, place the External sub-process activity in the graphic model and select the required sub-process from the list of processes. The context of this sub-process must contain the following variables:
These variables must be marked as input values (fig. 10).
Fig. 10. Multiple Execution marker. Configuring the sub-processes context.
Configure the input variables for the External Sub-Process activity with the Multiple Execution Marker (fig. 11). In the example, the activity name is Multi-Instance Subprocess.
<>
Fig. 11. Multiple Execution marker. Configuring the Multi-Instance Subprocess settings .
After the sub-process is started, the parent process must return to the XOR gateway to check the number of executors in the list. Here is the parent process model (fig. 12) .
Fig. 12. Multiple Execution marker. The graphic model of the parent process.

Copyright © 2006–2019 ELMA