Chapter 29. Process instance management
To view process instances, in Business Central, click Menu
Figure 29.1. Process instance tab view
- Instance Details: Provides an overview about what is going on inside the process. It displays the current state of the instance and the current activity that is being executed.
- Process Variables: Displays all of the process variables that are being manipulated by the instance, with the exception of the variables that contain documents. You can edit the process variable value and view its history.
- Documents: Displays process documents if the process contains a variable of the type org.jbpm.Document. This enables access, download, and manipulation of the attached documents.
- Logs: Displays process instance logs for the end users. For more information, see Interacting with processes and tasks.
- Diagram: Tracks the progress of the process instance through the BPMN2 diagram. The node or nodes of the process flow that are in progress are highlighted in red. Reusable sub-processes appear collapsed within the parent process. Double-click on the reusable sub-process node to open its diagram from the parent process diagram.
For information on user credentials and conditions to be met to access KIE Server runtime data, see Planning a Red Hat Process Automation Manager installation.
29.1. Process instance filtering
For process instances in Menu
Procedure
-
In Business Central, go to Menu
Manage Process Instances. On the Manage Process Instances page, click the Filters icon on the left of the page to select the filters that you want to use:
- State: Filter process instances based on their state (Active, Aborted, Completed, Pending, and Suspended).
- Errors: Filter process instances that contain at least one or no errors.
Filter By: Filter process instances based on the following attributes:
Id: Filter by process instance ID.
Input:
Numeric
Initiator: Filter by the user ID of the process instance initiator.
The user ID is a unique value, and depends on the ID management system.
Input:
String
Correlation key: Filter by correlation key.
Input:
String
Description: Filter by process instance description.
Input:
String
- Name: Filter process instances based on process definition name.
- Definition ID: The ID of the instance definition.
- Deployment ID: The ID of the instance deployment.
- SLA Compliance: SLA compliance status (Aborted, Met, N/A, Pending, and Violated).
- Parent Process ID: The ID of the parent process.
- Start Date: Filter process instances based on their creation date.
- Last update: Filter process instances based on their last modified date.
You can also use the Advanced Filters option to create custom filters in Business Central.
29.2. Creating a custom process instance list
You can view the list of all the running process instances in Menu
Prerequisites
- A project with a process definition has been deployed in Business Central.
Procedure
-
In Business Central, go to Menu
Manage Process Instances. - In the Manage Process Instances page, click the advanced filters icon on the left to open the list of process instance Advanced Filters options.
- In the Advanced Filters panel, enter the name and description of the filter that you want to use for your custom process instance list, and click Add New.
From the list of filter values, select the parameters and values to configure the custom process instance list, and click Save.
A new filter is created and immediately applied to the process instances list. The filter is also saved in the Saved Filters list. You can access saved filters by clicking the star icon on the left side of the Manage Process Instances page.
29.3. Managing process instances using a default filter
You can set a process instance filter as a default filter using the Saved Filter option in Business Central. A default filter will be executed every time when the page is open by the user.
Procedure
-
In Business Central, go to Menu
Manage Process Instances. On the Manage Process Instances page, click the star icon on the left of the page to expand the Saved Filters panel.
In the Saved Filters panel, you can view the saved advanced filters.
Default filter selection for Process Instances
- In the Saved Filters panel, set a saved process instance filter as the default filter.
29.4. Viewing process instance variables using basic filters
Business Central provides basic filters to view process instance variables. You can view the process instance variables of the process as columns using Show/hide columns.
Procedure
-
In Business Central, go to Menu
Manage Process Instances. - On the Manage Process Instances page, click the filter icon on the left of the page to expand the Filters panel.
In the Filters panel, select the Definition Id and select a definition ID from the list.
The filter is applied to the current process instance list.
- Click columns icon (to the right of Bulk Actions) in the upper-right of the screen to display or hide columns in the process instances table.
Click the star icon to open the Saved Filters panel.
In the Saved Filters panel, you can view all the saved advanced filters.
29.5. Viewing process instance variables using advanced filters
You can use the Advanced Filters option in Business Central to view process instance variables. When you create a filter over the column processId
, you can view the process instance variables of the process as columns using Show/hide columns.
Procedure
-
In Business Central, go to Menu
Manage Process Instances. - On the Manage Process Instances page, click the advanced filters icon to expand the Advanced Filters panel.
- In the Advanced Filters panel, enter the name and description of the filter, and click Add New.
-
From the Select column list, select the
processId
attribute. The value will change to processId != value1. - From the Select column list, select equals to for the query.
- In the text field, enter the name of the process id.
- Click Save and the filter is applied on the current process instance list.
- Click the columns icon (to the right of Bulk Actions) in the upper-right of the process instances list and the process instance variables of the specified process ID will be displayed.
Click the star icon to open the Saved Filters panel.
In the Saved Filters panel, you can view all the saved advanced filters.
29.6. Aborting a process instance using Business Central
If a process instance becomes obsolete, you can abort the process instance in Business Central.
Procedure
-
In Business Central, go to Menu
Manage Process Instances to view the list of available process instances. - Select the process instance you want to abort from the list.
- In the process details page, click the Abort button in the upper-right corner.
29.7. Signaling process instances from Business Central
You can signal a process instance from Business Central.
Prerequisites
- A project with a process definition has been deployed in Business Central.
Procedure
-
In Business Central, go to Menu
Manage Process Instances. - Locate the required process instance, click the button and select Signal from the drop-down menu.
Fill the following fields:
Signal Name: Corresponds to the
SignalRef
orMessageRef
attributes of the signal. This field is required.NoteYou can also send a
Message
event to the process by adding theMessage-
prefix in front of theMessageRef
value.- Signal Data: Corresponds to data accompanying the signal. This field is optional.
When using the Business Central user interface, you can only signal Signal intermediate catch events.
29.8. Asynchronous signal events
When several process instances from different process definitions are waiting for the same signal, they are executed sequentially in the same thread. But, if one of those process instances throws a runtime exception, all the other process instances are affected and usually result in a rolled back transaction. To avoid this situation, Red Hat Process Automation Manager supports using asynchronous signals events for:
- Throwing intermediate signal events
- End events
29.8.1. Configuring asynchronous signals for intermediate events
Intermediate events drive the flow of a business process. Intermediate events are used to either catch or throw an event during the execution of the business process. An intermediate event handles a particular situation that occurs during process execution. A throwing signal intermediate event produces a signal object based on the defined properties.
You can configure an asynchronous signal for intermediate events in Business Central.
Prerequisites
- You have created a project in Business Central and it contains at least one business process asset.
- A project with a process definition has been deployed in Business Central.
Procedure
- Open a business process asset.
- In the process designer canvas, drag and drop the Intermediate Signal from the left toolbar.
- In the upper-right corner, click to open the Properties panel.
- Expand Data Assignments.
- Click the box under the Assignments sub-section. The Task Data I/O dialog box opens.
- Click Add next to Data Inputs and Assignments.
- Enter a name of the throw event as async in the Name field.
- Leave the Data Type and Source fields blank.
- Click OK.
It will automatically set the executor service on each session. This ensures that each process instance is signaled in a different transaction.
29.8.2. Configuring asynchronous signals for end events
End events indicate the completion of a business process. All end events, with the exception of the none and terminate end events, are throw events. A throwing signal end event is used to finish a process or sub-process flow. When the execution flow enters the element, the execution flow finishes and produces a signal identified by its SignalRef
property.
You can configure an asynchronous signal for end events in Business Central.
Prerequisites
- You have created a project in Business Central and it contains at least one business process asset.
- A project with a process definition has been deployed in Business Central.
Procedure
- Open a business process asset.
- In the process designer canvas, drag and drop the End Signal from the left toolbar.
- In the upper-right corner, click to open the Properties panel.
- Expand Data Assignments.
- Click the box under the Assignments sub-section. The Task Data I/O dialog box opens.
- Click Add next to Data Inputs and Assignments.
- Enter a name of the throw event as async in the Name field.
- Leave the Data Type and Source fields blank.
- Click OK.
It will automatically set the executor service on each session. This ensures that each process instance is signaled in a different transaction.
29.9. Process instance operations
Process instance administration API exposes the following operations for the process engine and the individual process instance.
- get process nodes - by process instance id: Returns all nodes, including all embedded sub-processes that exist in the process instance. You must retrieve the nodes from the specified process instance to ensure that the node exists and includes a valid ID so that it can be used by other administration operations.
- cancel node instance - by process instance id and node instance id: Cancels a node instance within a process instance using the process and node instance IDs.
- retrigger node instance - by process instance id and node instance id: Re-triggers a node instance by canceling the active node instance and creates a new node instance of the same type using the process and node instance IDs.
update timer - by process instance id and timer id: Updates the timer expiration of an active timer based on the time elapsed since the timer was scheduled. For example, if a timer was initially created with delay of one hour and after thirty minutes you set it to update in two hours, it expires in one and a half hours from the time it was updated.
- delay: The duration after the timer expires.
- period: The interval between the timer expiration for cycle timers.
- repeat limit: Limits the expiration for a specified number for cycle timers.
- update timer relative to current time - by process instance id and timer id: Updates the timer expiration of an active timer based on the current time. For example, if a timer was initially created with delay of one hour and after thirty minutes you set it to update in two hours, it expires in two hours from the time it was updated.
- list timer instances - by process instance id: Returns all active timers for a specified process instance.
- trigger node - by process instance id and node id: Triggers any node in a process instance at any time.