53. How to remove property from Mule flow?
Removing properties that you don’t need is a common operation.
<remove-property propertyName="temp.productId" /> <remove-property propertyName="temp.customerId" /> <remove-property propertyName="products.totalValue" />
54. How to remove multiple properties from Mule flow?
If the keys of the properties follow a name convention, it might be useful to delete groups of properties. The remove-property operation lets you do it easily with a wildcard or a regular expression as key.
<remove-property propertyName="temp.*" /> <remove-property propertyName="products*" />
55. How to add property to endpoint in Mule flow?
If you need to set properties that might arrive at the next endpoint, you need to use the set-property element.
<set-property propertyName="Content-Type" value="application/vnd.ms-excel" /> <set-property propertyName="Content-Disposition" value="attachment; filename=products.csv" />
56. How to add property to endpoint in Mule flow?
You may also need to rename an existing property.
<set-property propertyName="book.isbn" value="#[message.outboundProperties['product.productid']]" /> <remove-property propertyName="product.productid" />
57. How to copy a property from inbound to outbound scope?
<copy-properties propertyName="ProductKeyRequestId" />
58. How to add a variable in the flow?
<set-variable variableName="productVariable" value="Value or expression" />
59. What is auto-transformer?
As its name suggests, this transformer is able to apply the desired transformation automatically. It selects the most appropriate transformer based on the return class that you specify on its declaration
<auto-transformer returnClass="com.roytuts.mule.statistics.ActivityReport" />
The auto-transformer can only select transformers that are discoverable. It works better with custom objects instead of generic ones like strings or byte arrays.
60. Can two mule services listen to the same VM queue? If so give an example of this?
You can have two Mule services listen on the same VM queue but only if the VM endpoint really is a queue.
By default VM is synchronous and therefore the endpoints are not queues but merely a direct point-to-point mechanism for communication. In this case, you can have only one listener for each Mule endpoint.
If you set VM to be asynchronous, the endpoints will be queues. Like any other queues, you can have multiple listeners on the same queue.
To set VM to be asynchronous, all you need to do is set the queueEvents attribute in the connector.
<vm:connector name="vmConnector" queueEvents="true"/>