Methods Tab Page
Use
In addition to the method for the task, you can define the following methods:
-
Before method: Executed before execution of the method
-
Secondary method: Executed at the same time as the method
-
After method: Executed after execution of the method
Prerequisites
The methods and their object types are defined in the Business Object Repository.
The objects on which the methods are executed must be referenced in a container element in the workflow container.
Features
Call methods
When executing a work item with before, secondary or after methods, the system first calls the before methods synchronously in any order and processes them.
Then the system starts the task method and secondary methods in different sessions. Secondary methods are only for display. Any changes carried out in them have no (direct) effect on the workflow. In the basic settings for the workflow runtime system, you can determine whether the sessions for the secondary methods are closed again after the methods have been executed.
Finally, the system calls the after methods synchronously in any order and processes them.
With work items that are set to status completed by a terminating event without method execution, the before, secondary and after methods are not called.
Before methods cannot create the object on which the task method is to run. However, after methods can run on a object created by the task method.
Data transfer into and out of the methods
There is no separate binding between task container and method container for these methods.
The methods are given the method container of the task method. If no binding is defined between the task and the method, the system passes the task container.
Secondary methods cannot return data to the workflow nor influence the process control.
Before and after methods can evaluate and manipulate the method container in order to influence the subsequent method or steps.
Error Handling
As with secondary methods, errors in before and after methods have no influence on the execution of a work item. The processing logic of the work item depends solely on the task method. The system records errors in the before and after methods as warnings in the workflow log.
Activities
To define an object method as a before, an after or a secondary method, select (in the column Object) a container element in the workflow container, which contains the object to be processed. Then select the object method required in the column Method.