Show TOC

Procedure documentationWorking with Sub-Processes Locate this document in the navigation structure

 

The sub-process is a type of activity in the process you model. You use sub-processes to reference another process by the parent process you model.

The sub-process has a start and end event containing the same service operation and this operation must be synchronous. When you create a sub-process, you can create a start and end event for that sub-process from a service operation.

When you model sub-processes, you can choose between a top-down and a bottom-up approach. The difference between the approaches is in the sequence you execute the steps to model the sub-process. Depending on the approach you choose, you proceed in one of the following ways:

  • Top-down approach

    1. You create a sub-process activity in the parent process you are modeling.

    2. You model a new process containing events, activities, connections, and so on.

    3. You assign the modeled new process to the sub-process activity you created in the parent process.

  • Bottom-up approach

    1. You model a new process containing events, activities, connections and so on, apart from the parent process you are modeling.

    2. You create a sub-process activity in the parent process you are modeling.

    3. You assign the modeled new process to the sub-process activity you created in the parent process.

As a result, the sub-process activity references the process you have modeled and assigned to it.

When you work with sub-processes, you can define data mappings for the sub-process to show how the sub-process uses data for input and output. For more information, see Defining Data Mappings.

Prerequisites

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

  • You have created a process to use as a parent process. For more information, see Creating a Process.

Procedure

Creating a Sub-Process Activity in the Parent Process

When you use the top-down approach, you start with this procedure first.

  1. Expand Process Modeling, then expand Processes.

  2. In the context menu of process that you are using as a parent process, choose Open.

  3. Expand Activities from Palette.

  4. Choose Sub-Process and click the modeling surface.

    The sub-process activity appears in the place you clicked.

  5. Choose General in the Properties view and specify a name of the sub-process in the Name field.

  6. (Optional) Specify a description of the sub-process in the Documentation field.

Modeling a Process for the Sub-Process Activity

When you use the bottom-up approach, you start with this procedure first.

  1. Expand Process Modeling.

  2. In the context menu of Processes, choose New....

  3. In the dialog that appears, specify a name for the process and optionally a description. Choose the Next pushbutton.

  4. Create a start and end event from a service operation

    This option is active by default and the default service and operation are selected. To change the predefined service and operation, proceed as follows:

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

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

    The process you assign to a sub-process activity type requires the start and end event to have the same operation of a service interface.

  5. (Optional) Create a new pool if you model a sub-process with more than one participant. Each pool represents a participant in the process in the sense of a business entity.

    1. Select the Create a new pool checkbox.

    2. (Optional) Specify the pool's orientation on the modeling surface by choosing the respective radio button.

      You have created a new active pool. Active and passive pools in the model communicate through message flows. For more information about pools, see: Defining Process Participants Using Pools.

  6. Choose the Finish pushbutton.

    Your process for the sub-process activity is created and you can model events, activities, and so on.

Assigning a Process to the Sub-Process Activity

Regardless of the approach you have chosen, you execute this procedure last.

  1. Expand Process Modeling, then expand Processes.

  2. In the context menu of process that you are using as a parent process, choose Open.

  3. In the modeling surface, choose a sub-process activity.

  4. Open the Process tab page in the Properties view.

  5. In the Process field, select the process you want to assign from the dropdown menu or select Browse... to search for a process.

    Note Note

    All processes that exist in your project are available for assigning in the dropdown menu, except the parent process you are currently modeling. You can also select New... and create a new process which is automatically assigned to the sub-process activity.

    End of the note.

You have assigned a process to the sub-process activity. You can open the assigned process by opening the Process tab page in the Properties view of the sub-process activity and clicking the Process link.