JBoss Community

Re: StatefulKnowledgeSession signalEvent method

created by Geoff Pole in jBPM - View the full discussion

Hi,

 

In case this helps others.

 

I had this slightly backwards. It wasn't the second signal event call that was making the ProcessInstancesWaitingForEvent run. Instead this query appears to run every time a process enters and 'End' node. Presumably it does this so that it can find any workflows that may be listening for an End event.

 

I don't know the reason why the ProcessInstancesWaitingForEvent runs so slowly (Oracle 11g) when there are many workflow instances that are waiting for events, but I did find that by applying this index reduced the running time from around 45 seconds to under 1 second with 20000 workflow instances.

 

CREATE unique INDEX  idx_eventtypes_id_elem

   ON EventTypes (instanceid, element)

 

I tested this up to 100000 workflow instances and the query still runs sub second.

 

Cheers,

 

Geoff

Reply to this message by going to Community

Start a new discussion in jBPM at Community