Newbie Model - getting to grips with MessageEvents and Signal Events

Hello folks;

I am working on the following model and i am having issues getting my head around it and I’m looking for feedback.

The main issue i am having is that i want to start a process with a “Business Key” and have access to this key thoughout my process.

My first attempt looks like this.
processEvents.bpmn (15.3 KB)

I have a pool with several lanes and i have the work done by the User roles assigned to the lanes.
I ended up with “message throw and start events” as i couldnt get my messages to correlate when they were modeled as “throw and catch” events or “send & recieve tasks” when they were joined directly by a sequence flow like this.

The Send Task / Throw Event was using a java delegate and it was here in the delagate that i was trying to correlate the message, however it was never found. If i understand correctly it is because correlation looks for a waiting execution or a a start event to create a new one; at the time I tried to correlate the message in the java delagate the message task / catch event wasn’t even created yet.

So I removed the sequence flow and used a start event and it worked, additionally message correlation lets me pass the business key along the chain of processes which is what i want.

I then experimented with signals and discovered that the passing of data between signal throw & catch/start events isnt supported in the modeller and that the API has to be used. Upon trying this i find myself with the issue of always broadcasting the signal as i dont know which process is waiting for the signal.

I believe this is an issue in my model, essentially what i have created here is a pool with three lanes and four seperate processes modeled inside the lanes and at runtime it seems each process seem to get a separate ExecutionId.

Any pointers or ideas would be welcome.

Create 3 pools instead of 1 pool with 3 lanes.

Each pool will act as a different process definition (you need to configure each pool).

Lanes do not have any technical function in the Camunda(7.7). They are purely for visual separation.

Also from what i read in other posts from the camunda team, messaging within the same process seems to be problematic, so try and avoid that.

Here is a example you can build from:

use_case_interprocess_messages.bpmn (7.6 KB)

Also: What is your use case for using messages? Based on your model it does not look like you need messages or signals.

1 Like

@StephenOTT, thanks!

I had considered that as away of modeling the message flows between the pools but I was hoping to somehow model this as one process.
As changing the lanes to pools means that i have to use message flows to communicate between the pools i guess my requirement of maintaining the business key works as i can pass it along.

I’ll give it a go!

Is there issues with doing something like this?

Or you can use lanes if you feel it adds something to the visual:

And of course you could combine the Log tasks into one and use a process variable to track the state of the sub-process (completed successfully or as a timer expired.

I believe i need to use messages and so i require seperate threads or pools. The process will be started by an external service which then notifies the Engine to start the process.

Then internally the different user roles need to do their pieces of the process and communicate with each other.

I have started to model the process using seperate pools and im excited to see how it turns out.

@patrick.corbett you could change your start event to a Message Start event. So you can message camunda and it will start the process.

Hi @StephenOTT, my problem isn’t as such getting the process started, i have that covered. I was looking for general comments on the model, Your idea to use three separate pools works similar to my initial model with the added bonus that all communication is being done through MessageEvents/Message Flows. This communication is now visible in the BPMN whereas when i had everything in lanes there was no clearly modelled correlation in the BPMN Diagram of how or what was being commincated.