Create a map that uses an existing external map variable and defines new ones to be
used in your Route.
Procedure
In your Route, double-click the cMap component.
In the first step of the wizard that opens, select your input structure and
click Next.
In the second step, select your output structure and click
Finish.
A map is generated and opens in the editor. You can now configure
it.
Drag the input orders element on the output
orders element.
All elements in the input are automatically mapped with the
corresponding elements in the output.
From the Functions tab, drag and drop a
Multiply function on the itemTotal
element.
Drag and drop the output price element on the First
Value argument and the output quantity element
on Second Value.
Drag and drop an AgSum function on the
orderTotal element, then drag and drop the
itemTotal element on the AgSum
function.
Drag and drop a GetValueFromExternalMap function on the
orderDate element, drag and drop a
Constant function on the Key
argument, then double-click the Constant function and
enter current.date in the Value
field.
This configuration allows you to retrieve the value from the variable you
created in the first cProcessor component of your Route.
Drag and drop an AddToDateTime function on the
shippingDueDate element, double-click the function and
select Days in the Add what?
drop-down list.
Drag and drop a Constant function on the
Amount argument and set its value to
5.
Drag and drop the output orderDate element on the
DateTime Value argument.
Open the Util tab of the
shippingDueDate element and drag and drop a
PutValueToExternalMap function in it.
Drag and drop a Constant function on the
Key argument and set its value to
due.date.
Drag and drop the shippingDueDate element on the
Value argument.
This allows you to create an external map variable named
due.date with the value of the
shippingDueDate element.
Click the output orderId element, open its
Util tab and repeat the previous steps to create a
variable named order.id.
Save your map.
Results
Your map is now configured. You can run your Route to see the result. In this
example, the result looks like this:
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!