Skip to content

Instantly share code, notes, and snippets.

<spring:beans>
<spring:bean id="shareOAuthStateTransformer" class="org.mule.aplicor.oauth.SharedOAuthTokenTransformer">
<spring:property name="objectStore" ref="_defaultUserObjectStore" />
</spring:bean>
</spring:beans>
#[message.inboundAttachments['foo.txt']]
<flow name="multi-attachment-exampleFlow1" doc:name="multi-attachment-exampleFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<foreach collection="#[message.inboundAttachments]" doc:name="Foreach">
<logger message="#[message.inboundAttachments['payload']]" level="ERROR" doc:name="Logger"/>
</foreach>
</flow>
<google-calendars:batch-insert-event
calendarId="#[variable:googleUser]"
calendarEvents-ref="#[variable:newEvents]"
accessTokenId="#[variable:tokenId]"
config-ref="google-calendars"/>
<google-calendars:batch-update-event calendarId="#[variable:googleUser]" calendarEvents-ref="#[variable:updateEvents]" accessTokenId="#[variable:tokenId]" config-ref="google-calendars"/>
<google-calendars:batch-delete-event
calendarId="#[variable:googleUser]"
calendarEvents-ref="#[variable:deletedEvents]"
accessTokenId="#[variable:tokenId]"
config-ref="google-calendars" />
<google-calendars:batch-insert-calendar calendars-ref="#[variable:newCalendars]" />
<google-contacts:batch-contacts config-ref="google-contacts" accessTokenId="#[variable:tokenId]">
<choice>
<when expression="payload.inserts.size() &gt; 0">
<google-contacts:batch-insert
operationId="newContacts"
entries-ref="#[payload.inserts]"
config-ref="google-contacts"
accessTokenId="#[variable:tokenId]" />
</when>
<otherwise>
<google-spreadsheets:set-row-values config-ref="google-spreadsheets"
spreadsheet="My Accounts" worksheet="Accounts">
<google-spreadsheets:rows ref="#[payload]" />
</google-spreadsheets:set-row-values>
<flow name="createTask">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost"
port="${http.port}" path="createTask" />
<custom-transformer class="org.mule.sample.CreateTaskConnector" />
<google-tasks:insert-task config-ref="Google_Tasks_Connector" />
</flow>