Hi,
The following code works:
Execution execution = runtimeService.createExecutionQuery()
.messageEventSubscriptionName(“someSubscription”)
.singleResult();
runtimeService.messageEventReceived(“someSubscription”, execution.getId());
But this one results in a NPE on messageEventReceived line:
(the process was started using this business key)
runtimeService.createExecutionQuery().processInstanceBusinessKey(“SomeBusinessKey”)
.messageEventSubscriptionName(“someSubscription”).singleResult();
runtimeService.messageEventReceived(“someSubscription”, execution.getId());
The following code works, so the business key is correct:
ProcessInstance anInstance = runtimeService.createProcessInstanceQuery().processInstanceBusinessKey(“SomeBusinessKey”).singleResult();
System.out.println(anInstance.getId());