Creating process steps or activities
Types of Activities
You can use the following types of activities in a process:
Call Activity
A Call activity element calls another process that refers to a process definition that was previously defined and is available for reuse or application integration. When a process execution arrives in the Call Activity, a new, subexecution is created. This subexecution is then used to execute an instance of the process referred by Call Activity, thereby creating a parallel child execution within a regular process. The main execution waits until the called process is completed, and then the original process continues. Call Activity is used in scenarios such as:
- Application integration, such as Incident application call in a Task Manager application
- Business procedure reuse
- Runtime determination of a process to be invoked, such as Approval Flow, where different approval request are used in different Approval Flows.
User Task
The User Task element models a user performing a task. A record represents the task. The task is considered complete if the completion criteria are satisfied. In addition, you can use a Timer event with the User Task activity. The Timer event interrupts a wait step and allows the process to decide on how to proceed after the wait step times out.
For more information about the Timer event, see Adding-a-Timer-event-to-a-wait-step.
Receive Task
A Receive Task element models a wait step in the process that waits for the arrival of a message. It is typically used with connectors, where the connector initiates an asynchronous request to the integration target. Receive Task waits for the integration target to finish the request and call back. The integration target uses the SignalProcessInstanceCommand to call back the Receive Task and then the process execution continues. The SignalProcessInstanceCommand has a correlation ID that uniquely identifies the Receive Task of a process instance. For more information about SignalProcessInstanceCommand, see "API Documentation" in PDFs-videos-and-API-documentation.
You can use a Timer event with the Receive Task activity. The Timer event interrupts a wait step, allowing the process to make a decision about how to proceed after the wait step times out. For more information about the Timer event, see Adding-a-Timer-event-to-a-wait-step.
The following images illustrate an example of a Receive Task:
Sub-Process
A Sub-Process is an element that contains other activities, gateways, events, and so on, which form a process that is part of another process. A Sub-Process element can only be used inside a parent process and is not reusable. It cannot be invoked by another process using a Call Activity. You can pass a list as an input or output variable to this element. For more information about lists, see Creating-lists-from-processes.
A Sub-Process element is used to enhance process readability, group certain steps to create a logic group and present the user with high-level steps. As Sub-Process is part of the parent process, all expressions configured on these elements continue to work if you move elements to a Sub-Process.
Service Task
A Service Task element is used to invoke a Java service method that is exposed as an Action Type using the @Action annotation. You can create your own Service Task. By using BMC Helix Innovation Studio SDK to create service classes, package the classes in your smart bundle, and annotate methods as Action Type in the service class. The advantage of a Service Task is that you can extend the platform by creating your own service and integrate it seamlessly in BMC Helix Innovation Studio. For more information, see Creating-a-custom-service-in-Java.
To add Activities in processes
- In the Process designer, drag the activity elements to the canvas according to the business logic that you want to create.
- Enter the required properties of the activity element.
- Click Save.
To enable multi-instance loop
A multi-instance loop defines process activity repetition. It allows execution of an activity for each item in a data array. Multi-instance loop is available with Call Activity, User Task, Sub-Process, and Service Task activities.
- In the Process designer, select the activity element for which you want to use Multi instance loop.
In the Properties pane, in the MULTI INSTANCE LOOP section, enter the values for the following properties:
Property
Description
Loop Type
The property that allows executing a certain activity for each item in a given collection, sequentially or in parallel.
Important: If you do not select the Loop Type, multi-instance loop is not enabled on the activity.
Loop Data Input
An expression that represents a collection of items. It refers to an array of data such as list of task records, or a list of approvers.
Input Data Item
A process variable that represents data type of each item. It is assigned with a value from the Loop Data Input array (such as a task record or name of an approver).
You can also provide a list as an input variable to this element. For more information about lists, see Creating-lists-from-processes.
Completion Criteria
(Optional) Property that prevents the process from looping through all data.
A multi-instance activity ends when all instances are finished. However, it is possible to specify an expression that is evaluated every time an instance ends. When this expression evaluates to true, all remaining instances are deleted and the multi-instance activity ends. The process continues thereafter.
For example, in an approval use case, you can use completion condition to define that if 3 out of 5 approvers approve the request, the loop is considered complete.- Click Save.
Multi instance loop example
The following images illustrate a process, where the process fetches a list of records. For each record, it updates the record integer field, and appends the record display ID to a process variable ID. Record handling is done in a Sub-Process, where update record and append IDs steps are performed. In this example, Multi instance loop is defined on the Sub-Process.
The following images show sample configurations of the process variable and the process steps (Get Loop Source Records, Sub Process, Increment Integer Field and Append Display ID) for the above process:
Process steps | Sample configuration |
---|---|
Add Process variable | |
Configure Get Loop Source Records | |
Add Sub-Process | |
Configure Increment Integer Field | |
Add Append Display ID |