cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic signal name?

meweiss
Champ in-the-making
Champ in-the-making
Hello,

I am wondering if it is possible to dynamically set the id of a signal.

Example scenario: Let's say an employee gets fired. All other instances which were started by this employee need to be cancelled. The firing instance throws out a signal. All other instances need to catch the signal and check if they were started by the same employee. I want that signal id to contain the name of the employee ("Bob-fired-event") so we can check it in the BPMN itself (as opposed to the users having to save state somewhere and find the instances outside of the process).

It doesn't look like MessageThrowingEvents are a thing, otherwise you could include the employee id as the payload of the message and catch that.
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I would change it little bit.
Signal name: employee-fired
Signal variables: employee-id, date…..

I would not put all signal catch events to all process models - It will make models unreadable.
I would create one process model which will catch this signal and take consequent actions (delete/cancel processes….)

Regards
Martin

sponomarev
Champ in-the-making
Champ in-the-making
Is it possible to use BPMN event subprocess with Activiti? After reading user guide it looks like it is not implemented.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

following test could show you an example and limitations:
org.activiti.engine.test.bpmn.event.message.MessageEventSubprocessTest
Regards
Martin