Workflow: Support of Action Sequences
In previous versions of MYOB Acumatica, a customizer could implement the sequential execution of actions in a workflow only by defining these actions as running automatically when certain conditions were met. In this case, the system checked the conditions for the actions every time the status of a record on the form changed, which affected system performance.
In MYOB Acumatica 2024.1, sequences of actions are supported for workflows. The new functionality has the following advantages:
- The customizer can make the system execute multiple actions one after another without
specifying any conditions.
With this functionality, customizers can optimize system performance and speed up the processing of records.
- When the sequence of action is performed, the system shows a dialog box with the progress and results of performing the sequence.
- The customizer can add any actions to the sequence including actions which code is defined in the graph.
Sequential Action Execution
Each action can have multiple actions—referred to as subscriber actions or subscribers—that the system invokes after it executes this action. Each subscriber can also have its own subscribers. If a condition is specified for an action, the system executes a subscriber action only if the condition is met and the action is available in the current workflow state. The system executes the action even if it is hidden.
If a subscriber action is unavailable in the current state of the workflow, the system displays an error. The system then either continues the execution of other subscriber actions or stops the execution, depending on the settings specified for this action.
If a user clicks a button (or invokes a command) that has an underlying action with subscribers, the system proceeds as follows:
- If a dialog box is specified for this action, the system displays it and updates the
fields.
For Workflow UI, the system updates the fields as specified on the Field Update tab of the Action Properties dialog box of the Actions page for the action.
For Workflow API, the system updates the fields as specified in the action configuration.
- The system performs all other steps in the workflow.
For Workflow UI, the system does the following by using the settings on the Actions page for the workflow state:
- Updates the specified fields (on the Fields, Fields to Update on Entry, and Fields to Update on Exit tabs).
- Performs the transitions.
- Updates the specified post-transition fields (in the Fields to Update After Transition table).
For Workflow API, the system uses the configuration of the transition and the action.
- If the action has been executed successfully, the system then executes its subscribers.
If a dialog box is specified for a subscriber action, the system does not display this dialog box to the user; instead, the system uses the specified dialog box values.
- For each of the subscribers, the system performs all other steps in the workflow.
- If a subscriber action has its own subscribers, the system executes them one by one if their respective conditions are met and they exist in the current workflow state.
During the execution of each action in a sequence, the system displays a dialog box with the status of the action execution, as shown in the following screenshot. (It is the same dialog box that the system displays when the user clicks the Quick Process button on a form.) For report and navigation actions in Workflow API (or the actions of the Run Report or Navigation: Create Record type in Workflow UI), the system opens the corresponding report or data entry form in a new browser tab, and continues the processing of other actions in the current tab.