Question
Virtusa
IN
Last activity: 28 Feb 2023 9:01 EST
Action set not working as expected when applied when condition
Hey guys :)
I am facing the below issue, please suggest
We need to cancel the work object. We have a button and on click of a button we are calling local action to show confirm message to cancel the work object. So If we click 'No' on modal window, We need to be in the current assignment and If we click 'Yes' on modal window, We need to cancel the work object and show review harness.
We are using pxForceCaseClose OOTB activity.
So to show respective harness we are using Review action with when condition pxIsResolved after the local action is performed. And this is working fine when we click No, means it is staying in current harness.
But when we click Yes, it is staying on the same screen only instead of showing Review harness but work object is resolved in the backend. Without when condition it is going to Review harness on click of Yes but it will go to Review even on click of No which is not acceptable.
Tried to trace and when condition is working, Still staying in current harness.
Any inputs, please :)
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Bits in Glass
IN
@BATTINIRAMESH I would suggest instead of going with this approach, you can follow this one->on clicking yes you can do pxChangeStage to Resolution Stage with cleanupprocesses and the required status you can set in the Resolution stage.
Virtusa
IN
@Anoop Krishna Thank you
But, We don't want to modify ootb buttons until unless that is the only way.
Updated: 27 Feb 2023 10:23 EST
Bits in Glass
IN
@RameshBattini This is not to be modified in the OOTB buttons, this has to be in the post activity in the Cancel Order flow action.On submission of Cancel screen this activity will be triggered and it moves to Resolution stage and this activity runs in the post, so if you click "No" this activity won't be running. This approach is suggested best practice by Pegasystems for simplification and easy maintainance purpose.
Virtusa
IN
@Anoop Krishna That is exactly what we did.
On click of Yes, post activity is running and this post activity is calling pxForceCaseClose OOTB activity.
We don't have cancel stage, so not using change stage activity.
Bits in Glass
IN
@RameshBattini Right, so instead of doing this if you do change stage the case moves to resolution stage, it will cleanup all the processes, you will be able to see required status and you can configure Review harness in the post action of the flow action too. So this can be maintained via flow simplified configuration.
Virtusa
IN
@Anoop Krishna hello
We created an alternate stage Cancel and in post processing of local action on button we are doing change stage to cancel. But work object is not getting cancelled, it is coming back to previous status on reopen
Updated: 28 Feb 2023 9:01 EST
Bits in Glass
IN
@RameshBattini Ya what you did is perfectly right. This should work. Can you show me the acitivity which you have written? Set Param.ChangeToNextStage-"goto" Param.ChangeToStage-"Cancel", Then call activity pyChangeStage. Not pxChangeStage
Updated: 27 Feb 2023 9:56 EST
Pegasystems Inc.
IN
@RameshBattini Hi, is the when rule the only thing which is not working? Can you please try other property option in the when? if you are not able to achieve this there is another option, you can try the below approach
1. Include the below script in userworkform
function ClearAction(){
pega.control.actionSequencer.clearQueue();
}
2. Call this function on run script with when condition before your review harness
3. Remove when condition from review harness
Please let me know if this works
Updated: 27 Feb 2023 10:30 EST
Virtusa
IN
@SrinidhiM Thank you,
If I use properties that are updated because of previous Local action, it is not working. If I use Always when condition it is working.
And when I am trying your second approach, I am unable to submit the cell properties.
Pegasystems Inc.
IN
@RameshBattini Hi, Can you add a when condition to your second run script action and check because, in this case the clear queue action happens every time even on Yes and No so you will not have the modal submitted.
Pegasystems Inc.
IN
@RameshBattini Hi Can you please try below options:
1. Disable the flow action buttons and add your own buttons in the section and then add finish assignment in the button Yes that will solve your problem
2. Or enable commit in your pxforcecaseclose.