Prev | Next |
Initialize Variables and Conditions
For a BPMN simulation model, you can initialize your variables in an Execution Analyzer script. You can also initialize these variables in the Tagged Values of the first Activity element of the process, which gives you greater flexibility in adding and changing variables as the simulation proceeds. Similarly, you can define the conditions and values to apply at the various decision points (Gateways) in the process, in the Tagged Values of the Sequence Flow connectors.
If you want to incorporate a user-interface into your simulation process, using Win32, you again use Tagged Values to identify the dialog or prompt to display, in the Activity element just prior to the point at which the value or decision is processed.
For the simulation of UML diagrams, variables inside the 'sim' object and 'this' object are displayed in the Local Variables window.
Access
Display the 'Tags' tab of the Properties window, using one of the methods outlined here.
Ribbon |
Explore > Portals > Windows > Properties > Properties > Tags |
Keyboard Shortcuts |
Properties window > 'Tags' tab of the |
Initialize Variables
- On the diagram, click on the first Activity element in the process.
- In the 'Tags' tab of the Properties window, click on the drop-down arrow of the taskType 'value' field, and select 'Script'.
- In the script 'value' field, type in the appropriate JavaScript code, such as:
sim.loan=true; sim.status="undefined';
Define Conditions
- On the diagram, click on a Sequence Flow connector that issues from a Gateway element.
- In the 'Tags' tab of the Properties window, click on the drop-down arrow of the conditionType 'Value' field, and select 'Expression'.
- In the conditionExpression 'Value' field (<memo>*) click on the button to display the Tagged Value Note window. Type in the appropriate JavaScript code, such as:
sim.status=="Hold" - Click on the . The statement text displays as a label of the connector.
Incorporate Win32 User Interface
- On the diagram, click on the Activity element that represents where the decision is made.
- In the 'Tags' tab of the Properties window, click on the drop-down arrow of the 'taskType value' field, and select 'Script'.
- In the 'script value' field, type in the appropriate JavaScript code, such as:
dialog.Screen1.Show=True;
(This statement displays the dialog Screen1. You can temporarily hide the dialog by changing 'Show' to False.)