torecord( xml, type )
Converts XML to a value of the given data type.
The XML text representing the Value to convert.
Enter a variable (process variable or activity class) that has the same data type that you want the XML to be converted into.
The XML given for the xml parameter must be valid for the XSD that was used to create the target data type.
Whether the input XML needs to have a defined namespace depends on whether an
elementFormDefault attribute was set with a value of "qualified" in the
schema tag of the XSD. If no
elementFormDefault attribute was given, the default is "unqualified" and the given XML does not need to have a defined namespace. CDTs created using the Data Type Designer do not have an
elementFormDefault attribute, and therefore do not require the namespace to be defined on the given XML.
For example, if the
pv!nameXMLData variable contains the following data, it will transform correctly into the CDT used as the data type for
1 2 3 4 <PersonName> <First>Edward</First> <Last>Denton</Last> </PersonName>
If the CDT used as the data type for
pv!PersonName was created with the
targetNamespace set to
elementFormDefault set to "qualified", the following XML must be used:
1 2 3 4 <PersonName xmlns="http://www.bpmbasics.com/Person"> <First>Edward</First> <Last>Denton</Last> </PersonName>
— OR —
1 2 3 4 <p:PersonName xmlns:p="http://www.bpmbasics.com/Person"> <p:First>Edward</p:First> <p:Last>Denton</p:Last> </p:PersonName>
The result of this function is not automatically saved into the process variable passed in the type parameter. You must store the result of this function into a process variable.
You can copy and paste these examples into the Expression Rule Designer to see how this works.
pv!nameXMLData to the same data type as
Can be used with Appian Portals if it is connected using an integration and web API.
|Offline Mobile||Partially compatible||
Can be used with offline mobile if it is loaded at the top of the form.
|Sync-Time Custom Record Fields||Incompatible|
|Real-Time Custom Record Fields||Incompatible|
You cannot use this function to configure a process report.
You cannot use this function to configure a process event node, such as a start event or timer event.
On This Page