Sponsor Administrators can configure XSLT to retrieve data from an existing XML input
into a required XML format.
You must have a task in the task flow on the Definitions tab.
You can define an XSLT script to retrieve data from an existing XML input and display it in
a specific XML format. You can also define a sample output format in which you want to display the
retrieved content.
Note: You cannot save the XSLT definition as a template.
-
Sign in to the PEM Portal as a Sponsor Administrator.
-
Select .
-
Edit an existing activity or start a new activity.
-
Right-click a task in the task flow to which you want to add an XSLT and select
Define.
-
Drag the XSLT component onto the canvas. The XSLT window is
displayed.
-
In the Name field, type the XSLT name.
-
In the Note field, type the description. Click
OK.
The XSLT is added to the workspace.
-
Right-click the XSLT component and select Define.
The Define window is displayed.
-
Enter information for the following fields:
Option |
Description |
Input |
Enter the XML code that you want to convert to a different format. Click the mapping button
to update the input XML with additional mapped parameters. Note: When you map a component or an API
request to an XSLT attribute, for some XSLT attributes, you can select the text or node mapping. For
other XSLT attributes, the attribute is by default mapped as text or node.
Also, a complete
XSLT output can be mapped as an input for an API request and a complete API response can be mapped
to an XSLT input. For example, an activity that has task "A" with API and XSLT dialogs, for which
the API response is <department><name>ABC</name><address>1st
Lane</address></department> to retrieve the output as the complete XML, the XSLT
input request should be provided as
${/Parameters/ActivityContext/Task[@Name="A"]/Dialog[@Name="API"]/Response/department}
without providing any XML tags. |
Escape Input |
Select this check box to automatically escape unicode or
special characters in the mapping before the transformation. For example, when you map an input for
which the substituted values contain special characters, the special characters are automatically
escaped. |
XSLT |
Enter the XSLT code to convert data from the input XML to a different XML format. |
Output Format |
Select the output format as XML. |
Sample Output |
Optional. Enter the sample output code in which you expect to get the converted data in the
output XML. |
For more information, see the example.
-
Click OK.
The fields are validated and updated. If the XML code that is entered is not valid, you
get an error when you try to save the task.
-
Click Save as draft. A confirmation message is displayed, click
OK. Otherwise, click Task Flow (with the name of your
task) to finish the rest of the flow. Connect all the components in the order in which you want them
to flow.
-
If your activity designing is complete, click Mark as final.
The activity designer validates the activity definition and if there are errors, error
messages are displayed. If the validation is successful, then the activity definition is
complete.