Sequential processing of actions in an action set not working
Actions in an action set are not processed sequentially. A When rule on a second action in the action set is evaluated before the first action is completed.
Steps to Reproduce
- Create an action set with two actions on a button. The first action refreshes the screen. The second action launches a local action only if there are no errors on the screen (based on the When condition configured). The actions must be processed sequentially.
- Launch the UI.
- Enter incorrect data in the section.
- Press the button.
According to the Implementation of Sequential Actions and the When rule evaluation associated with them, each of the When rule is evaluated at the server during the start of the action sequence.
The When rule is not evaluated at runtime in the middle of the actions. Thus, when three actions are configured and if the last action has a When condition, the When condition must be evaluated before the first action starts. That is, when the button is clicked, the page messages must be present and the When rule must be evaluated to false.
At the Markup level, the button is regenerated with a markup, with or without the third action (Local Action) based on the When condition at the beginning.
- Configure the Button Action set as below,
a. Navigate to Cell Properties.
b. Open the settings for 'Action set 1'.
c. Set the Function Name as clearactoinqueue in the Run Script option.
Remove the When Condition for the local action.
- In the UserWorkForm HTML fragment rule, add the below code.
Note: The pyCaseErrorSection (section name) is the Pega out-of-the-box error handling section. If a different section is used, include that name.
The section renders as below:
3. Save all the rules.