Support Article
Launch Harness action does not evaluate the When condition
SA-78833
Summary
A button is configured with the following actions:
- Action 1 - Refresh this section: This calls a validation activity. If the validation fails, an error message is set on the primary page.
- Action 2 - Launch harness: This launches a review harness when specific conditions satisfy (pyWorkPage.pyHasError != true)
The user has tried other conditions which always stay false, for verification purpose. However, the application does not evaluate these conditions on Action 2.
Error Messages
Not Applicable
Steps to Reproduce
- Configure a button with two actions, Action 1 - Refresh this section and Action 2 - Launch harness actions.
- At runtime, click the button (what button). The Action 2 When condition is not executed.
Root Cause
This behavior is as per Pega product design.
A When rule evaluates on the value set that is in the same action set (previous action of the same action set). Hence, the required results display on the second click. The data-change on the control can only update if the Document Object Model (DOM) is refreshed. It cannot update correctly during the middle of the Action Set execution.
Resolution
Perform the following local-change:
Configure the activity and refresh outside the button.
Published May 16, 2019 - 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.