V9.0
Overview
During workflow execution, activity instance-related database queries are combined and sent in batches. This setup reduces the number of queries to the database and improves system performance.
Activity parameters
If required, you can set the following activity parameters in the activity Properties pane.
Parameter | Description |
---|---|
Force Persistence | Completely flushes the activity instances buffer after the execution of the activity for which the parameter is set. |
Persist on Creation | Performs the insert only on creation of the specific activity, that is, the activity instance is stored in the database immediately after its creation. |
Configure the buffer size
You can configure the buffer size using the following two options:
- Through the workflow properties
- Through the
config
file of the application or the service that uses the Cora SeQuence database: Administration, Flowtime, Background Runtime Service (BRS), and Job Execution Service (JES).
Parameters
To configure the buffer size, edit the following parameters.
Parameter | Location | Description |
---|---|---|
Batch Size | Workflow properties (Advanced mode) | Open the workflow and edit the Batch Size parameter in the Properties pane so it is relevant while executing the workflow in all applications. Default: 0 If set to 0, the system considers the buffer size set in the default value or in activityInstanceUpdateBufferSize from the config file. |
activityInstanceUpdateBufferSize | Application config file under workflowExecution | Determines the number of inserted and updated activity instances that run in a single workflow execution. Default: 10 |
activityInstanceUpdateStateBufferSizeFactor | Application config file under workflowExecution | Determines the number of activity instances that have already run and require a state update, such as Status and Completion Date. The actual value of the Update State buffer size is calculated as a factor of the update buffer size. Default: 3 Example: 3x10=30 |
Activity instance ID range
Each application fetches and stores an ID range from the database in its memory cache using an SQL Sequence function. The activity instance ID value is assigned from the cached range.
Parameter | Location | Description |
---|---|---|
generatedActivityIdRangeSize | Application config file under workflowExecution | Determines the range number each application stores. Default: 10,000 |
Sample code
<sequence.engine> ... <workflowExecution
activityInstanceUpdateBufferSize="10"
activityInstanceUpdateStateBufferSizeFactor="3"
generatedActivityIdRangeSize="10000"
/>
Risks
Depending on how the system uses data, change the default buffer parameters, or configure additional activity properties.
Consideration | Recommendation |
---|---|
If the system uses data directly fromtblInstanceActivities database table, the database might not have the latest data when required.Scenarios:
| There are two possible solutions to avoid this issue:
|
If an execution fails, the risk of losing data is as big as the configured buffer size. | Configure the buffer size carefully based on how the system uses data. |
activityInstanceUpdateStateBufferSize parameter does not exist anymore. | If required, you can use the activityInstanceUpdateStateBufferSizeFactor parameter instead. |
Workflows that include the File Writer activity will fail if the Persist on Creation property is not selected. | Select the Persist on Creation property when you configure the File Writer activity. |
Best practices
- When using built-in commands on dynamic tasks, select the Force Persistence property for the dynamic task, if there is no database persistence in between the two activities.
- When using activities in which the Blocking property is selected, such as Sub Workflow and In-Process Consumer activities, select the the Force Persistence property.
- When using activities that are based on the creation and data from other activities, select the Force Persistence property or the Persist on Creation property as required. For example, the Web Service Input activity should be persisted before the related Web Service Output activity.
- The
fldID
column intblInstanceActivities
is no longer incremental. For sorting purposes, usefldCreationDate
. - If you use
tblInstanceActivities
table, make sure that the table is sorted byfldCreationDate
column, if required. - Default range size is 10,000. In case of low volume (less than 1000 instances a day), it is recommended to decrease the range size.
- In legacy workflows, when using Web Service Consumer and Listener in the same workflow, select the Persist on Creation property for the Listener.
V8.8
Overview
During workflow execution, activity instance-related database queries are combined and sent in batches. This setup reduces the number of queries to the database and improves system performance.
Configure the buffer size
You can configure buffer parameters in theconfig
file of the application or service that uses the Cora SeQuence database: Administration, Flowtime, Background Runtime Service (BRS), and Job Execution Service (JES).
Parameters
Parameter | Description |
---|---|
activityInstanceUpdateBufferSize | Determines the number of updated activity instances that run in a single workflow execution. Default: 10 |
activityInstanceUpdateStateBufferSize | Determines the number of activity instances that have already run and require a state update, such as Status and Completion Date. Default: 30 |
Sample code
<sequence.engine> ... <workflowExecution
activityInstanceUpdateBufferSize="10"
activityInstanceUpdateStateBufferSize="30"
/>
Risks
Depending on how your system uses data, you need to change the default buffer parameters, or configure additional activity properties.
Consideration | Recommendation |
---|---|
If your system uses data directly fromtblInstanceActivities database table, the database might not have the latest data when required.Scenarios:
| There are two possible solutions to avoid this issue:
|
If an execution fails, the risk of losing data is as big as the configured buffer size. | Configure the buffer size carefully based on how your system uses data. |
Workflows that include the File Writer activity will fail if the Persist on Creation property is not selected. | Select the Persist on Creation property when you configure the File Writer activity. |
Best practices
- When using built-in commands on dynamic tasks, select the Force Persistence property for the dynamic task, if there is no database persistence in between the two activities.
- When using activities in which the Blocking property is selected, such as Sub Workflow and In-Process Consumer activities, select the the Force Persistence property.
- When using activities that are based on the creation and data from other activities, select the Force Persistence property or the Persist on Creation property as required. For example, the Web Service Input activity should be persisted before the related Web Service Output activity.