AnsweredAssumed Answered

Query signals/messages attached to current task

Question asked by jsalmon on Aug 17, 2015
Latest reply on Aug 19, 2015 by trademak
Hi,

I'm trying to query the signals/messages attached to the current active task in my workflow (I only have a single task active at any time). However, each task may have one or more signals attached to it.

How can I query those signals without knowing their names in advance?

I found a way to do this, but using a non-public API:


Task task = taskService.createTaskQuery().processInstanceBusinessKey(request.getRequestId()).active().singleResult();

CommandExecutor executor = ((ProcessEngineConfigurationImpl) ProcessEngines.getDefaultProcessEngine().getProcessEngineConfiguration()).getCommandExecutor();

List<EventSubscriptionEntity> events = new EventSubscriptionQueryImpl(executor).processInstanceId(task.getProcessInstanceId()).list())


Is there any way I can do this with public API? I know about
ExecutionQuery.signalEventSubscriptionName()
, but that requires knowing the signal names beforehand.

Cheers,
Justin

Outcomes