Is it possible to use mule message properties (like payload and flowvars) in a Mule Management Console notification body or subject?
I think it's not possible.
You can only use the properties exposed by mule, as explained here:
http://www.mulesoft.org/documentation/display/current/Defining+SLAs+and+Alerts#DefiningSLAsandAlerts-PropertiesUsedinAlertExpressions
Maybe using a Management Script, but there is no much info about it (the links to the javadoc are broken)
http://www.mulesoft.org/documentation/display/current/Scripting+Examples#ScriptingExamples-AlertingExamples
Yes you can use it. Mule provide various properties common to all alerts from class com.mulesoft.console.alert.RaisedAlert that can be used in defining the certain values such as
Flow identifier
Flow name
You may refer to mule documentation for it
https://docs.mulesoft.com/mule-management-console/v/3.7/defining-slas-and-alerts#DefiningSLAsandAlerts-PropertiesUsedinAlertExpressions
Related
can anyone explain what is Service Data Object(SDO) and Service Message Object(SMO)?
Questions:
1. what is the purpose of SDO and SMO?
2.how it works?
These concepts aren’t used with Mule, they seem to come from IBM. https://www.ibm.com/support/knowledgecenter/SSFTN5_8.5.7/com.ibm.wbpm.main.doc/topics/cwesb_sca_smo2.html
The equivalent of the SMO in Mule is the Mule Event which you can read about here: https://docs.mulesoft.com/mule-runtime/4.1/about-mule-event
A Mule event contains the core information processed by the runtime. It travels through components inside your Mule app following the configured application logic.
It’s basically an abstraction layer so you don’t have to deal with different protocols and transports.
A Mule Event is composed of these objects:
A Mule Message contains a message payload and its associated attributes.
Variables are Mule event metadata that you use in your flow.
A Http POST for example would be represented as an event.
The event payload would be the body data of the http request
Where as the http headers such as content-type would be attributes on the event.
Same for JMS. The message body would be the payload and the jms header would be attributes.
As for SDO, each SMO has an SDO. This is very specific to that IBM article and not relevant in Mule. But from what I understand it basically allows you to access your heterogenous business data in a common way. I guess Dataweave in Mule accomplishes this as Dataweave is the transformation and expression language in Mule, it allows you to query and transform data in the same way regardless of the data type, xml, Json, CSV and so on.
I just need to ask a question about the type of data in mule message?
is it a java object determined by the message source and processors OR a java object implementing the collection interface?
I dont understand your question. Is related to : mule message structure?
The Mule message is the data that passes through an application via one or more flows. It consists of two main parts:
message header which contains metadata about the message
message payload which contains your business-specific data.
Here official documentation:
https://docs.mulesoft.com/mule-fundamentals/v/3.7/mule-message-structure
In this sub-flow, how can I access from the http connector (red area) the inbound properties available at green marked area.
The scope of the inbound property is only just after the inbound endpoint or the source endpoint.
Here you should copy your inbound properties to the "flowVars" and then use it across the flow
#[flowVars.paramerterName = message.inboundProperties.'http.query.params'.parameterName]
Please make note if you want to access the HTTP properties, the syntax MEL format will be different for the Mule latest version and old version. The above one is valid for the latest Mule version and the syntax to access any property like below
#[message.inboundProperties.'http.query.params'.cityname]
where as in previous versions
#[message.inboundProperties['propertyName']].
This will depend on your inbound message source, but assuming it is an HTTP connector, use the MEL expression to access the inbound property http.query.params
#[message.inboundProperties['http.query.params']
The inbound message object is nothing but a HashMap of key-value pairs - best would be to use the debugger and select the keys you would like to access.
Here is the documentation for the Mule message, there you will find the description for the different kind of variables and properties. Inbound properties should be propagated from the main flow to the sub-flow and should still be available after the choice, excepting the case where you overwrite them or when there is an outbound-endpoint, which would overwrite them too.
I'm planning to create a custom message processor to pick up messages from message store. However I haven't find any examples how to create a custom class. Documentation under this topic is very limited.(http://docs.wso2.org/display/ESB481/Custom+Message+Processor). Can somebody provide example to create custom message processor ?
Thanks,
Have a look at the MessageProcessor interface - and the implementations and other classes here. Once you have your processor setup, you can place your jars in the lib folder. Then follow the instructions in the link you posted in the OP.
We purchased an Enterprise Mule license in May, and I have also bought and read your Mule in Action at Manning.com. I read Enterprise Integration Patterns, and I have used Mule doc extensively -- I cannot seem to find a comprehensive list of what endpoints produce what kind of data types, or what properties are available for that specific message at any one stage of a flow.
Example: I used a JDBC endpoint to read from a mySQL database and received back a list of maps. Yet i don't see a Mule object to process this list of maps, so i had to write a component in Java to process it and return the columns i wanted from the result set.
I stumbled in the dark thru this whole process, and I am not a rookie in Java EE; I have been using Java and WebSphere off and on for 10 years.
I had read the Mule and MVEL docs and all I see are the Mule object/context names, but no more about when and how they will be available or what data format they will return in.
Is there a comprehensive list of what endpoints (or any other Mule object(s)) produce what kind of data types and also what properties are available for that specific message at any one stage of a flow?
Unfortunately, the Mule reference guide still lacks a formal definition of the generated payload types and supported properties (inbound end endpoint). MuleSoft is aware of the lack and has started to document the latter, as you can see for the HTTP transport.
For now your best bet is to use visual breakpoints in Studio or <logger> elements to introspect the message characteristics.