KB-1300 Terminate Event Not Cancelling Sub-Process

Symptoms

Within a process model, if there is activity chaining into a Terminate End Event, associated sub-processes will not get cancelled when the parent process reaches the Terminate End Event. This is true for both asynchronous and synchronous processes.

Cause

When a Terminate Event is reached and there is no activity-chaining from the last attended node to the Terminate End Event, the process successfully cancels any remaining active nodes and sub-processes.

However, when a Terminate Event is reached and there is activity-chaining from the last attended node to the Terminate End Event, the process will try to cancel any remaining active nodes and sub-processes using the privileges of the user who completed the process - most of the times a basic user. Since basic users do not have the appropriate privileges to cancel a process unless they are process administrators, this results in sub-processes remaining active despite the node being cancelled.

This has been logged to the Appian Product Team to change the behavior in a more desirable fashion. The reference number for this issue is AN-39422.

Action

There are also several workarounds that fix the behavior:

  1. Remove activity chaining from the Terminate End Event so that the completion runs under Administrator context
  2. Within the Appian Process Modeler, use the ‘Cancel Process’ smart service from the Process Management Appian Smart Services category
  3. Change the Terminate End Event to a plain End Event. Add a parallel, non-activity chained flow from the last node to a Terminate End Event. Since the Terminate End Event will take precedence over the End Event and it is not activity chained, the process will cancel remaining active nodes under Administrator context. It will look like this.
  4. Add the user as a process administrator by including it to the corresponding group per the process model security role map.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: March 2017

Related
Recommended