Runtime components : Core components : Flows : Concepts : Actions
  
Actions
An action is a task that a flow processor performs. Actions can occur when a process enters a state, when the process is in the state, and when the process is leaving the state. Actions that occur when a process is entering a state are called entry actions. Actions that occur when a process is leaving a state are called exit actions. It is the state that defines which action occurs and when it occurs. An action has a set of guard conditions that the processor evaluates before it executes the action. The processor checks the guard conditions in the order of appearance in the action's external definition rather than by name.
To support actions, the Automaton provides the Action interface, which, when implemented, may execute a series of steps. These steps may include validating an object or displaying presentation components in a user interface.
The toolkit provides the abstract class DSEAction as a parent class for actions. The toolkit also provides a set of generic actions that you can extend in the com.ibm.dse.automaton.ext package. To extend the behavior of the provided actions, the new classes must implement the execute and preProcess methods. The preProcess method executes before the normal execute method. The generic actions include OpenView, CloseView, and ExecSubflowAct. Additionally, to invoke a process in the business process layer through the EJB or WSIF protocol, the toolkit provides the EJB Access action and the WSIF Access action to use the EJB or WSIF interface.
The toolkit externalizes an action using a tag that has its name defined in the toolkit configuration file. For example, if the tags collection in the file contains the <field id="actionTag1" value="aClass"/> definition, the tag to externalize the action is <actionTag1>.
See
Open view action
Close view action
Execute subflow action
See also
Concepts
Open view action
The com.ibm.dse.automaton.ext.client.OpenView class is a generic action that opens the panel specified by the view attribute. The action uses the navigation controller that is available in the processor context. The action does the following to open the panel:
1 Calls the navigation controller to open the specified panel in the navigation mode specified by the navigation parameter. The action opens the view as either a peer or a child of the active panel.
2 Chains the panel context to the context specified by the action's linkContextTo attribute.
3 Copies data from the action context to the panel context using the format specified by the action's inputMapFmt attribute. The format moves data easily from one context to another by resolving any differences in namespaces. Panels from different business processes may use different names for the data but are otherwise interchangeable. The format's ability to map from one namespace to another allows you to reuse these panels.
See also
Actions
Close view action
The com.ibm.dse.automaton.ext.client.CloseView class is a generic action that closes the active panel. The action uses the navigation controller that is available in the processor context. The action does the following to close the panel:
1 Copies data from the panel context to the processor context using the format specified by the action's outputMapFmt attribute.
2 Calls the navigation controller to close the active panel.
See also
Actions
Execute subflow action
The com.ibm.dse.automaton.ext.ExecSubflowAct class is a generic action that starts another processor instance and waits until the new process completes its flow. This action does the following to nest processes:
1 Creates an instance of the processor specified by the action's processor attribute.
2 Chains the subprocessor context to the action context.
3 Copies data from the current processor context to the subprocessor context using the format specified by the action's inputMapFmt attribute.
4 Executes the subprocessor, which activates its initial state and starts its flow. The subprocessor retains control until it reaches one of its final states. At that point, the action regains control.
5 Copies data from the subprocessor context to the action context using the format specified by the action's outputMapFmt attribute.
6 Gets the typeIdInfo from the subprocessor's final state to get the name of the exit event.
7 Raises an event to signal the completion of the action and the subprocess. The processor uses the event, either an OK or an error, as a transition to advance the process based on the result of the action. The signaled event is error when the subprocess throws an exception. In this case, the action adds the exception object to the dse_Exception attribute of the event so that the transition associated with the error event can handle it.
See also
Actions