Question
Atos Syntel
IN
Last activity: 10 Dec 2016 13:19 EST
Actions are not getting skipped when 'When' conditions fails
Below image contains a list of actions that needs to be executed on click of a button
Each of them have a when condition which checks the value of property type TrueFalse like below
Now when the value of the property is true data transform should be executed followed by the local action, add new work should be skipped.
When the value of the property is false data transform and local action should be skipped, add new work should get executed.
The issue is that both the data tranform and local action are executed regardless of the value of the property in the when condition, they are not getting skipped.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hello,
Does this only happen when you have all three actions, or is the addition of a specific one responsible for this odd behavior? Where is the data the when evaluates and and how is it initialized? Also, does that field expect a dot ('.') before the property name, and without it you are asking if a top level page evaluates to true?
Thanks,
Mike
Atos Syntel
IN
The behaviour remains same even if i test each action separately or in combinations of two, the data is in the pyWorkPage and is initialized by a data transform, i can verify the data in the clipboard before clicking the button to trigger the action(s).
('.') is required there since it is looking for a property, i even added pyWorkPage in the Pages and classes tab of the section and refererred the property as pyWorkPage.property but no use.
Lantiqx
GB
Hi,
I guess you may use
pega.control.actionSequencer.clearQueue();
Please refer to https://collaborate.pega.com/question/how-display-local-action-modal-dialog-depends-condition for more details.
Thanks
Krishna
Atos Syntel
IN
Hi Krishna,
Thanks for the reply, but i want to know whether these when conditions on action sets are working like they are expected to be.
when i click the button the very first time the when conditions are evaluated and the necessary actions are executed, when i click the button again it executes the same actions it executed the first time even when the results of when conditions are expected to differ. It's like the results of the when conditions are stored somewhere when the button is clicked the first time and it uses the same results when we click it the next time.
Pegasystems Inc.
US
I believe the issue here is that the condition is only evaluated when the section with the button is loaded (or refreshed) similar to: https://community.pega.com/support/support-articles/condition-action-not-triggered-when-when-rule-returns-true and https://community.pega.com/support/support-articles/conditional-local-action-comparison-doesnt-update
To confirm this, check the generated HTML on the button when this happens and look for the evaluation of True/False condition in the action metadata.
Would it be possible to try and add either a section refresh or post value to prompt an updating of the control code?
Areteans Technologies
AU
Write a when rule instead of mapping property here.
Atos Syntel
IN
Tried that too, same response.
Areteans Technologies
AU
Check the when condition in Data transform rule 1st step if fails exit the Data transform for temporary solution