Using Mule task to send messages from Activiti to Mule

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2013 05:17 PM
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.
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.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2013 06:39 AM
<blockcode>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?</blockcode>
Yes, indeed. If you want to communicate using HTTP/webservices you need the 'regular' tasks for that not the mule task.
Yes, indeed. If you want to communicate using HTTP/webservices you need the 'regular' tasks for that not the mule task.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2013 11:20 AM
Thanks, Joram.
I just wanted to confirm that.
Anna Y.
I just wanted to confirm that.
Anna Y.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2014 03:57 AM
Hi guys,
I'm trying to get a working example up and running under the same scenario (activiti and mule running on different JVMs).
You can have a look at my BPMN process in the helloMule file attached.
and at one point from my application I'm calling:
Map<String, Object> variableMap = new HashMap<String, Object>();
variableMap.put("var1", "hello");
variableMap.put("anotherVar", "aloha");
runtimeService.startProcessInstanceByKey("helloWorldMule", variableMap);
but I get an exception org.activiti.engine.ActivitiException: Failed to read response value
I don't know if I'm doing something wrong in my BPMN process or if the Mule flow is doing something wrong.
Any help with this would be greatly appreciated.
Thank you.
I'm trying to get a working example up and running under the same scenario (activiti and mule running on different JVMs).
You can have a look at my BPMN process in the helloMule file attached.
and at one point from my application I'm calling:
Map<String, Object> variableMap = new HashMap<String, Object>();
variableMap.put("var1", "hello");
variableMap.put("anotherVar", "aloha");
runtimeService.startProcessInstanceByKey("helloWorldMule", variableMap);
but I get an exception org.activiti.engine.ActivitiException: Failed to read response value
I don't know if I'm doing something wrong in my BPMN process or if the Mule flow is doing something wrong.
Any help with this would be greatly appreciated.
Thank you.
