AnsweredAssumed Answered

how to fire the servicetask2

Question asked by harlin-none on Jan 25, 2016
Latest reply on Jan 27, 2016 by harlin-none
I want to execute servicetask2, but I don`t know how to make it happen, there have a message boundary event

xml:

<process id="messageBoundaryEvent" name="My process" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <serviceTask id="servicetask1" name="Service Task" activiti:class="com.lin.activiti.delegate.MessageDelegate"></serviceTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow>
    <boundaryEvent id="boundarymessage1" name="Message" attachedToRef="servicetask1" cancelActivity="false">
      <messageEventDefinition messageRef="messageEvent"></messageEventDefinition>
    </boundaryEvent>
    <serviceTask id="servicetask2" name="Service Task" activiti:expression="#{printer.printMessage('task has benn message triggered.')}"></serviceTask>
    <sequenceFlow id="flow2" sourceRef="boundarymessage1" targetRef="servicetask2"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow3" sourceRef="servicetask2" targetRef="endevent1"></sequenceFlow>
    <endEvent id="endevent2" name="End"></endEvent>
    <sequenceFlow id="flow4" sourceRef="servicetask1" targetRef="endevent2"></sequenceFlow>
  </process>

Outcomes