Event Subprocess groups user tasks under same pid

i have a simple process which signals another process that it can get started with creating a user task.
Since it’s a very simple process I decided to make use of the event subprocess so I have everything i need in 1 process only.
The problem is that the amount of tokens in the cockpit are not equal to the amount of opened user tasks.
It groups multiple user tasks together under the same process instance id. This is not the behaviour I would like. I attached the process in question.
What am I missing here? Why does it behave like this?

throwSignalTestProcess.bpmn (4.9 KB)

Can you explain in detail the exact requirement you have - the model you’ve posted is a little confusing.
Can you also expalin the relationship between this process and the process that triggers it?
I’m also interested as to why you’ve got a timer start event.

Sure, I am using a timer event because I need to periodically check for new db results.
If there is a new result, some service tasks are called which I removed in the dummy process and eventually a user task should be opened if a specific condition hits where the processed result can be viewed.
I would like to handle this UT in a separate process so I have 2 possibilities…creating a new process and then trigger this process with a message event (because I need to pass process variables to it) or I use a signal with a event based process which is the preferred method because then I only need 1 .bpmn-file.
I updated the .bpmn and attached a new version which is not so confusing.

throwSignalTestProcess.bpmn (6.5 KB)

Hi @logi,

a signal is a broadcast to all running process instances: https://docs.camunda.org/manual/7.14/reference/bpmn20/events/signal-events/.

You should go for another event type like message and seperate the processes into two pools (They could remain in a single diagram). Messages in BPMN have a one-to-one relationship: https://docs.camunda.org/manual/7.14/reference/bpmn20/events/message-events/

You have to call the message correlation api in your implementation of the message throw event or message throw task to start the user task process. https://docs.camunda.org/manual/7.14/reference/bpmn20/events/message-events/#message-api. There is a REST Api endpoint availabe as well: https://docs.camunda.org/manual/7.14/reference/rest/message/post-message/.

Hope this helps, Ingo

1 Like

Thank you, I somewhere read that I cant send a message from a process to the same process and should use signal instead. Also I still don’t know why the problem in post 1 described occurs :frowning:

Hi @logi,

Every time you start a new (super) process instance, the signal is received by all processes with unfinished user tasks.

As signal sending is your last activity, you can change to an interrupting signal start event. Then the user task is handled as clean up and the event subprocess could not be started a second time.

Hope this helps, Ingo

Hm, if I change it to a interrupting signal start event then the event sub-process is never being triggered. How so? I now understand I probably shouldn’t use a signal anyways but I am curious.