Workflow performance

Benchmark and analyze workflow performance by using methods such as platform logging and performance log analysis.

Workflow instance data

Workflow instance recording saves the step-by-step execution information to the database. This data also shows the path that is taken in a graphical display, which includes links in task details and information on nested workflows.

Non-production environments:

The primary use of workflow instance recording is for debugging in a nonproduction environment.

Do not use workflow instance recording in a production environment. It causes significant processor usage. It can increase workflow response time by 50% or higher and writes a significant amount of data to the database.

Do not use workflow instance recording when IBM® TRIRIGA® is performing data loads or batch processing. The saving of instances slows down the processing, uses excess database space, and impacts the Platform Maintenance Scheduler cleanup.

Configure the following properties and values:
  • WF_INSTANCE_SAVE
  • WF_INSTANCE_SAVE_24HR_THRESHOLD
  • USE_WF_BINARY_LOAD
For more information, see System properties

Optimizing workflows

500 and 2000 milliseconds thresholds:
  • Review any synchronous workflow that takes more than 500 milliseconds. Based on your user requirements, check whether the workflow can be run asynchronously. Make sure that a workflow does not require synchronous processing.
  • Review any asynchronous workflow that takes more than 2000 milliseconds.

Use the following checklist to optimize workflow performance:

Transaction control and multi-record processing:
The Create Record and Modify Records tasks can cause many database commits, but these tasks can also cause excessive heap usage. The specific situation depends on the records, data, and number of records that are being processed. Reducing the number of commits by increasing the number of records per commit can improve performance by reducing the load on the database. However, attempting a large set of records, for example, more than 10,000 records, at one time can cause excessive heap usage. Heap usage is excessive because the task does not commit until all the records are created or modified. To determine the best balance, use the following methods:
  • Record Sets: Use record sets whenever possible to minimize the number of database commits.
  • Transaction Section: Use the task's Transaction section when the record set is large or unknown to commit every N records, for example, every 100 records, to prevent excessive heap usage.
Query Task versus Retrieve Records Task
  • Use the Query Task when any of the following applies:
    • Using associated records as filters.
    • Getting general information, such as open orders or occupied spaces.
    • The intermediate record set might be large.
  • Use the Retrieve Records Task when any of the following apply:
    • Getting records with the largest or smallest value.
    • Accessing financial records with a token.
    • Filtering an existing record set from the result of another step.
End Task versus Stop Task
  • A Stop Task indicates the abnormal and immediate stopping of a workflow. When a workflow reaches a Stop Task, no more of its tasks are performed.
  • An End Task task indicates the end of a workflow. When a workflow reaches an End Task, the workflow is complete and there are no more tasks to perform. The workflow completes normally, so saving of instances follow the server's or the start task's instance save.
  • When developing workflows, use End Task for most instances when you want to exit the workflow gracefully, and all work is done. Use the top Task in only worst-case scenarios because Stop Task causes the entire workflow instance stack to be saved, which is not desirable, especially in data-load scenarios, because saving workflow instances is resource-intensive. If you are not sure which task to use, use the End Task.
Query Task Filter
If possible, when filtering records in a Query task using the list comparison, use the Associated To option to reduce the tasks in a workflow.
Associate Records Task
Use the Associate Records Task task only for the forward association. The platform does the reverse association automatically if the association is defined in the Association Manager. However, for performance reasons, the Reverse Association flag is being deprecated in queries. For more information, see Reverse association queries in Query and report performance.
Switch task
Use the Switch task to call a workflow only when needed. For example, in a Permanent Save Validation workflow.
Extended Formula
Trigger an Extended Formula only when needed with theFormula property. For more information, see Fields and extended formulas in Query and report performance.
In-Memory Smart Object (IMSO)
If possible, use the IMSO for helper records that do not need to be saved.
Cascade Read-Only
Use the Cascade Read-Only option to eliminate the need to trigger separate workflows to make the child record read only. The Cascade Read-Only flag is set in the Association Manager.
Workflow Analysis Utility
Use the Workflow Analysis Utility to identify any potential workflow issues. The Workflow Analysis Utility analyzes workflow performance and process execution. The utility reads IBM TRIRIGA performance logs and displays performance analytics for workflows, including the following:
  • Workflow execution time, which is how long different workflows take to run.
  • Process flow, which is the order in which workflows run and what triggered them to run.