Configuring the Maximum Number of Tasks per Process Instance

It is possible for a runaway process to generate a very large number of tasks within a single instance, resulting in a large number of EC events for the instance, as well as a large number of rows in the PVM database tables for the instance.

You can configure a threshold for the number of tasks per instance, at which point the process is halted, and the following is written to the BPM log file:

[WARN] - {MAX_TASKS_PER_INSTANCE_REACHED} - Instance [pvm:xxxxx] has reached    the maximum number of tasks allowed: [1,000].

And the following audit message is generated:

BX_INSTANCE_PROCESS_MAX_TASKS_REACHED  Maximum number of tasks per instance reached.

The number of tasks threshold (default = 1000) can be configured using the com.tibco.bx.maxTasksPerInstance JVM property. You may want to configure this threshold if:

  • your process design contains a large number of loops or tasks.
  • you have long-running processes, whose task count may get large even though the process isn't running away.

If you set a high value, your ActiveMatrix BPM system could stall if process instances reach a runaway state, as it will take time to reach the threshold. If you know your task per instance count, you may wish to set the threshold to a lower value.

Procedure

  1. Log in to TIBCO ActiveMatrix Administrator as root user and select Infrastructure > Nodes.
  2. Select the node BPMNode and click the Configuration tab.
  3. Click the JVM Configuration link.
  4. Under the Properties heading, click Add to add a new JVM property.
  5. Enter the property name as com.tibco.bx.maxTasksPerInstance and set the value as desired.
  6. Click Save to save the changes.
  7. Stop and restart BPMNode.