This section describes how to define data mappings of a
data formatter for a state or transition.
Procedure
- Define mapping source.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.