cancel
Showing results for 
Search instead for 
Did you mean: 

signalEventReceived() does nothing

filajupiter
Champ in-the-making
Champ in-the-making
My process consists of an eventBasedGateway followed by 3 intermediateCatchEvent.
The signals are process instance scoped.
By calling signalEventReceived with a correct signal name and executionId (no exception raised), I'm expecting the process to continue flowing.

However, nothing happens. No changes to the db at all. No update sql is generated.
Here is the log. What could go wrong?

2016-01-27 00:38:17.120 DEBUG - — starting SignalEventReceivedCmd ——————————————————– (o.a.e.i.interceptor.LogInterceptor:34) [main]
2016-01-27 00:38:17.120 DEBUG - Running command with propagation REQUIRED (o.a.s.SpringTransactionInterceptor:40) [main]
2016-01-27 00:38:17.120 DEBUG - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (o.s.j.d.DataSourceTransactionManager:367) [main]
2016-01-27 00:38:17.121 DEBUG - Acquired Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@21d5c1a0] for JDBC transaction (o.s.j.d.DataSourceTransactionManager:206) [main]
2016-01-27 00:38:17.121 DEBUG - Switching JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@21d5c1a0] to manual commit (o.s.j.d.DataSourceTransactionManager:223) [main]
2016-01-27 00:38:17.122 DEBUG - Opening JDBC Connection (o.a.i.t.managed.ManagedTransaction:82) [main]
2016-01-27 00:38:17.123 DEBUG - ooo Using Connection [Transaction-aware proxy for target Connection  from DataSource [{
   CreateTime:"2016-01-27 00:38:14",
   ActiveCount:1,
   PoolingCount:4,
   CreateCount:5,
   DestroyCount:0,
   CloseCount:4,
   ConnectCount:5,
   Connections:[
      {ID:1498016680, ConnectTime:"2016-01-27 00:38:15", UseCount:0, LastActiveTime:"2016-01-27 00:38:15"},
      {ID:1846539844, ConnectTime:"2016-01-27 00:38:15", UseCount:0, LastActiveTime:"2016-01-27 00:38:15"},
      {ID:1490985125, ConnectTime:"2016-01-27 00:38:15", UseCount:0, LastActiveTime:"2016-01-27 00:38:15"},
      {ID:707506411, ConnectTime:"2016-01-27 00:38:15", UseCount:0, LastActiveTime:"2016-01-27 00:38:15"}
   ]
}]] (o.a.e.i.p.e.E.selectExecution:132) [main]
2016-01-27 00:38:17.124 DEBUG - ==>  Preparing: select * from ACT_RU_EXECUTION where ID_ = ?  (o.a.e.i.p.e.E.selectExecution:132) [main]
2016-01-27 00:38:17.127 DEBUG - ==> Parameters: 2511(String) (o.a.e.i.p.e.E.selectExecution:132) [main]
2016-01-27 00:38:17.130 DEBUG - <==      Total: 1 (o.a.e.i.p.e.E.selectExecution:132) [main]
2016-01-27 00:38:17.131 DEBUG - ooo Using Connection [Transaction-aware proxy for target Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@21d5c1a0]] (o.a.e.i.p.e.E.selectSignalEventSubscriptionsByNameAndExecution:132) [main]
2016-01-27 00:38:17.132 DEBUG - ==>  Preparing: select * from ACT_RU_EVENT_SUBSCR where (EVENT_TYPE_ = 'signal') and (EXECUTION_ID_ = ?) and (EVENT_NAME_ = ?)  (o.a.e.i.p.e.E.selectSignalEventSubscriptionsByNameAndExecution:132) [main]
2016-01-27 00:38:17.136 DEBUG - ==> Parameters: 2511(String), 取消申请(String) (o.a.e.i.p.e.E.selectSignalEventSubscriptionsByNameAndExecution:132) [main]
2016-01-27 00:38:17.139 DEBUG - <==      Total: 1 (o.a.e.i.p.e.E.selectSignalEventSubscriptionsByNameAndExecution:132) [main]
2016-01-27 00:38:17.140 DEBUG - flush summary: 0 insert, 0 update, 0 delete. (o.a.engine.impl.db.DbSqlSession:608) [main]
2016-01-27 00:38:17.141 DEBUG - now executing flush… (o.a.engine.impl.db.DbSqlSession:609) [main]
2016-01-27 00:38:17.141 DEBUG - Closing JDBC Connection [Transaction-aware proxy for target Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@21d5c1a0]] (o.a.i.t.managed.ManagedTransaction:74) [main]
2016-01-27 00:38:17.142 DEBUG - Initiating transaction commit (o.s.j.d.DataSourceTransactionManager:755) [main]
2016-01-27 00:38:17.143 DEBUG - Committing JDBC transaction on Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@21d5c1a0] (o.s.j.d.DataSourceTransactionManager:269) [main]
2016-01-27 00:38:17.145 DEBUG - Releasing JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@21d5c1a0] after transaction (o.s.j.d.DataSourceTransactionManager:327) [main]
2016-01-27 00:38:17.146 DEBUG - Returning JDBC Connection to DataSource (o.s.jdbc.datasource.DataSourceUtils:327) [main]
2016-01-27 00:38:17.146 DEBUG - — SignalEventReceivedCmd finished ——————————————————– (o.a.e.i.interceptor.LogInterceptor:40) [main]
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
That sounds like it should do as you describe. Can you post the process definition XML so we can reproduce.

filajupiter
Champ in-the-making
Champ in-the-making
Yes. I have found out that it is by design for process scoped signals. I changed to global signals and it works.

emptyfruit
Champ in-the-making
Champ in-the-making
Hello. Can you please confirm and explain why signalEventReceived() is supposed to work only for global scoped signals? I can't see logic in it, and i was relying on this functionality. I can't see why if i'm triggering signal by execution id it is supposed to be global. I have a signalCatchingEvent in my process, which is successfully triggered by throwing signals inside the process. Obviously, i want them to target only this particular process. And now i want to add the posibility to simulate this situation from outside. I was sure that signaling particular execution through signalEventReceived() is exaclty what i need.

Or am i missing something?

jbarrez
Star Contributor
Star Contributor
Not sure I'm following … RuntimeService.signalEventReceived(String signalName, String executionId); does exactly that.