Question


TD Bank Group
CA
Last activity: 22 May 2018 8:21 EDT
Create Work condition not working
We have a button in a section that has 2 actions on the Click event:
1. Run an activity to validate some data and set a flag on a property
2. Create Work to start a new work object but with a condition on the property being set in #1.
For some reason it seems like #2 is being fired even though #1 set the property used on the condition to a value that should prevent it.
If I click a second time, then the condition works. It seems like the condition is being evaluated before the first action completes.
Did you experience that and do you have an idea on how to get around this issue?
I tried to move the Create Work into the activity called in #1, but this is causing some other issues do to conflicting pyWorkPage pages...
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


TD Bank Group
CA
We decided to move the creation of the work to the post-processing activity of the flow action instead of trying to do it on the action of the button. That way the flow action validation kicks in before calling the post-processing and it works as expected.


Citicorp Services India Private Limited
IN
Hello,
Could you please let us know which version of Pega are you using? Also please let us know why can't we use declare expression to set a flag on a property instead of activity rule.
If we use Declare expression rule, based on the value entered in the form, the flag will be set instantly, through which we can overcome this issue.
Please let me know if this helps.
Thanks,
Gowrishankar.


TD Bank Group
CA
I am trying to use your suggestion of going with a Declare Expression, but is there a way to iterate through all the items in a Page List and trigger an Obj-Validate on them and if any fail set the value of the target property to false?
I see that I can trigger an "Edit Validate" on a property in a Declare Expression, but I can't find how to trigger an Obj-Validate on each item of a Page List...
-
Alexandre Serighelli


TD Bank Group
CA
Also, the condition does not work on other actions either. I tried to run the ClearActionQueue JS function before the Create Work action with the same condition and it still does not work.
It almost looks like the Conditions are evaluated before executing all the actions and not before each one individually. So whatever the first action does is not reflected in the conditions.


TD Bank Group
CA
Is anybody aware of an issue with actions conditions?
-
Benjamin Hui


Swedbank AB
SE
As i understood your requirement you want to stop the case creation when specific flag true. Why cann't you do that as validation in Validatenew activity, which will also stop case creation.


Pegasystems Inc.
IN


TD Bank Group
CA
Well, my issue is that I cannot refresh the section after running the activity and before creating the new work as running the activity is triggered by the click of the same button.


Pegasystems Inc.
IN
even though the actions are configured on same button, Refresh section after run activity should make it work.
If its not able to find the property value, try adding a hidden text field in the section with that property . So that on refresh, client side will have the property value and its evaluated correctly.


TD Bank Group
CA
Hi, I am not sure to understand how you are suggesting to implement this.
Put the 3 actions on the same button: 1st = run activity, 2nd = refresh section, 3rd = create work?
I don't see how this would work as the 3rd action would still get executed after the section refresh.
Accepted Solution


TD Bank Group
CA
We decided to move the creation of the work to the post-processing activity of the flow action instead of trying to do it on the action of the button. That way the flow action validation kicks in before calling the post-processing and it works as expected.