Event Subprocess FIFO

If I put an exclusive asynchronous continuation before an event Subprocess will the Subprocess be completed in a FIFO manner when multiple subprocesses are invoked? I am modelling a complicated FIFO process when the Job Executor may manage this for me.

Thanks.

Hey @Bill_Powell,

How is your event Subprocess triggered? The asynchronous before flag will just create a transaction in the Camunda Database but the Start event in the Event Subprocess will trigger it and invoke it.

So the order of the arriving start event will define the running order. I am not sure if that is what you are looking for? Maybe you could share an example BPMN ?

Cheers
Nele

Nele, the Subprocess is triggered by a message-start-event. The intention is that, during the course of the parent process, messages may arrive and their payloads are processed in sequence by order-of-arrival. I must ensure that one Subprocess is completed before the next is processed. I have attached a simple example.

Previously, I have been modeling a more complex approach which involves adding the payload to a collection and processing that collection within a loop. But that’s not scaling very well. SequentialUpdateSubprocess.bpmn (6.0 KB)

Hi @Bill_Powell ,

Kindly find attached a simplified running example.

  • Message start event is followed by a conditional intermediate catch event
  • callCount and completeIndex are defined as process instance variables and initialized to zero (execution listener for the none start event)
  • currIndex is defined as a local variable in the scope of the event sub-process and initialized to (callCount + 1) (execution listener for the start message)
  • callCount is incremented by 1 (execution listener for the start message)
  • completeIndex is incremented by 1 (execution listener for the last activity of the event sub-process)
  • #{currIndex == completeIndex + 1} is the condition expression of the conditional event


trigger-sequentially-process.bpmn (6.1 KB)

3 Likes

Here is my final version, in case anyone is interested. I wanted a single process that can be invoked whenever certain Events occur in my system. I also needed to ensure that those processes occur sequentially, based on arrival. One challenge was that it is not possible to send Local Variables to an event sub-process via a start-message, and this was not obvious at first. I am saving to local variables in a start-listener of the event sub-process. OrderUpdateRunnerV2.bpmn (16.6 KB)

2 Likes