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 maxTasksPerInstance property in the bx.properties file. 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.