Using Activity Implementor ProcessFinishActivity

This activity is the standard process finish activity.

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":
OptionInternal Completion CodeDescription
Complete ProcessFINISH:completion-code
  • The process instance will be set to completed status. All pending event wait instances associated with the activity instances of the process instance will be cancelled. All pending manual task instances owned by the process instance and its embedded subprocess instances will be cancelled.
  • If the process instance is created by a single process invocation activity in a parent process, it will complete and transition according to completion code when the invocation is synchronous, and it does nothing when it is asynchronous.
  • If the process instance is created by a multiple process invocation activity in a parent process, it simply informs that activity this child process is finished, and the completion code is ignored.
  • If the process is invoked remotely by another MDW application, it will inform the remote process invocation activity in that application
Cancel ProcessABORT:process
  • The process instance and all descendant process instances that are not yet completed will be cancelled. Any event wait instances and task instances associated with these process instances will be cancelled as well.
  • If the process instance is created by a single process invocation activity in a parent process, it will be cancelled and transition out using null completion code when the invocation is synchronous, and it does nothing when it is asynchronous.
  • If the process instance is created by a multiple process invocation activity in a parent process, it simply informs that activity this child process is finished, and the completion code is ignored.
  • If the process is invoked remotely by another MDW application, it will inform the remote process invocation activity in that application
Default behaviornull 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:
OptionInternal Completion CodeDescription
Complete ProcessFINISH:completion-code
  • The (embedded) process instance will complete. All pending event wait instances will be cancelled, so are all pending manual tasks
  • The calling activity, which is not a type for invoking subprocesses will complete and transition according to completion code.
Cancel ProcessABORT:process
  • The (embedded) process instance will complete. All pending event wait instances will be cancelled, so are all pending manual tasks
  • The calling activity instance in the main (parent) process will be cancelled.
  • The parent process instance will be cancelled along with all its descendant processes that are not yet completed, which is not a process invocation activity. The current (embedded) process instance is put in completed status. The event wait and task instances associated with all those process instances will be cancelled.
  • If the parent process is created by a process invocation activity in a grand-parent process, or created by a remote process invocation activity in another MDW application, the behavior of the caller is the same as if the parent process is cancelled in its Finish activity, described above.
Default behaviornull 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 actionProcess completion codeSpecial Note
CompleteFINISHnothing special
CancelABORTThis 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.
AbortABORT:processnothing special
RetrySTARTThis 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 actionFINISH:custom_actionnothing special

The attribute "Do Not Notify Caller" is used to stop notifying caller (internal event process finish) when it is set.