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 !