Start of Content Area

Procedure documentation Triggering Alerts in Integration Processes  Locate the document in its SAP Library structure

Use

When you define an integration process, you can specify that if a specific situation occurs at runtime, an alert is to be triggered using Alert Management. To do this, you insert a control step at the required position in the process.

If the control step triggers an alert at runtime, Alert Management sends the alert to the relevant user. The process is not terminated and resumes on completion of the control step. The user who is informed by Alert Management must then decide whether to intervene in the process or not.

More information: Alert Management

Alert Category

Before you can trigger an alert you must define a corresponding alert category. In the alert category you define texts, the expiry date, and so on. You can define an alert category in the following ways:

      Defining alert categories in the Enterprise Services Builder (ES Builder).

You can define an alert category directly in the ES Builder. This has the advantage that you can define an alert container. In the alert container you can define which data from the integration process the user can see in the alert short text.

      Define an alert category on the alert server

You can also define alert categories on the alert server. However, you can only use elements of the process container as variables in alert long texts. If you require new alert categories for alerts in integration processes, you must define them in the Enterprise Services Builder. You can, however, reuse any alert categories that are already defined on the alert server.

Prerequisites

Use the Integration Server as the alert server.

Trigger Alert - Define an Alert Category in the Enterprise Services Builder

Define the alert category

       1.      Create an alert category.

More information: Creating an Object

       2.      Define the basic data of the alert, for example the priority.

To proceed, follow the description of how to define an alert on the alert server. 

More information: Defining Alert Categories

       3.      Define the long and short texts for the alert.

                            a.      To make the alert text more meaningful, you can use container elements as placeholders. At runtime, the container elements display the values determined from the integration process.

                                                  i.       Define the required container elements.

You can use container elements with simple XSD data types in the alert container.

                                                ii.       Insert the container elements as placeholders in the required positions in the short or long text.

You define the binding for these container elements later on in the control step for triggering the alert.

It is possible to define alert texts in different languages.

More information: Editing Language-Specific Texts

Once the change list is activated, the alert category is deployed on the alert server. You can display (but not change) the alert categories by calling transaction ALRTCATDEF.

Define a Control Step for Triggering the Alert

       4.      Insert a control step at the required position in the integration process.

       5.      In the Action field, choose Trigger Alert.

       6.      In the Source field, choose Integration Builder/Enterprise Services Builder.

       7.      Select the required alert category.

The properties area displays all container elements that are defined for the selected alert category. 

       8.      Define the binding by specifying how each container element will be filled at runtime.

Trigger Alert - Define an Alert Category on the Alert Server

Defining or Selecting the Alert Category

An alert has two texts: a short text and a long text. The short text for an alert displays the ID of the process instance automatically at runtime. You can specify the long text in the alert category or in the control step.

...

       1.      Call transaction ALRTCATDEF.

       2.      Check whether you can use an existing alert category or define your own alert category.

More information: Defining Alert Categories

       3.      Decide whether you want to specify the long text for the alert in the alert category or in the control step.

If you want to specify the long text in the control step, you need to select the Dynamic Text field in the alert category definition.

       4.      Make a note of the name of the category, since you need to enter this later in the process editor. 

Define a Control Step for Triggering the Alert

       5.      In the process editor, open the integration process that is to trigger the alert.

       6.      Insert a control step at the required position in the integration process.

       7.      Choose Trigger Alert for the Action property.

       8.      In the Source field, choose Integration Server.

       9.      For the Alert Category property, specify the required alert category from Alert Management.

   10.      If you want to specify the text, which is displayed as the alert, in the control step, specify the required text for the Alert Message property.

Note

To be able to display this text, you must have selected the field Dynamic Text in the alert category definition.

Using Variables in the Alert Text

To make the alert long text more meaningful, add variables to the alert text or specify a path for accessing the values in the message payload.

      To define a variable, proceed as follows:

                            a.      In the process container, define the container element that delivers the value for the variable.

Specify a simple XSD data type for the container element. You cannot include tables in alerts.

                            b.      Define a container operation that is to set the value for the variable.

More information: Container Operation

                            c.      Use the following syntax when specifying variables in the alert text of the control step:

&variable& 

Example

The following example is an alert text with two variables:

       Definition of the alert text in the control step:

Number &price& exceeds the upper limit &limit&

price and limit are defined in the process container.

       The alert text is displayed as follows at runtime:

Number 5000 exceeds the upper limit 2000

      To access a value in the message payload, in the alert text for the control step, enter the path to the required field according to the following syntax:

&message.PAYLOAD.attribute&

Example

The following example is an alert text with one variable for a value from the message payload:

       Definition of the alert text in the control step:

Check purchase order with purchase order number &MyMessage.PAYLOAD.OrderNumber&.

MyMessage is defined in the process container. OrderNumber is the required field from the payload.

       The alert text is displayed as follows at runtime:

Check purchase order with purchase order number ABC123456789.

Define the Receiver of the Alert

You can define the receiver of an alert in different ways:

      Define an alert category for the receiver. To do so, use transaction ALRTCATDEF; this also applies even if you have defined the alert category in the Enterprise Services Builder.

      Users subscribe to a particular alert category. You grant the necessary authorization for this in transaction ALRTCATDEF.

More information: Recipient Determination

Defining E-Mail Addresses

...

If Alert Management is to send the alert by e-mail, you need to define the e-mail addresses for the sender and receiver on the Integration Server.

       1.      Open user maintenance on the Integration Server (transaction SU01).

More information: Creating and Maintaining User Master Records

       2.      Enter the e-mail address of the workflow background user as the e-mail address of the sender. This is generally WF-BATCH.

       3.      Specify the e-mail address of the receiver.

 

End of Content Area