Workflow Manual / Version 2406.0
Table Of Contents
Actions can only be used in automated tasks, user tasks, in the predefined
RunActionTimerHandler
, or as final actions. They are performed at different times:
Entry actions are performed when a user accepts a task.
Exit actions are performed when a user completes a task.
Actions in an automated task run when the guard evaluates to true.
Actions in a timer handler are run if the associated timer expires.
Final actions run after a process was completed or aborted. Final actions use a different interface, which is not available in the old Workflow API. See the Unified API Developer Manual which describes final actions as part of the Unified API.
Actions should run for shortest period that is feasible since they run inside a server transaction and block precious server resources. To avoid problems, stick to the following rules:
Don't write client actions that require user interaction.
If you interact with another system and need to wait for a result, for example sending a mail and waiting for a notice of its reception, always use a second task with a guard (see Section 4.1.7.3, “Guards”) following the initial task with your action. The example in Section 5.4.4, “Example Expression” describes an expression which checks whether a mail has been received or not.
Note the following features which are helpful when you program your own actions:
Actions are Java beans.
Parameters for the global configuration of the action bean can be defined via the XML workflow definition (see Section 5.3.4, “Access Workflow Variables from the Action”).
Actions can set a success variable which may be used to control the error handling within the workflow.
Actions can assign a result to a workflow variable (see Section 5.3.4, “Access Workflow Variables from the Action” for details).