Posted: 24 Oct 2016 16:48 EDT Last activity: 20 Jan 2017 15:26 EST
when condition not working properly for Action set of an event
If in the action set, any property (say x) is set from 'Run Activity' action and x is used in conditions of the next actions in the same action set, then the conditionss are not working properly. Whether x is used in 'Other Property' condition or in when rule, nothing is working. It can be seen from tracer / clipboard that value of x is getting set properly (in pyDisplayHarness page) from 'Run Activity' action.
It is only working if 'Set value' action is used to set x into another property y and y is used in the conditions for next actions. So one extra property needs to be there with no reason.
For example in the section @baseclass!pySearchFieldWorkResponsive (Ruleset - UI-Kit-7 :03-01-01). There is one Action set added on .pySearchText property. In the first action 'Run Activity', .pyWorkIDSearchHandle property is getting set from pyWorkIDSearch activity. and from the second action 'Set value', .pyWorkIDSearchHandle is set to .pySkipOpenWorkItem property and that is in use for condition. Now instead of 'Set value', if .pySkipOpenWorkItem is set from a 'Run Activity', same conditions which are there for succeeding actions will not work.
The above testing was done in Pega 7.1.8. Just wanted to know whether this is a product bug or there is any specific reason for this.
I've seen an issue like this and it hinges on what action data is generated on the control and when.
If you don't see the Local action included on the control, then it won't fire - even if the condition is met. Can you check and see what the generated mark up looks like when the condition is met, but doesn't fire (and provide it here)?
This infact would be under the expected behavior category. Unless the SetValue is used or PostValue is used, the DOM isn't refreshed and when there is no DOM refresh there is no way that in the middle of action set the when condition will be evaluated correctly.
Explanantion is provided in this article in a better way: