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
package org.mule.message; | |
import com.eaio.uuid.UUID; | |
import java.io.Serializable; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class GenericMessage<T> implements MuleMessage, Serializable | |
{ |
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
<choice-exception-strategy name="myReusableES"> | |
<catch-exception-strategy when="#[exception.causedBy(org.my.BusinessException)]"> | |
<set-payload message="Error occurred processing order: #[exception.message]"/> | |
</catch-exception-strategy> | |
<rollback-exception-strategy maxRedeliveryAttempts="3"> | |
<logger level="DEBUG" message="Message rolled back"/> | |
<on-redelivery-attempts-exceeded> | |
<jms:outbound-endpoint queue="DLQ"/> | |
</on-redelivery-attempts-exceeded> | |
</catch-exception-strategy> |
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
<mule> | |
<configuration> | |
<expression-language autoResolveVariables="false"> | |
<import name="loc" class="java.util.Locale" /> | |
<alias name="appName" expression="app.name" /> | |
<global-functions file="org/mule/test/el/functions.txt"> | |
def hello() {'Hello '+appName+'!'} | |
</global-functions> | |
</expression-language> | |
</configuration> |
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
<set-payload value="Order: #[message.inboundProperties['id']] Created"/> | |
<parse-template file="emailTemplate.txt" /> |
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
<set-property propertyName="Content-Type" value="test/html" /> | |
<remove-property propertyName="MULE_*" /> | |
<copy-property propertyName="*" /> |
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
<set-variable variableName="tzString" value="Timezone is #[server.timeZone]" /> | |
<remove-variable variableName="tzString" /> |
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="createOrder" > | |
<http:inbound-endpoint address="http://localhost/api/order" /> | |
<component class="org.my.CreateOrderComponent" /> | |
<http:response-builder status="201" contentType="text/plain"> | |
<http:location value="#[http.context.uri]/#[orderID]"/> | |
<set-payload value="Order #[orderID] added."/> | |
</http:response-builder> | |
<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
<configuration> | |
<expression-language> | |
<import class="org.mule.util.StringUtils" /> | |
<alias name="in" expression="message.inboundProperties" /> | |
<global-functions file="shared-functions.txt"> | |
def reverse() {StringUtils.reverse(payload)} | |
</global-functions> | |
</expression-language> | |
</configuration> |
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
<enricher target="payload.customer" > | |
<mongodb:find-one-object collection="customers" query="#[message.inboundProperties['http.query.params']['customerId']" /> | |
</enricher> |
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
<choice> | |
<when expression="#[server.locale.country=='UK' and message.inboundProperty['fileSize'] < 1024"> | |
<set-variable variableName="priority" value="1"/> | |
</when> | |
<when expression="#[server.locale.country=='US' and xpath('count(/order/items)') > 1"> | |
<set-variable variableName="priority" value="2"/> | |
</when> | |
</choice> |
NewerOlder