5
votes

I want to model a process that can be initiated by receipt of a message (which will be done via a REST call). The process will lead to a task that is assigned to a user. The user will supply some extra information and then the process will terminate.

However, I also want to model the case when additional information is received after the first info has been received. Receipt of this extra information via REST should terminate the process.

This overall model represents a computer system that monitors a flow of information and if it detects a problem it creates a task for someone to investigate. However if further information becomes available, the the task should've terminated.

What is the best way of modelling this in BPMN and Camunda please?

What I have at the moment:

(MSE) --> (UT) -->(TEE)
          (RT) --> (TEE)


Where:

MSE = Message Send Event
UT = User Task
TEE = Termination End Event
RT = Receive Task

I can successfully start/add a process for using curl to post a message representing the start message. This adds a process and the task is allocated to a user.

However, I don't seem to be able to get the receive task to correlate with the process, it just seems to add a new process. The cancel message that the receive task is supposed to represent should specifically cancel the particular process that it exists in, not any old process.

1
Apologies, I didn't have the exact details to hand when I posted, I've posted them now.John

1 Answers

5
votes

There are different ways to model this.

You could use an interrupting boundary message receive event and if the extra info was received the user task is canceled by the boundary event.

enter image description here

Another approach would be to use an interrupting event sub process. If the message with the extra information was received the event sub process is triggered and will cancel the process.

enter image description here

You could also use a parallel gateway and a terminate end event. But I would recommend one of the methods above-mentioned.