Summary
Requirements
Create a Map
Add a source template
Add a destination template
Create a Global variable
Configuring the Global variable
Mapping the source and the destination templates
Save the Map
Create a Process
Inserting Process Variables into the Process
Inserting a Transformation node into the process
Connect the nodes
Save the Process
Run the Process
Summary
This article demonstrates how to use process variables in a Map.
Requirements
- Enterprise Enabler version 5.x
- Map Designer
- Excel AppComm
- Database AppComm
- Process Designer
Create a Map
Open Enterprise Enabler and create a new Map by clicking File » New » Map.

Add a source template
Right click on the "Source Templates" area and then select Add Template.
Now select a desired source template from the list.

Add a destination template
Right click on the "Destination Templates" area and then select Add Template.
Now select a desired destination template from the list.

Create a Global variable
Right click on the Global node in the Mappings area and then select Global Variables » Edit/Add New.

Enter a name for the Global variable at the prompt.
Configuring the Global variable
In the Mappings area, right click on the Global variable and then select Equation.
This will bring up the Equation Editor. Click on the Code Window tab and enter the following code:

Mapping the source and the destination templates
Drag the block of the destination template onto the Mappings area. Now, drag the block of the source template onto the destination block in the Mappings area. This source block will serve as the Driving Block. Continue mapping all the source columns onto the destination columns in the Mappings area. Drag the Global variable onto one of the unmapped destination columns. After the mapping is complete, the map should look like this:

Save the Map
Click on the Properties window and rename the Map.

Click on the Save As button in the toolbar to save the Map.
Create a Process
Create a new process by clicking File » New » Process.

Inserting a Process Variable into the Process
In the Toolbox menu go to Proc. Variables, select Proc. Variable and drag it into
the process designer area. Rename the Proc. Variable with the same name that
was used for naming the Global variable in the previous sections. Set the initial value to any integer. Create another process variable and rename it to mapname and set the initial value to the name of the Map that was created in the previous sections.
Inserting a Transformation node into the process
In the Toolbox menu go to Action Nodes, select Transformation and drag it into
the process designer area. The Transformationnode uses one local variable and this needs to be mapped to the mapname Process Variables. The mapping can be done by clickingTransformation node in the designer area and then the ellipsis in VariableMappings property in the Properties window. Select themapName variable and click the Edit button. Select the mapname Process Variable from the window and click the Select button. Click the Done button to save the changes.

Connect the nodes
In the designer window drag the arrow of the connector from the Start node and drop it on the Transformation node. Drag the arrow from the Transformation node to the Stop node. The completed process should look like the following figure:

Save the Process
Click anywhere in the empty area on the designer window and rename the process in the Properties window.

To save the process click the Save button in the Standard toolbar.

Run the Process
Click on the Start the Process button in the Process Designer toolbar to run the process.
