Resolution stage assignment cleanup assumes case persisted
SummaryWhen a case is created which takes a path that does not create an assignment, and the resolution stage is configured to "Delete open assignments upon resolution", the case execution because the activity that performs the assignment deletion issues a Obj-Open-By-Handle to load the work item, which hasn't been persisted yet (because it has never come to rest).
Error MessagesUnable to open an instance using the given inputs: [case-key]
Steps to Reproduce
- Create a case, modelling multiple stages. In our case, we have 4 stages.
- In the final stage, configure it as a resolution stage and tick the box labelled "Delete open assignments upon resolution"
- Create a draft mode flow on the same class as the case created in #1. This flow sets some case data before using the Change Stage smart shape to jump directly to the 3rd stage, allowing the process to continue as per the remainder of the case design logic for the final 2 stages.
- Observe: the case data set by the draft mode flow should be such that no assignments are created in the final 2 stages. Alternatively this should be recreatable by having steps in the final 2 stages that have only utility shapes, and the draft mode flow has only the Change Stage shape in it.
- Run the draft mode flow.
This creates the case, sets some data, jumps to Stage 3, incurs only utility shapes, moves on naturally to Stage 4 (the resolution stage), again incurs only utility shapes, before triggering the case resolution logic.
pxDeleteAssignmentsForWork attempts to perform housecleaning when resolving case, by calling Obj-Open-By-Handle for current WO id. But no WO id was persisted which causes failure.
Published November 4, 2016 - Updated November 11, 2016