Support Article
Actions chain in the UI control does not stop on error
Summary
UI control Button is configured for the chain of two action on Click event.
Changing Refresh section to Run activity does not bring an effect.
Corresponding activity, called on Click event, might set the error message using Page-Set-Messages and set the activity status to Fail using Activity-Set-Status.
Expected result: Local action will be not launched, because activity rule brings the error before that.
Actual result: Local action is launched anyway.
Error Messages
Not applicable
Steps to Reproduce
- UI control Button is configured for the chain of two action on Click event.
Changing Refresh section to Run activity does not bring an effect.

2. Corresponding activity, called on Click event, might set the error message using Page-Set-Messages and set the activity status to Fail using Activity-Set-Status.

Root Cause
This is working as expected. Both the events configured from Button click will get executed independently.
So the error message which is getting setted from pre-activity of ReloadSection will get removed with the end of ReloadSection and then Local Action will get executed.
Resolution
Compose custom script taking reference of the below one and use it in between the events through "Run Script" event :
function ClearActionQueue(clrActions){
if (clrActions == "Cancel"){
pega.control.actionSequencer.clearQueue();
}
else
{
}
}
Published December 15, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.