This page teaches you how to use mapping flow to define
conditional mapping.
About this task
Conditional mapping applies certain
data mappings under the corresponding condition. The basic structure
is like [Condition][Data mapping],[Condition][Data mapping].
Users need to define the Conditions and the corresponding data mappings
as a set of Conditional mapping. Defining the corresponding data mapping
is like defining traditional data mapping. As for defining the Condition,
there are two ways: by data mapping (Mapping editor) and by mapping
flow. For the other way, please refer to Defining Conditional mapping by data mapping.
Procedure
- Click the transition or state which you want to associate
Conditional mapping with.
- In the Properties view, select 'Mapping Flow' and click
'Add' button to launch the Mapping flow editor.
- In the Mapping flow editor, create an initial state and
a final state. These two states present the mapping's origin and target.
- Drag-and-drop a condition state icon from
the Palette to the canvas.
- Create a Condition state and connect the initial state
with a start transition. This could define the entrance of a multi-level
Conditional mapping.
Then define the Condition of the Condition state.
- Go to the Conditions tab of the Condition state and create
a new Condition. This step follows the same process as Defining Condition in Condition state.
Finally, define the data mapping.
- Connect the Condition state with the final state with a
transition. Double click the event on the transition and set it as
the Event of the defined Condition.
- In the General tab, set the data mapping for the transition
by creating a new data mapping or adding an existing data mapping.
This step follows the same process as Defining data formatter and Reusing data formatter.
Note: Users could also set data mappings for all the states
and transitions. These tasks follow the same processes as setting
data mappings in normal flow.