If your message map contained mapping structures for which no direct replacement exists
in the conversion, your new graphical data map includes Task transforms to assist you in manually
re-creating those structures. You must review and replace each Task transform before you can use
your graphical data map in a messaging solution.
About this task
In the scenario map, MembersMFPFlow_Mapping.map, you must resolve a Task
transform. If you review Changes in behavior in message maps converted from legacy message maps, there is
information about what can and cannot be automatically converted. In the scenario map,
esql:trim-both
is a function that cannot be automatically converted, and so is now
a Task transform.
If you have a Task transform in a submap, in the main map this is represented by a red cross on
the transform, and more information is provided if you hover the cursor over the transform. Task
transforms are listed in the Problems view.
You must configure the Task transform so that it becomes a valid transform type. Follow the steps
to resolve a Task transform:
Procedure
-
In the Graphical Data Mapping editor, select the Task transform.
The transform properties are displayed in the Properties view.
-
In the Properties view, click the Documentation tab
to review details about the mapping structure that was not re-created by the conversion
process.
You can see that in the scenario, the information in the
Documentation tab explains how to resolve the Task: by creating an equivalent
expression for the function.
-
In the Graphical Data Mapping editor, change the Task transform into a functional transform
type by clicking the arrow in the transform box, then selecting from the list of available
transforms.
For the scenario, select Custom XPath.
-
In the Properties view, click the General tab.
-
In the General tab field, enter the following XPath expression:
fn:normalize-space( fn:substring( $PERSON_NOTES, 0, 24))
Use the content assist (Ctrl + Space) when you construct your XPath expression to ensure that you
always use a valid variable name because the input element could be different across different
transforms. There is an example of the importance of using content assist in step 9.
This expression re-creates the original function behavior.
-
Save your updated map.
There is an optional set of steps here to test the graphical data map now, because the
test shows how your mapping behavior has changed due to the updated logic, and why it is important
to check your conversions. If you want to create a working map only, go to step 8.
- Optional:
Test the change to the ESQL
NULL
behavior in the scenario map.
-
Try following the steps in Verifying the solution.
When the PERSON_NOTES element is fewer than 48 characters in length,
the output element MEMBER_COMMENT3 is created as an empty XML element.
-
Review the original Version 7.0 test results.
You can see that MEMBER_COMMENT3 was excluded in this condition. This is
because the ESQL NULL
processing is different. In an XML/XPath standards-based
graphical data map, you can model NULL
only as an empty element, with
xsi:nil
set if the model defines the element as nillable.
If such a change was unexpected and unwanted, it could lead to processing or validation
errors. You must add an XPath condition expression to prevent the commentPart3()
ESQL being invoked when the input data is fewer than 48 characters long.
-
Continue the scenario from step 8.
-
In the Graphical Data Mapping editor, select the Custom ESQL transform that connects
PERSON_NOTES. In the Properties view, click the
Condition tab.
-
In the Condition tab, enter the following XPath expression in the
field:
fn:string-length( $PERSONNOTES ) > 48
This condition prevents MEMBER_COMMENT3 from appearing if the value of
PERSON_NOTES is fewer than 48 characters.
Use the content assist (Ctrl + Space) when you construct your XPath expression. The content
assist might suggest a different value for $PERSON_NOTES
if you modify the
transforms outside of the steps provided.
For example, content assist might suggest $PERSON_NOTES1
. Accept this
value, because it is correct for the scenario.
-
Your Task transform is resolved to a working Custom XPath transform.
-
Save your updated map.
Results
You successfully removed the annotations and errors from the converted graphical data map. Your mapping solution is now ready to use.
To check that your map works as intended, follow the steps in Verifying the solution.