Defining data mapping

This section describes how to define data mappings of a data formatter for a state or transition.

Procedure

  1. Define mapping source.
    1. In the Mapping Source panel of the Data Mapping window, use the top drop-down list to specify what the data that is being mapped from is. Then the panel underneath would display relative options for you to choose.
    2. If you select
      • Constant: you should specify the Constant Type as String, Number, Boolean or NLS types.
      • Expression: you should define expressions with one or two operands.
        • Click the Browse button to create a new operand in either the Left or Right field.
          Note: Long expression could display in multiple lines.
        • These operands can be constants, expressions, functions or context values. You can then define your operand and click OK to go back to the expression definition editor.
          Note: This is the same wizard that embedded in the Mapping Source panel. You could access useful information on the topper level.
        • Use the drop-down list to select operator. An expression supports arithmetic, comparison and boolean operators.
      • Context: you should select the data element from available contexts.
        • In the Context list panel, use the drop-down list to select the corresponding context. For detailed information about listed items in the panel, please refer to Mapping context list.
        • In the Context data panel, only the data elements that have the appropriate flag set (input/output/both) are shown. Specifically, when mapping to a context, only the elements with the input flag set appear; when mapping from a context, only the elements with the output flag set are shown. Therefore, only output data is displayed at the Mapping Source panel and only input data is displayed at the Mapping Target panel. For data attributes of input/output, please refer to Data element external definitions.
      • Global Function: you should select the function that requests mapping. The result of the function execution is the data that will be mapped to the target data.
        Each function has a set of parameters that must be specified. These parameters can be constants, expressions, functions or context values. The values can be set using the expression editor, as shown in the figure below, and it is opened when clicking in the Browse button in the Value column of the function parameters table.
        Note: For details about the supported global functions, please refer to Global Functions.
      In all cases, the final expression will be shown at the bottom of the Mapping Source panel, in the Expression field. You could use that to confirm your definition.
  2. Specify mapping target from one of the available contexts in the Mapping Target panel. Mapping Target only supports contexts. Thus you would need the same information in Select context as mapping source.
  3. Click Bind in the middle of the window to bind the source and target data.
    Then the data mapping just defined would be displayed in the mapping table.
  4. Optional: Add comments to data mapping in order to clarify its purpose or function. Comment lists as third column of the table. Click the button in the cell and input your comments.
  5. You can define as many bindings as you may require. There are two possible options to define a new data mapping when there are other available data mappings:
    • When the previous defined data mapping is similar to the new one, select the compatible mapping, re-select the mapping source or target that may be different and click Bind button.
    • When the previous defined data mapping is completely different to the new one and the selection may interrupt your operation, you could use one of the following two ways:
      • Press Reset Selection button.
      • Click on the blank area inside the mapping table.
      This will bring you to the initial status of the wizard, as if you have just opened it. Then you can proceed with your new mapping definition from Step 1 again.
  6. Click OK.
    Note: As long as you have not clicked OK, you could use CTRL+ z/y to undo/redo the previous operation. Once clicked OK, the data formatter would be saved into the Transaction file and can be viewed in the Format tab of the Transaction editor.