There are several ways to add variables to a mapping, as shown below.
1.On the Insert menu, click Variable. (Alternatively, click the Variable toolbar button).
2.Select the type of variable you want to insert (simple or complex type).
If you select "Complex type", there are a few additional steps:
3.Click Choose to select the source which should provide the structure of the variable (for example, an XML Schema , database, EDI file, or FlexText template).
4.When prompted, specify a root item of the structure. In case of XML Schemas, the root item can be any element defined globally. In case of databases, the root item can be any table.
•Right-click the output connector of a component (in this example, "Article") and select Create Variable from Source node.
This creates a complex variable using the same source schema and automatically connects all items with a Copy-All connection.
•Right-click the input connector of a target component and select Create Variable for Target Node. This creates a complex variable using the same schema as the target, and automatically connects all items with a Copy-All connection.
•Right-click the output connector of a filter component (on-true/on-false) and select Create Variable from Source Node. This creates a complex component using the source schema, and automatically uses the item linked to the filter input as the root element of the intermediate component.