The activity is used to choose the status of the process instance after completion, and a completion code returned as calling activity.
The following table shows the options of the attribute "Action on Termination":
Option | Internal Completion Code | Description |
---|---|---|
Complete Process | FINISH:completion-code |
|
Cancel Process | ABORT:process |
|
Default behavior | null or set by other activities |
the behavior is set by the last API call to setProcessInstanceCompletionCode()
in an activity already executed by the process. The API call should set the completion
code listed in the previous entries. If no API call to the method is made in any
of the activities, the completion code is null, which is equivalent to FINISH .
Note that manual tasks in exception embedded subprocess invokes the method
implicitly, which will be addressed later. |
If the activity is in an embedded sub process, the behavior are somewhat different. For error, correction and delay embedded sub processes, the following table explain the behavior:
Option | Internal Completion Code | Description |
---|---|---|
Complete Process | FINISH:completion-code |
|
Cancel Process | ABORT:process |
|
Default behavior | null or set by other activities |
the behavior is set by the last API call to setProcessInstanceCompletionCode()
in an activity already executed by the process. The API call should set the completion
code listed in the previous entries. If no API call to the method is made in any
of the activities, the completion code is null, which is equivalent to FINISH.
Note that manual tasks in exception embedded subprocess invokes the method
implicitly, which will be addressed later. |
For abort embedded sub processes, the behavior is hard-wired to "Cancel Process" described above, and there is no option to change that.
For error embedded sub processes (exception handlers), any manual task in the processes
invokes setProcessInstanceCompletionCode()
implicitly, based on the task actions
the users selected.
The following table shows the completion codes corresponding to task actions:
Task action | Process completion code | Special Note |
---|---|---|
Complete | FINISH | nothing special |
Cancel | ABORT | This is not used by regular finish activity. It will make the calling activity as cancelled, but does not cancel the parent process instance. The current (embedded) process instance is put in completed status. |
Abort | ABORT:process | nothing special |
Retry | START | This is not used by regular finish activity. It will make the calling activity as cancelled, but will retry (restart) the same activity again. The current (embedded) process instance is put in completed status |
custom action | FINISH:custom_action | nothing special |
The attribute "Do Not Notify Caller" is used to stop notifying caller (internal event process finish) when it is set.