Workflow Activity
Introduction
Workflow Activity is a solution designed to streamline the reuse of functionalities across different workflows. It enables us to share common forms or scripts, enhancing efficiency and consistency.
For instance, "Sending Email" is a frequently used feature that can serve various purposes, such as creating a new user account, updating an email address, or sending notifications.
By leveraging Workflow Activity, we can create a dedicated workflow called "Sending Email" once and seamlessly incorporate it into other workflows as needed.
Configuration
To add a new workflow activity in Casewhere, navigate to the Add Activity Definitions section and drag the activity into the appropriate step of the workflow definition.
The following information is required to set up a Workflow Activity:
Name: The activity name must be unique and meaningful.
Workflow Definition: Select the workflow definition you want to run, also known as the "embedded workflow".
Input Data Objects: There are two options for sending data to the triggered workflow. For example:
ctx.Get("VariableName")
: Send data using a workflow variable.ctx.Input.Id
: Send data using the workflow input.
Process: A new case is created each time Casewhere executes the workflow.
Output Workflow Variable: Defines a variable to store the value returned by the workflow.
Queue Workflow: When enabled, the workflow is queued for background execution.
Navigation: Setting for navigation between workflow activities. To learn more, read the article Activity Navigation.
Advanced Settings: Standard advanced settings applicable to all workflow activity types.
Settings name | Description |
---|---|
Auto Commit Changes | If this checkbox is selected, Casewhere will save all unsaved data to the database after the activity is completed. By default, Casewhere only saves data when the entire workflow is finished. |
Audit Event Name | Starting from version 2.7, Casewhere automatically audits all events that alter the data state. By default, the activity name is used for auditing, but you can customize it using this setting. |
Enable Exclusive Lock | Casewhere enables you to control concurrency at the activity level using an exclusive lock. To learn more, refer to the article on "Workflow Concurrency Control". |
Lock Context (optional) | When the exclusive lock is enabled, Casewhere allows only one activity to execute at a time across the entire system. This may not be ideal for many scenarios. By providing a lock context, you can control concurrency more granularly. For example, you can enable the lock on specific data objects, allowing multiple activities to run as long as they target different objects. The setting accepts an expression that uses the same syntax as the navigation rule. |
Waiting Timeout | Casewhere will release the lock if it exceeds the configured timeout, even if the activity is not yet complete. |