AnsweredAssumed Answered

Suspend and resume processinstance based on runtime conditions

Question asked by rajivmoghe on Apr 10, 2016
Latest reply on Apr 12, 2016 by jbarrez
In my process, I need to make a call to an external service. I know that this service requires 4 (non-null) values to be passed to it, let's say A, B, C, D. It is possible that these 4 values may be already available as (non-null) process variables. On the other hand, sometimes, some of these may be null.

To make things easier for the business user I plan to use the Single Service Task approach mentioned in the article at http://long-running.net/blog/2015/should-asynchronous-service-invocations-be-visible-in-a-bpmn-diagram and the Req/Acl/Callback pattern.

This works great with the assumption A, B, C, D are present, while using a class that extends AbstractBpmnActivityBehavior, but I need the following additional functionality:
  1. If either of the parameters A, B, C, D are null, pause the processinstance, and create a task for the user that will ask for the null params.
  2. Once the params are provided in the task, the processinstance resumes its execution with all values, makes a service call, and waits for the callback to be called.

  3. Question: can this even be done? If yes, any pointers please…

Outcomes