cancel
Showing results for 
Search instead for 
Did you mean: 

Query Signals/EventSubscriptions from api

jlew
Champ in-the-making
Champ in-the-making
Is it possible to query the event subscriptions for an execution using one of the the apis.  I know the executionQuery of the runtime service allows us to filter executions that are waiting for a named signal provided you know the signal you want to filter.  How would you go about getting a list of signals a processInstance (or execution) is waiting on or get the signal name it is looking for?

I am trying to generate a reporting/debugging script that allows us to inspect a running workflow and I would like to use the Activiti apis instead of going directly to the database.

Thanks
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
No, there is nothing (publicly) exposed. I believe there is an inner class though (EventSubscriptionQueryImpl) that might be used to base your use case on.

jlew
Champ in-the-making
Champ in-the-making
Not as clean as I would like but thank you, this gets what I need.

For those looking for something similar to this:


String instanceId = "10335";
ProcessEngineConfiguration config = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
ProcessEngine processEngine = config.buildProcessEngine();

List<EventSubscriptionEntity> o = new EventSubscriptionQueryImpl(((RuntimeServiceImpl)processEngine.getRuntimeService()).getCommandExecutor()).processInstanceId(instanceId).list();