Plugins and Nested Flows
There are two ways you can call out of a product order flow to other code:
- You can invoke a state action plugin either before or after the work order, or
- You can specify another product order flow as an activity in the diagram. Or you can use assignments to update values in the current dataset.
Plugins
The action names a plugin defined using a specific interface described in the component documentation:
onEntry plugin-name onEval plugin-name
The plugin invoked by the state action acts as a wrapper for your custom code.
Nested flows
You can replace any activity in your flow diagram with another product order flow. To do this, you define an action on the activity, and you name the activity:
include external-flow-name
For more details on how to call out to state action plugins and how to nest product order flows, refer to the component documentation.
Rollback status tags
When a nested product order fails, the enclosing flow may need to know what, if any, rollback was performed within the inner flow. The special dataset variable #POF_ROLLBACK_STATUS can be set to propagate this information outward. The figure shows how you can use tags on the flow transitions to set this variable.
In this example, there are three possible failure outcomes:
-
HLR/activate failed, leaving nothing to roll back.
-
VMS/Activate failed, so the HLR activation was rolled back with HLR/Desactivate.
-
VMS/Activate failed, but HLR/Desactivate also failed, leaving the HLR activation in place.
The enclosing flow can examine the value of #POF_ROLLBACK_STATUS to determine which of these occurred.