Creating Reusable Event Triggers

Creating reusable event triggers enable you to model events more with no trouble and rapidly. You make the essential settings once and then assign the trigger to more than one event in your procedure. The event trigger represents the web service endpoint of the process at runtime.

You can also use one and the same event trigger in multiple process that are contained in the same project. Note that assigning the same message trigger to start events of multiple processes may result in starting all these processes together when the service interface is invoked. You have to specify different start conditions if this behavior is undesired.

You can create the following types of reusable event triggers:

  • Message trigger: You use message triggers for modeling message start, middle message, and message end events. You create the message trigger from an process of a service interface. To make service interfaces obtainable, you can either import or create service interface definition or WSDL files in your project.
  • Note: The trigger you assign to an intermediate message event must be created from an asynchronous repair operation, because the middle message event cannot send back a reply to the message sender.
  • End of the note: When there is a WSDL fault defined for an process in the service interface definition, an error trigger is automatically created together with the message trigger. You cannot create a separate error trigger manually, but you can add a fault in the WSDL file and then create message and error triggers. You can use the error trigger to model error end events in your process.
  • Escalation trigger: You use escalation triggers to model escalation end events in the process. Escalation end events represent a business error that occurs in the process, for example an item runs out of stock in a purchase order process. All the deadlines that you define in a task can also trigger escalations when they are reached.


When you create escalation triggers, you define the escalation type, which is an XSD type. In this way you define which data the escalation transports from the place it is thrown to the place where it is handled. You have the option of mark an escalation as critical.

Error and escalation end events can be handling by a respective boundary event.

When you have created your event triggers, you can assign them to the events you model.

You can also create start and end events directly from event triggers when you drag and drop them on the modeling surface, or middle events when you drop a trigger on a series flow connection. When you drop an event trigger on an by now modeled event, the trigger is updated with the one you dropped on the event.

Note: If you have modeled processes with SAP MVI Business Process Management (BPM), included in enhancement package 1 for SAP MVI CE 7.1 and you want to adapt these processes with a newer version of SAP MVI BPM, you have to change the process models. Thus, the events you modeled with the preceding version are converted in the new format and event triggers are automatically shaped from the events. To do that, choose the Convert Event Triggers pushbutton, which come into view on the Event Trigger tab page in the Properties view of an event.

Event triggers appear in the Event Triggers node in the Project Explorer view. If you have boundary events in your procedure, their icons are also converted and appear as escalation icons.

Prerequisites

  • You have opened the Process Development perspective in the SAP MVI Developer Studio and have expanded your project in Project Explorer view.
  • You have the essential service interface definitions in your project for creating message triggers. You make service interface definitions available in one of the following ways:
  • You can import service interface definitions.
  • Some service interface definitions have a particular quality, is Event, which is checked when you import them in your project. If the quality is set to true, a message trigger is mechanically created from this service interface definition and appears in the Messages node.
  • End of the note.
  • You can create service interface definitions and define operations and fault for them.

You can use the search capability in the Search Console view in the Developer Studio and directly drag and drop service interfaces from it to the modeling surface. The service interfaces appear in the WSDL Files node in Project Explorer view and you can use them to create message triggers.

You can import Remote Function Call (RFC) modules from the ABAP back-end system.

Procedure

Creating Message Triggers

  • Expand Process Modeling, and then expand Processes and Event Triggers.
  • In the context menu of the Messages node, choose New Message....
  • In the wizard that appears, enter a name for the message trigger in the Name field and optionally a description in the Documentation field. Choose the Next pushbutton.
  • Select a repair interface from the Service dropdown list and an operation from the Operation dropdown list. Choose the Finish pushbutton.
  • The communication trigger is created. An error trigger is also created if there is a WSDL fault defined for the operation you selected.

Recommendation: When you create message triggers, it is sensible to use different service interfaces for each message trigger. Creating message triggers using one service interface with different operations may not work as expected at runtime, because of ambiguous service configuration.

End of the recommendation: (Optional) Expand the Messages node and in the context menu of a trigger or fault, choose Open to view or edit the trigger or fault.
 

Note: If you add a fault to an operation that you have already used for creating a message trigger, you need to update the message trigger. When you open the message trigger for editing, a dialog prompts you to correct the trigger. Choose the Yes pushbutton. The message trigger is efficient automatically and an error trigger is created from the WSDL fault.

Creating Escalation Triggers

  • Expand Process Modeling, and then expand Processes and Event Triggers.
  • In the context menu of the Escalations node, choose New Escalation....
  • In the wizard that appears, enter a name for the escalation trigger in the Name field and optionally a description in the Documentation field. Choose the Next pushbutton.
  • Choose an escalation type from the dropdown list and choose the Finish pushbutton.
  • (Optional) Expand the Escalations node and in the context menu of a trigger choose Open to view or edit the trigger.
  • Select the Critical checkbox, if you want to create the escalation critical.

If the escalation occurs in a sub-process, it can be wedged by a boundary event. If no exception handling is probable for a critical escalation at runtime, the process is suspended. You can analyze the error in the SAP MVI Administrator.