AnsweredAssumed Answered

Query for boundary message event does not work

Question asked by kiyer on May 30, 2013
Latest reply on Jun 10, 2013 by frederikheremans1
I am using activiti currently in the test setup to get acquainted. The out of the box config has been set to the H2 in memory database.
I have created a message boundary event for one of my subprocesses. In BPMN it is defined as:

<definitions xmlns="" xmlns:xsi="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" typeLanguage="" expressionLanguage="" targetNamespace="">
  <message id="cancelRenewal" name="cancelRenewal"></message>
  <process id="signupWorkflow" name="Sugarsync Signup Process" isExecutable="true">

     <boundaryEvent id="boundarymessage1" name="Message" attachedToRef="subprocess1" cancelActivity="true">
        <messageEventDefinition messageRef="cancelRenewal"></messageEventDefinition>
I have plugged in a java service task where i wish to send a message to cancel this process:
RuntimeService runtimeService = execution.getEngineServices().getRuntimeService();
String executionId = runtimeService.createExecutionQuery().messageEventSubscriptionName("cancelRenewal").singleResult().getId();
Unfortunately I get a nullpointerException because
[/java] returns null.
Any idea if I am doing something wrong here? or is it a bug?