Process Units
Icon
Function
A process contains a series of Process Steps connected in a specific order, used to represent behavior.
"A process describes a sequence or flow of activities in an organization with the objective of carrying out work."
Key Points
Actors
-
The actor of a process depends on where the process object is located within the modeling canvas. For example, if a process is placed on the root canvas, it is executed by the global observer. If it is within an Agent's canvas, it could be executed by the Agent or an observer.
-
Individuals and observers within entities share the same canvas. Whether a specific behavior process belongs to individuals or observers depends on the selection made in the process's properties panel. The system's default icons for Individual and Observer Processes are different, as shown below.
-
Individual Processes
-
Observer Processes
-
Active vs. Passive Processes
- Processes can be classified as active or passive based on the settings of their start events.
- Active processes are triggered by system ticks. They operate independently and do not depend on triggers from other processes.
- Passive processes rely on external triggers from other processes, such as being called, receiving messages, or being triggered by a parent process.
Subprocesses
A passive process can be considered a Process Element that is linked to a parent process, at which point it becomes a subprocess.
Process Triggers
Every process run is triggered by a unique token known as a Trigger. The Trigger will be destroyed after each run.
Calling Passive Processes
- Passive processes can be called by other processes using either the Call or Ask components.
- The distinction between the two lies in the actor. The caller and actor are the same in the' Call' scenario, while they are different in the 'Ask' scenario.
- An entity can directly call its own passive behaviors within its process, but it cannot directly call the behaviors of other entities. However, it can indirectly call other entities' passive behaviors using the 'Ask' component, similar to asking the entity to perform an action.
- Individuals within an entity's population can directly call the behaviors of the observer. However, observers cannot directly call an individual's behaviors and need to use Ask components, as previously mentioned.
Asking is a vital method of interaction between entities. For additional details about asking and other interaction modes, please refer to the Ask and Interactions between Entities chapters.
Concurrency in Passive Processes
- Passive processes can be triggered from multiple points, resulting in concurrent executions. This is known as process concurrency.
- Concurrency Limit: This term denotes the maximum number of triggers concurrently triggering a specific passive process.
The gray process at the top delays execution by two ticks after being called before performing its calculation. This process has a concurrency limit set to 1.
Below are two blue active processes, and they will call the gray process at Tick 1.
Question: At which Tick should the model execution be completed?
Due to the maximum concurrency limit of the called gray process, one of the two active blue processes must wait for the other's calling to complete before it can run. Consequently, the model ultimately completes at Tick 5, not Tick 3. If we remove the concurrency limit on the gray process (setting it to 0 or ≥2), the model would complete at Tick 3.
Process Blocks
-
Process blocks are reusable, predefined process definitions that can be saved in your workspace library as blocks, allowing you to effectively use them in various models.
-
You can create process blocks via multiple methods.
-
When you drag and drop a process block onto the model canvas, it creates an instance of that block. This process is called "instantiation." If needed, a block instance can be converted back to a regular process object through the process of unblocking.
-
Process blocks refer to the definitions of process. They can be stored in the library for future modeling.
-
You can create process blocks by abstracting your process instances. Right-click on any process object on the canvas and select "Blockrize" to save the process as a block in the library. Alternatively, click the "New Block" button to create a new process block. This button can be found under the "Block" tab in the left sidebar of the modeling interface or the "Library" tab in your workspace's file management. For more information, please refer to the Modeling Guide chapter.
-
When a process block is dragged and dropped onto the model canvas, it is called an "instantiation." A block instance can also be unblocked to a process object.
Graphical Modeling Syntax
- Process components are placed on the root canvas to establish global behaviors. When they are placed on an entity's internal canvas, they act as entity behaviors. If they're placed within other processes on the canvas, they serve as subprocesses, which must be passive processes.
- Subprocesses can access the data components of parent processes, while parent processes cannot access subprocess data components. For more information, refer to the Data Components chapter.
- For details, please refer to the Process Interfaces and Data Passing chapter.
How to Use the Process Component in Your Model
Creating the Process
There are several methods to create process objects:
-
Drag and Drop Process Components onto any Canvas
Drag a process component from the component bar to any canvas to create a process. This process will automatically include a start event and an end event.
You can control whether the process objects on the canvas are expanded or collapsed. Open the Style Control Bar to change the display mode.
-
Drag and Drop Process Element Components onto any Canvas, except the Process Internal Canvas
Drag any process step component from the component bar onto any canvas, excluding the process internal canvas, to create a process. This process will automatically include a start event, the element component, and an end event.
If you drag and drop a process element onto a process canvas, it only adds an element object to the process, not creating a subprocess.
-
Drag and Drop Process Blocks onto the Canvas
Drag a process block from the library and drop it onto the canvas to create a process block instance.
-
Copy and Paste Existing Processes onto the Canvas
Right-click on the process you want to duplicate, then select Copy (or Cut) from the menu. Next, go to the target canvas, right-click, and choose Paste. This action will create a duplicate of the original process object.
How to Set Up a Process
To set up a process object, select it on the canvas and use the properties panel on the right, as shown below.
Trigger Type
Active/Passive: This status is an internal setting controlled by the start event and cannot be manually adjusted in the properties panel of the Process. If you need to change the status of the Trigger, you should go to the properties panel of the Start event within the Process.
Concurrency Limit
- You can set a maximum concurrency limit for passive processes; this option is not available for active processes.
- It accepts non-negative integer values. If you set it to 0, there's no limit.
The maximum concurrency limit is a pivotal setting.
- It is typically set to 1 to ensure only one trigger runs at a time.
- If a passive process modifies a global variable and its concurrency limit is set higher than 1, it might lead to unpredictable results when called from multiple locations simultaneously due to random sequencing.
For multiple individuals in an entity population,
- Suppose there is an Agent population of N individuals. If you set the concurrency limit of a behavior belonging to these individuals to 1, calling this behavior for all individuals will initiate N processes at the same time. This is because each agent has its own instance, and each instance strictly adheres to the concurrency limit of 1.
"Belong to" Selection
The behavior of an entity can belong to either individuals or an observer.
Process Block Settings
-
The settings of process block definitions and block instances are similar to those of process objects.
-
The only difference is that block instances also show the source definition, which can be clicked to navigate directly to the definition editing interface.
Style Settings
-
The style settings do not impact the modeling logic.
-
When a process object is selected, a style control bar appears as shown in the image above. The features, from left to right, are as follows:
- Enter full-screen editing mode
- Collapse/Expand (the image above shows the collapsed state).
- Emoji tag
- Color
- Title font size
- Description