This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<jms:activemq-connector name="jmsConnector" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="approve-flow"> | |
<jms:inbound-endpoint queue="approveQueue" /> | |
<activiti:set-variable executionIdExpression="#[groovy:payload.id]" | |
variableExpression="#[string:approvedBy]" valueExpression="#[header:INBOUND:username]" /> | |
<activiti:signal executionIdExpression="#[groovy:payload.id]" /> | |
</flow> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="tweet-from-activiti"> | |
<vm:inbound-endpoint path="tweetFromActiviti" exchange-pattern="request-response" /> | |
<twitter:update-status status="#[payload]"/> | |
</flow> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<definitions | |
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" | |
xmlns:activiti="http://activiti.org/bpmn" | |
targetNamespace="Examples"> | |
<process id="processOrderWithTweetPublish" > | |
<startEvent id="theStart" /> | |
<sequenceFlow sourceRef="theStart" targetRef="processOrderAndTweet" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<twitter:config name="twitter" format="JSON" | |
consumerKey="Ng3f..." consumerSecret="PMjQVRew..." | |
oauthToken="296154332..." | |
oauthTokenSecret="fsdf..."/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<definitions | |
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" | |
xmlns:activiti="http://activiti.org/bpmn" | |
targetNamespace="Examples"> | |
<process id="processLead" > | |
<startEvent id="theStart" /> | |
<sequenceFlow sourceRef="theStart" targetRef="createSalesforceContact" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="create-contact"> | |
<vm:inbound-endpoint path="createSalesforceContactFromActiviti" exchange-pattern="request-response" /> | |
<custom-processor class="org.mule.module.activiti.SplitAndSetFieldsProcessor" /> | |
<sfdc:create type="Contact"> | |
<sfdc:sObject> | |
<sfdc:field key="FirstName" value="#[header:OUTBOUND:FirstName]"/> | |
<sfdc:field key="LastName" value="#[header:OUTBOUND:LastName]"/> | |
<sfdc:field key="Email" value="#[header:OUTBOUND:Email]"/> | |
<sfdc:field key="Title" value="#[header:OUTBOUND:Title]"/> | |
<sfdc:field key="Phone" value="#[header:OUTBOUND:Phone]"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SplitAndSetFieldsProcessor implements MessageProcessor | |
{ | |
private static String[] fields = new String[] {"FirstName", "LastName", "Email", "Title", "Phone"}; | |
public MuleEvent process(MuleEvent event) throws MuleException | |
{ | |
String[] values = event.getMessageAsString().split(","); | |
for (int i = 0; i < values.length; i++) | |
{ | |
String value = values[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<definitions | |
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" | |
xmlns:activiti="http://activiti.org/bpmn" | |
targetNamespace="Examples"> | |
<process id="processOrder" > | |
<startEvent id="theStart" /> | |
<sequenceFlow sourceRef="theStart" targetRef="waitState" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AddAttachmentMessageProcessor implements MessageProcessor | |
{ | |
@Override | |
public MuleEvent process(MuleEvent event) throws MuleException | |
{ | |
Collection<Attachment> attachments = new ArrayList<Attachment>(); | |
AttachmentImpl attachment = new AttachmentImpl("1"); | |
String attachmentXML = ""; | |