In a screenflow, Finish button will be provided in the last assignment. The Finish button has 2 actions based on Click Event - 1. Run Activity 2. Local Action to show Modal dialog
Per Requirement, the activity in Step 1 will set a property. Based on the property value set by the activity, the modal dialog will be shown or skipped. However the modal dialog is condition does not seem to pick property value set in the activity. This is because the Button is not refreshed after the Activity and Local action condition is not evaluated again after the completion of the activity.
If you see screenshot 2, the condition for Local Action "ErrorText" is updated in the activity in Step 1. The modal dialog condition does not seem to pick property value set in the activity. It hold the value that was prior to clicking the "Finish" button
Is there any other to fix this issue? Pls help. I have attached the screenshots.
Can you try the below suggestion and share us the outcome.
1)Instead of runactivity in Step 1 use RefreshSection and give this activity inside it.
2) Add a Post value action in Step 2 which should post the value to the clipboard.
Posted: 4 years ago
Posted: 28 Dec 2017 15:28 EST
Karthikeyan Ramalingam (New2740)
Principal IT Engineer Applications
I did as you suggested. But the issue still persists. As per my understanding, following is the issue -
The condition for "Local Action" is based on property .ErrorText (See attached screenshot). When I click the "Finish" button for this first time, Pega evaluates the vaue of property .ErrorText which is Null and so pega decided not to execute Local Action. However I set the value for the property .ErrorText in Step 1 (Refresh along with activity). Even though it is posted to clipboard, Pega does not reevaluate the property .ErrorText in Step 3 and execute the Local Action. It just exits out after Step 2.
If the click the same "Finish" button again, then it will execute Step 3 because now the property .ErrorText has the required value. This is again a problem for me because my activity in step 1 could reset the 'ErrorText" property to Null but pega will still execute the "Local Action" in Step 3 since it already determined to execute the Local Action.
The problem I am seeing is that condition in step 3 is not evaluated when we are in Step 3 rather it is evaluated before any action set in executed. I tried replacing the Step 3 condition with When rule but still I am getting the same issue
P.S: The workaround I could see is to replace the "Local Action" with OOTB "Process Action" Activity (through custom wrapper activity) but modal dialog is not working when I call "Process Action" activity
Posted: 4 years ago
Posted: 6 Jan 2018 14:26 EST
Rachit Agarwal (Rachit_Agarwal)
Principal Engineer, Technical Support