Question
Skandiabanken
SE
Last activity: 15 Nov 2018 9:18 EST
Delete Open assignment on change of stage
we have a case life cycle which is configured with multiple stages , There is a possibility to have two parallel assignments . On post submission of one assignment , case is advanced to next stage. I see, Pega engine is not deleting the open assignments when case is moving on between stages.
Do I need to place pxChagestage smart shape in every last step of the stage to clean up the open assignments .?
***Edited by Moderator Marissa to update platform capability tags****
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Ok Thanks for explaining scenario in detail.
I see below options here.
Option 1: call pxDeleteAssignmentsForWork activity to cleanup all flows/assignments that were instantiated through StartFlow activity (which is not a best practice :))
Option 2: Why don't you create Optional process instead of Local action for Manager to perform where first assignment will be to manager (with same flow action as local action) and then split for each doing the same thing that you are doing the activity. With this approach you will need to call pxChangeStage explicitly.
Option 3: Use tickets. Set ticket on end shape of the subprocess that you are starting through activity and Raise ticket when manager finishes his assignment.
Let us know if this help :)
Pegasystems Inc.
FR
Hello,
No I don't think you should have to do this. Can you trace it? Can you see any exception.
Areantans
AU
uese ootb change stage & select Close open assignments from current stage on change. it'll take care of all the assignments.
-
Matheswaran Ravichandran Kensho Tsuchihashi Cloe Walker
Skandiabanken
SE
As i mentioned earlier ,Yes, we can place Changestage smart shape in last step of current stage to move the case to next stage along with clearing the current assignments.
I would like to understand , Can't pega engine take care of the same (as deleting assignments) when case is navigated from one stage to another stage automatically ?. I see, System is passing CleanUpProcess parameter is blank in tracer .
-
Abhishek Sharma Cherry Faizi
Pegasystems Inc.
IN
Hi,
Can you provide more details about your case and stage configuration?
How have you configured parallel assignments?
Spinoff subprocess?
Parallel process in case designer?
If it is parallel process configured in Case designer, then we wait for all assignments to be completed before moving to next stage.
Skandiabanken
SE
We have situation to create task on demand, like whenever manager request users for additional document (local action) then task needs to be created for the users who doesn't have it. To achieve it , on submission of location action ,we are creating the assignments by staring the flow.
Design:
1) Two sub flows ,Assume SF1 and SF2 .
2) SF1 has an assignment for manager and it's configured with local action to request for additional documents.
3)SF2 is configured with Split For Each to create assignments for all users to upload the requested default documents as per business rule.
4) Two subprocess are being initiated parallelly through Split Join ( condition type : "Some" whenever SF1 reaches the certain flow status ,which is configured on End shape of SF1 then system deletes all assignments from SF2) ,It's expected and working fine. As Manager is ok to proceed with case without additional documents from users.
5) Concern here ,One or All users uploaded the default documents by submitting the tasks ,which gets created for them initially through SplitForEach .
We have situation to create task on demand, like whenever manager request users for additional document (local action) then task needs to be created for the users who doesn't have it. To achieve it , on submission of location action ,we are creating the assignments by staring the flow.
Design:
1) Two sub flows ,Assume SF1 and SF2 .
2) SF1 has an assignment for manager and it's configured with local action to request for additional documents.
3)SF2 is configured with Split For Each to create assignments for all users to upload the requested default documents as per business rule.
4) Two subprocess are being initiated parallelly through Split Join ( condition type : "Some" whenever SF1 reaches the certain flow status ,which is configured on End shape of SF1 then system deletes all assignments from SF2) ,It's expected and working fine. As Manager is ok to proceed with case without additional documents from users.
5) Concern here ,One or All users uploaded the default documents by submitting the tasks ,which gets created for them initially through SplitForEach .
By this time ,we have only one task in system which is available with manager and If manager still need more documents from users then he can take local action to request for additional documents from all users . To achieve this , On post submission local action, we are looping through users list and calling the subprocess which is configured in split for each shape to create the stand alone assignments for users.
Now, few users uploaded the documents and manager has decided to proceed with case further and the Case is moved to next stage but the remaining assignment of users who hasn’t taken action are still persist.
Just tried to place the pxchangestage shape explicitly to clean up the process but doesn’t work .
Skandiabanken
SE
rawap@, Any suggestion on above comments . I
have tried to use pxDeleteAssignment to delete the stale assignments at end of flow .It's deleting the stale assignment but the process flow is not moving forward with current assignment to next stage, just displaying the confirm Harness and Need to open it again and submit it to proceed further .
NFO | |
Step Status Info |
trying to calculate the handle of a class whose instances may not be written to the database: Work-: code: SQLState: Message: |
Skandiabanken
SE
Checked it in tracer . CleanUpProcess parameter is blank
Skandiabanken
SE
Seems , This issue is related to https://community.pega.com/support/support-articles/change-stage-shape-fails-remove-assignments
-
S MANOJ KUMAR REDDY
Skandiabanken
SE
Seems,ChangeStage api doesn't care about the assignments ,which are raised through spinoff and startflow activity .Any Work around for this ?
I tried to below approach as well but not successful .
Using pxDeleteAssignment ,Trying to delete one assignment (assume stale) on submission of other assignment. The stale assignment is getting deleted successfully but current assignment is not moving to next stage or to next assignment. By default It's showing up the confirm harness ,hence we need to open the case again to proceed further.
and I’m passing param.commit is false. It’s being invoked from flow utility before end shape of the flow.
I see, Below flow message Info in tracer after completion of pxDeleteAssignment activity .
trying to calculate the handle of a class whose instances may not be written to the database: Work-: code: SQLState: Message
Accepted Solution
Pegasystems Inc.
IN
Ok Thanks for explaining scenario in detail.
I see below options here.
Option 1: call pxDeleteAssignmentsForWork activity to cleanup all flows/assignments that were instantiated through StartFlow activity (which is not a best practice :))
Option 2: Why don't you create Optional process instead of Local action for Manager to perform where first assignment will be to manager (with same flow action as local action) and then split for each doing the same thing that you are doing the activity. With this approach you will need to call pxChangeStage explicitly.
Option 3: Use tickets. Set ticket on end shape of the subprocess that you are starting through activity and Raise ticket when manager finishes his assignment.
Let us know if this help :)
-
Amit Narula
Skandiabanken
SE
option 1 ; This option doesn't work in our case as needed to delete particular assignment on fly. Despite of successfully deletion of assignment, Ended up with other issue as mentioned above .
Option 2:
- First, Optional process is restricted to stage level ,Hence needed additional conditions to control the visibility of it when the same user has other tasks on same stage .
- Major concern with optional process in this situation ,The Task gets created as soon as operator initiates an optional process.Let's assume the situation where operator just click on cancel on task as he don't want to proceed with optional process ,therefore we ended up with an additional task Optional process isn't flexible as having with local action untill needed additional task for different user (through an assignment or Case )
Option 3:- Ticket approach is Perfect resolution in our case rather than my own work around approach as keep the wait shape and play around with work status .
Thanks a lot for your suggestions.