Skip to content

Terminate

Terminates the current instance to which the work item belongs.

1
myWorkItem.Terminate():void

Remarks

If the instance is not in the Active state, attempting to call this method is prohibited and throws an access denied error.

Examples

Terminate the instance when a request is withdrawn

1
2
3
if ($WorkItem.SelectedAction === 'Withdraw') {
    $WorkItem.Terminate();
}