cancel
Showing results for 
Search instead for 
Did you mean: 

sending signal doesn't activate process

ms1
Champ in-the-making
Champ in-the-making
Hello All,

I am working on a new process which will have a timer (the user specifies when an event will run) and also has the ability for the user to run the event now instead of waiting for the scheduled time. So, the user would schedule a time, decide to run it before then and the process should continue now.

I found what sounds like a perfect fit with the event-based gateway : http://www.activiti.org/userguide/#bpmnEventbasedGateway
and I am doing this flow.

However, when I send the signal programmatically with RuntimeService.signalEventReceived(…), nothing happens. What I am expecting to happen is that the timer event is cancelled and the process continues. I tried this method with the specific execution ids and even with no execution id which should signal all processes waiting for this event.
I checked the db and see the entry in ACT_RU_EVENT_SUBSCR, so I know that it the process is running and waiting.

Does anyone have an idea why this isn't working?
Thanks,
Mark
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Mark,

It is hard to guess. May be you could create jUnit test to reproduce the issue.
You can have a look on org.activiti.engine.test.bpmn.gateway.EventBasedGatewayTest jUnit tests to see how event based gateway works too.

Regards
Martin

ms1
Champ in-the-making
Champ in-the-making
What I ended up doing is changing this to a message and it worked. I modified the diagram to add a message definition and changed the call from RuntimeService.signalEventReceived(…) to the equivalent RuntimeService.messageEventReceived(…) and it worked as expected. The process continues as soon as the message is sent.

I don't know why there is a difference, but this is working for me.