Blog 7: Message Events in Integration Flows
In this blog, we shall an easy topic on message events. The topic itself is easy to understand. However, I want to provide a more contextual information on where you would use the different message events.
What are Message events?
Message events point to changes in the state of message processing of an Integration flow. To make it clearer, let’s say if a message comes to an integration flow, then the pipeline starts processing the message. Or, when the integration pipeline has to send it to the receiver, it would have completed processing the message. Such changes in states are explicitly modelled as events.
Which Message events are supported, and where to use them?
You can configure all the message events from the Integration palette.
The Start Message and the End Message events are used when SAP Cloud Platform Integration receives a message from a Sender and when SAP Cloud Platform Integration sends a message to a Receiver. By default, when you create an integration flow, the start and end message events are made available.
The other message events – Error Start and Error End can be used only within an exception sub-process. This has been explained in detail in following blog: Blog 4: Modelling Exceptions in Integration Flows.
Timer start is especially useful in scenarios where you have go and pull data from systems or have to trigger Web services at specified time/ intervals. In terms of polling (pulling data from systems), currently – you can use it only with a SuccessFactors adapter as it is a pull-based adapter.
The usual pattern of using a timer is – A content modifier followed by a timer. That is because a timer does not create payload in the pipeline. With a content modifier, you can create the request payload that can be sent to the system.
And finally the Terminate End – this is useful if you want to stop further processing of a message. For example, you can use it in a content router where you have processing defined for specific values on the payload. If the payload does not match those values, you want to terminate the connection.
Note: The message monitoring shall show a Successful Message and not a Failed Message because it has terminated successfully. Terminated messages do not mean failed messages.
Use all these events in your integration projects and let us know your feedback !
Can you confirm what would be the properties for ContentModifier would be like in the iFlow starting with a Timer event.
The content modifier properties would depend on the flowstep that comes after. For example, if you want to call an external SOAP service, then the payload for the service call has to be included.
Hope my answer clarifies your query?
I need to handle the mailing in Subprocess.I know end message will not work in Subprocess and also request-reply cannot be used with mail adapter as response is not returning back.
So how do I connect the flow to the receiver mail channel in Subprocess to send the mail.
I saw that request-reply can be switched to 'Send' , What is the use of this?.
When i use send I got an error message. 'Send does not have an outgoing sequence flow '
You can use the Send step to connect to the Mail adapter. It shall work with Send. Can you try again using the Send step?
It is working now.
Terminate message and End Message seems to be identical in functionality. Please can you explain the technical difference between both when used in the iFlow. For example, if we use End Message instead of terminate message when the condition is not satisfied in the router, will it make any difference in the background?
Terminate message is like terminating the message processing from further processing with successful status even the iflow is failed,
where as end message is also used to end the message processing but it will give failed status if the iflow is failed.
In your example, if we use End Message instead of terminate message when the condition is not satisfied in the router,
terminate message will gives status as successful status since it is terminated the processing successfully from further after failure in iflow.
but end message event will give the status as failed.