0 votes
18 views
ago by (30.6k points)
Sometimes an instance is stuck: the token sits on a step that will never complete, or the instance took a wrong branch because of bad data. What can an administrator do without terminating the instance, and can it be scripted?

1 Answer

0 votes
ago by (30.6k points)

Process Inspector (Process Admin, and the Process Designer's inspector on Process Center) exposes token-level repairs; each has a REST equivalent so that repairs can be scripted and audited:

GET /rest/bpm/wle/v1/process/2072.345?parts=executionTree,data
-> executionTree.root.children[] : { tokenId: "2", name: "Approve order", createdTaskIDs: ["2078.911"], ... }
PUT /rest/bpm/wle/v1/process/2072.345?action=retry&parts=none
PUT /rest/bpm/wle/v1/process/2072.345?action=moveToken&tokenId=2&target=bpdid:2025.abc.../2.e3b1...&resume=true&parts=none
# target = the step id ("flow object id") from the execution tree / the BPD; resume=true lets the instance continue immediately
  • Inspect - the execution tree shows every token, its step and the tasks it created; the variables tab shows the data.
  • Retry a failed step (after fixing the external cause) - re-executes the step with its input data.
  • Fix data - edit variables of the instance in Process Inspector's variables view (a JSON replacement; not validated against the business object, so change only what you must).
  • Move the token - take the token off the stuck step and place it on another step of the BPD (an earlier step to redo work, or a later one to skip): the stuck task is cancelled and the target step is executed as if reached normally.
  • Delete a token (parallel branch that will never end) or add a token at a step - the same resource with the delete-token and add-token actions of Process Inspector.
  • Suspend / resume / terminate for the whole instance.

Precautions: suspend the instance before repairs (action=suspend) so that timers do not fire in between; take a note of the execution tree before changing it (audit); moving a token skips the business logic between the steps - fix the data that those steps would have set; parallel gateways need matching tokens on every branch or the join never fires; and repairs are not migration - if many instances are stuck for the same reason, fix the snapshot and migrate instances rather than repairing one by one. Operators should get these actions through an administration dashboard (a coach calling the same REST resources with confirmations and logging) instead of Process Inspector, so that repairs are consistent and traceable.

References

Related questions

723 questions

807 answers

98 comments

4.8k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...