Defining Input and Output MappingLocate this document in the navigation structure

Use

You define data mappings to show how data used as input and output by the activities and the events in your process is transformed. When you define input mapping, you define how the data transformation between the process context and the input context of an activity or event is done. When you define output mapping, you define how the data transformation between the output context of an activity or event and the process context is done. For more information, see Working with Data Mappings .

Input and output mapping shows which nodes are mapped to each other but does not specify how the data transformation is done. You define how the transformation is done with functions and expressions. For more information, see Performing Complex Data Transformation with Functions and Creating Expressions .

Prerequisites
  • You have created the necessary data objects in your process.

  • You have set the data type of the data objects.

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

Procedure
  1. Expand Process Modeling , then expand Processes .

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

  3. In the modeling surface, choose an activity or an event.

Defining Input Mapping

  1. In the Properties view, open the Input Mapping tab page.

    If you have selected a mapping activity, open the Mapping tab page

  2. In the Process Context field, choose a node.

  3. Map the node to a node in the Inputs field using drag and drop.

    You can map a process context node to more than one input nodes. You can also map more than one process context nodes to an input node. You define how this mapping is done with an expression.

    Caution

    If you map a node, whose content is a list or a node with one or more parents that are lists to a single-valued node, you get an error. Depending on your needs you could provide a custom expression, for example to aggregate the list to a single value, or you could perform parent mapping between the multi-valued parent nodes.

  4. In the context menu of the mapping line, choose Assignment and then select one of the assignment options available, depending on the mapping you want to define. For more information about the mapping assignment options, see Defining Data Mappings .

Defining Output Mapping

  1. In the Properties view, open the Output Mapping tab page.

  2. In the Outputs field, choose a node.

  3. Map the output node to a node in the Process Context field using drag and drop.

    You can map an output node to more than one process context node. You can also map more than one output node to a process context element. You define how this mapping is done with an expression.

    Note

    You can drag an element from the output mapping to the modeling surface to create a data object with the corresponding elements. For more information about data objects, see Creating Data Objects .

  4. In the context menu of the mapping line, choose Assignment and then select one of the assignment options available, depending on the mapping you want to define.

Note

If you want to undo a mapping you have created, you have to select the mapping line and delete it.

Caution

An error marker on the function icon of the mapping line means that the mapping has an error and cannot be done. Errors in mappings are only visible in the mapping editor but are not visible on the modeling surface or in the Problems view.

Example

You want to perform data mapping from a source context object that contains two nodes to a target context object that contains one node. To do that, you select the two source nodes and drag them to the target node. Since you map multiple nodes to one node, this mapping requires an expression to transform the data from the source context object to the target context object. When you drag the two nodes to the target node, a default expression is created which concatenates the two source nodes.

You can see the expression in the expression editor when you click the function icon on the mapping line.

The mapping example described above is shown in the following picture: