AnsweredAssumed Answered

Using Mule task to send messages from Activiti to Mule

Question asked by annayudkovsky on Apr 15, 2013
Latest reply on Apr 16, 2013 by annayudkovsky
Hello,

In our project we are using Activiti 5.11 and Mule ESB 3.0. Both are running in separate JVMs.
We are trying to figure out communication piece right now.

As I understand from reading documentation and “Activiti in Action” book in the standalone setup (separate JVMs)
-   Mule ESB communicates with Activiti Engine using Activiti REST API calls;
-   Activiti needs to use web service task or JMS queues to communicate with Mule.

Here is Activiti configuration with Mule task (from Activiti in Action book Chapter 11) :

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:activiti="http://activiti.org/bpmn"
  targetNamespace="http://www.bpmnwithactiviti.org">

  <process id="helloWorldMule">
    <startEvent id="theStart" />
    <sequenceFlow sourceRef="theStart" targetRef="sendMule" />
    <sendTask id="sendMule" activiti:type="mule">
      <extensionElements>
       <activiti:field name="endpointUrl">
         <activiti:string>vm://in
       </activiti:field>
       <activiti:field name="language">
         <activiti:string>juel
       </activiti:field>
       <activiti:field name="payloadExpression">
         <activiti:expression>${processVariable1}
       </activiti:field>
       <activiti:field name="resultVariable">
         <activiti:string>processVariable2
       </activiti:field>
      </extensionElements>
    </sendTask>
    <sequenceFlow sourceRef="sendMule" targetRef="theEnd" />
    <endEvent id="theEnd" />
  </process>
</definitions>

Is it correct to assume that activity-type = “mule” for the sendTask in the example above is only relevant for embedded configurations when Activiti and Mule are in the same JVM?

Thanks,
Anna Y.

Outcomes