Show TOC

Procedure documentationModeling Events Locate this document in the navigation structure

 

In process modeling, an event is a flow object that indicates that something happens in the course of the process. The events in the process have different triggers and results and affect the flow of the process. You use events to indicate that a process has started or ended, or that the flow is delayed and is waiting for a certain time before resuming. You can also use events to represent interaction between different processes.

To model a process, you create the following event types:

  • Start event, which indicates the start of the process you are modeling and has no incoming sequence flow.

    The process starts when the start event is triggered.

  • End event, which indicates the end of the process you are modeling and has no outgoing sequence flow.

    The process ends when the end event is reached. If a branch in the process reaches a termination end event, all parallel flows in the process are also terminated.

    You use error end events to model an error that occurs in the process. For more information about error end events, see Modeling Exceptions and Exceptions Handling.

  • Intermediate event, which occurs between the start and the end event and has an incoming and an outgoing sequence flow.

    The intermediate event affects the process flow, but it does not start or terminate it. You use intermediate events to indicate that the process is delayed and resumes after a specified time or on a specified date.

To make events work, you do the following:

  • Assign a service interface and an operation to start, end and termination events.

    You make service interface definitions available either by importing or manually creating them.

  • Set an error type for the error end event.

  • Define input or output data mapping, depending on the event type.

Prerequisites

You have opened the Process Composer perspective in the SAP NetWeaver Developer Studio and have expanded your project in Project Explorer view.

Procedure

1. Create the Events
  1. Expand Process Modeling, then expand Processes.

  2. In the context menu of a process, choose Open.

  3. Expand Events from Palette.

  4. Choose an event type and click the modeling surface.

    The event appears in the place you clicked.

  5. Choose General in the Properties view and specify a name of the event in the Name field.

  6. (Optional) Specify a description of the event in the Documentation field.

Note Note

You may want to define a correlation condition for the start event that is different from the default correlation, which is “true”. To do that, choose Correlation Condition in the Properties view of the start event and define the correlation condition with an expression. For more information, see Creating Expressions.

You may also define a trigger time for the intermediate timer event. To do that, choose Timer Configuration in the Properties view of the intermediate timer event and define the trigger time with an offset or with an expression.

End of the note.
2. Make Service Interface Definitions Available

You make service interface definitions available in one of the following ways:

Caution Caution

When you design an operation in your service interface definition that will be used for start and end events, keep in mind that in SAP NetWeaver BPM, included in enhancement package 1 for SAP NetWeaver CE 7.1 only asynchronous provisioning is fully supported. Synchronous operations can be used to start and finish a process successfully, but SOAP fault will be returned to the caller of the web service and needs to be handled.

For more information, see SAP Note 1287855.

End of the caution.

Note Note

You can assign the DefaultService service interface definition included in the process composer to the start and end event to be able to easily start the process. This service interface has an Empty operation and has no input and output parameters.

When you deploy the process, a special Web service is created from this definition which you can use to start the process. You can also use the Web Services Navigator (WS Navigator) to test the Web service. For more information, see Testing Web Services in the Web Services Navigator.

End of the note.

Recommendation Recommendation

Do not assign the DefaultService service interface definition with the Empty operation to the start and end event in several processes without renaming them. We recommend creating a new WSDL file and naming the assigned service interface and operation with descriptive names. As a result, you ensure finding the right service interface and operation to start a particular process in the WS Navigator.

More information: Starting a Process

End of the recommendation.
3. Assign Service Interface Definitions to Events
  1. Expand Process Modeling, then expand Processes.

  2. In the context menu of a process, choose Open.

  3. In the modeling surface, choose an event.

  4. In the Properties view, choose Interface.

  5. In the Service Interface field, select a service from the dropdown menu.

  6. In the Operation field, select an operation from the dropdown menu.

4. Define Data Mappings

You define output mapping for start events and input mapping for end events.

For more information, see Defining Data Mappings.