Show TOC

Procedure documentationModeling Exceptions and Exceptions Handling Locate this document in the navigation structure

 

Exceptions in process modeling indicate an error that occurs and changes the normal flow of the process. When an exception occurs in the process, the process execution stops at that point.

To model exceptions and exceptions handling you create the following event types:

  • Error end event, which you create in the process

    The error end event represents an exception that has occurred in the process.

  • Boundary event, which you place on the boundary of an activity (automated activity, human activity or sub-process) in your process model.

    The boundary event handles an exception that has occurred while the activity has been performed. A sequence flow connection starting from the boundary event shows how the process branches after the exception.

Exception Occurrences

Exception may occur on the following levels:

  • Parent process

    If the exception occurs in a parent process, it is handled by a default handler at runtime and you model only the exception in your process. When the exception occurs, the whole process is suspended and an administrator can inspect the process.

  • Branch of a parallel process

    If the exception occurs in a branch of a parallel process, the whole process instance is suspended until the exception is handled by a boundary event or by the default handler.

  • Sub-process

    If the exception occurs in a sub-process, it can be handled by a boundary event in the parent process. In this case you model both the exception and the exception handling in your process. You place the boundary event on the boundary of the sub-process flow object in the parent process. The sub-process flow object represents the referenced sub-process. For more information about sub-processes, see Working with Sub-Processes.

  • Activity

    If the exception occurs within an activity, you model only the exception handling because the exception is not visible outside the activity. You can place a boundary event on the boundary of a human and automated activity to show how the exception that has occurred while the activity has been performed is handled.

    Caution Caution

    You can create a boundary event only for human and automated activities for which an exception or WSDL fault has been defined.

    End of the caution.
Exception Types in Human Activities

An exception that occurs in the inner flow of a task can be critical or non-critical. Depending on the type of the exception in the inner task flow, you can create a critical or non-critical boundary event for the human activity to which the task is assigned. Critical and non-critical boundary events have different graphical representations on the boundary of the human activity. Exception types in human activities are the following:

  • Critical exception

    When the exception occurs, the task execution is canceled and the critical boundary event handles the exception. The process continues from the critical boundary event and does not follow the regular flow out of the human activity.

  • Non-critical exception

    A non-critical exception does not cancel the task execution and you can work on the task and complete it at runtime. The non-critical boundary event handles the exception and the process continues from the boundary event. When the task is completed, another token of the process continues independently following the regular flow out of the human activity.

Steps to Make Exceptions Work

To make exceptions work, you do the following:

  • Set an error type

    The exception sends information about the error to the main process or to the default handler. The type of the information is defined by an error type.

  • Define the input mapping

    Input mapping defines what information does the exception send. For more information about mappings, see Defining Data Mappings.

  • Define the output mapping

    To make boundary events work, you define output mapping for them to show how information about the exception handled is used in the process.

Prerequisites

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

Procedure

Modeling an Exception in a Process with an Error End Event
  1. Expand Process Modeling, then expand Processes.

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

  3. Expand Events from Palette.

  4. Choose Error End and click the modeling surface to place the error end event in the process.

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

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

  7. Choose Error Type in the Properties view and select an error type from the dropdown menu.

  8. Choose Input Mapping in the Properties view and define the input mapping for the error end event.

Creating a Boundary Event to Handle an Exception
  1. Expand Process Modeling, then expand Processes.

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

  3. Select an activity (automated activity, human activity or sub-process) in the modeling surface and open the Properties view of the activity.

  4. Choose Boundary Events and then choose the Add... pushbutton.

  5. In the dialog box that appears, select the exception for the boundary event to handle. Choose the OK pushbutton.

    The boundary event appears on the boundary of the activity you selected.

    Note Note

    You can select more than one exception from the list. For each exception a separate boundary event appears on the boundary of the activity.

    End of the note.
  6. Choose General in the Properties view of the boundary event and specify a name of the boundary event in the Name field.

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

  8. Choose Output Mapping in the Properties view and define the output mapping for the boundary event.

After creating the boundary event, you create an outgoing sequence flow connection from it to show how the process continues when an exception occurs. For more information about sequence flows, see Connecting Flow Objects in a Process.