How to transfer an assignment from WB to WL directly from Portal
I need help to solve an issue faced while developing the solution mentioned in the subject.
Users open their dashboard and view the case inside workbaksets. Apart from columns populated with case info, we have added for each row a Take button to allow users to transfer an assignment to their worklist and contextually open it in perform.
This is how our solution for the Take button should work:
Click on the Take button
On click event triggers this actions
Set focus on current item
Launch an activity which set the context and recalls the pxTransferAssignment, to transfer the assignment from workbasket to user’s worklist
Open assignment (Key equals to .pzInsKey)
The case is opened in Perform harness
While steps 2.a and 2.b work without problems, the Open assignment is still referencing the old .pzInsKey (ASSIGN-WORKBASKET! Instead of ASSIGN-WORKLIST!).
Obviously the application tries to open the assignment and the error message
“Unable to open an instance using the given inputs: ASSIGN-WORKBASKET ABC-FW-XYZFW-WORK ID-170905-000021!VERIFICATION”
If we open in review the case we just see that it has just been routed correctly to the user’s worklist.
The question is: what do we have to change or set in our solution to ensure that “Open Assignment” action references the right (new) .pzInsKey?
Thank you very much,
***Updated by moderator: Lochan to add Categories***
Dont see an issue with above approach, may be the trace would help. But I would suggest using MoveToWorklist activity in the Assign- class. so that there is no need to set the context again. it will delete the record from workbasket table and creates the assignment in Worklist table. this OOTB activity takes care of locking the object and opening it in perform.
Well, the real problem is not the transfer to Worklist but the opening of the assignment from dashboard after it has been moved to user's worklist.
The record on the dashboard seems to be stale, as the pzInsKey is not reloaded at all. Otherwise, using MoveToWorklist does not work, as the pzInsKey referenced is strangely the one of the case with previous Case ID, for example if I am trying to open ASSIGN-WORKLIST-002, the application opens ASSIGN-WORKLIST-001.
Our workaround is to replace directly in a custom GetMyWorkBasket report definition the word WORKBASKET with WORKLIST and reference the pyTextValue from the Open Assignment action: now it seems to work correctly.