Activities can be terminated in a process through fault handling, early termination via a completion condition on a parallel
forEach
or through the execution of a Process Developer extension break activity. The Scope is the only activity that provides a means to control what happens when an activity is terminated. The termination handler for a scope is enabled while the scope is executing its main activity or its event handlers. The termination handler is disabled as soon as the scope completes its execution or if the scope's fault handlers execute. If a scope is eligible for termination, the termination of a scope begins by terminating its primary activity and all running event handler instances. Following this, the custom
<terminationHandler>
for the scope runs. If there is no termination handler for the scope, the default termination handler executes.