
You use this function to define the terminating events of a task.
You must define at least one terminating event for tasks that refer to an asynchronous object method. At runtime, the relevant work item is only terminated when a terminating events occurs.
You can define a terminating event for tasks that refer to a synchronous object method. At runtime, the relevant work item is terminated when the synchronous method has been successfully executed or when one of the terminating events occurs.
Whether a method is defined as synchronous or asynchronous depends on its implementation.
Terminating Events
The terminating events of a task express the possible end statuses of the task.
A terminating event always refers to one object for which the event must be triggered. You define the object for which the event must be triggered in a container element in the task container.
The following example illustrates this for a classic business object (BOR):
The event DELETED of object type BUS2032 is defined as a terminating event for a task. At runtime the sales order 123456 is passed via the task container. The task is now only terminated if the sales order 123456 is deleted and the event BUS2032.DELETED triggered. If another sales order is deleted, the task is not terminated.
If the task is used as a step in a workflow definition, you can go to a separate modeling branch when the event occurs. For more information, see Maintenance of Tab Page Outcomes.
The task Release budget has the terminating event Budget cancelled.
If a task is terminated by an event, the execution of the workflow is continued. The method does not necessarily have to have been executed. If a task is aborted or non-defined processing statuses arise, the work item is not terminated since no event is created. The workflow is not continued.
Even if the flag Confirm End of Processing is set for a task, the task is terminated immediately when the terminating event occurs.
You maintain the terminating events on the tab page Terminating Events.
You specify a container element of the task container, which at runtime contains a reference to the object for which the event has occurred. This is generally the task container element _WI_Object_ID. The fields Object type category and Object type are filled automatically.
If you are looking at a task in display mode, whose original system is not the current system, you can create additional terminating events. This creates an extension of the task definition.
You identify the event by specifying its instance ID. The event must be defined for this object type.
The workflow system creates the instance linkage required at runtime and activates it.
If you want to check the properties of the terminating event, select
. The properties of the instance linkage are displayed and can be changed.
If you change the properties of the instance linkage, all terminating events that exist for this task in the workflow system are affected by the change. Therefore do not change the indicator for activation of the event.