Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Sequential processing of actions in an action set not working

SA-67292

Summary



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.



Error Messages



Not Applicable


Steps to Reproduce

  1. 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.
  2. Launch the UI.
  3. Enter incorrect data in the section.
  4. Press the button.


Root Cause



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.


Resolution

  1. 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. 
     
  2. In the UserWorkForm HTML fragment rule, add the below code.

    <script>
      function clearactionqueue(){
        var node=document.querySelector("div[node_name='pyCaseErrorSection']");
        if(node&&node.offsetHeight >0){
        pega.control.actionSequencer.clearQueue();
        }
      }
    </script>

    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.

Published August 19, 2019 - Updated December 2, 2021

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us