Description:
Get a value from a selected xml node
Usage:
Example:
Let’s build and execute the getXMLValueDef example.
- Create a new definition called “getXMLValueDef”
- Select the definition and click the “design” button
- Drag the above steps from the toolbox and connect as shown
- Select Update Variables step and configure the the following values for the properties as shown on the below graphic
- The XML value used here as shown below.
<root> <Book1> <MaterialID>123456789</MaterialID> <MaterialName>Roman Test</MaterialName> <Quantity>123.6</Quantity> <UoM>Kg</UoM> <Tolerance>2</Tolerance> </Book1> <Book1> <MaterialID>123456790</MaterialID> <MaterialName>Roman Test 2</MaterialName> <Quantity>133.6</Quantity> <UoM>Kg</UoM> <Tolerance>3</Tolerance> </Book1> <Book1> <MaterialID>123456791</MaterialID> <MaterialName>Roman Test</MaterialName> <Quantity>143.6</Quantity> <UoM>Kg</UoM> <Tolerance>4</Tolerance> </Book1> <Book1> <MaterialID>123456792</MaterialID> <MaterialName>Roman Test 3</MaterialName> <Quantity>153.6</Quantity> <UoM>Kg</UoM> <Tolerance>5</Tolerance> </Book1> <Book1> <MaterialID>123456793</MaterialID> <MaterialName>Roman Test</MaterialName> <Quantity>163.6</Quantity> <UoM>Kg</UoM> <Tolerance>6</Tolerance> </Book1> </root>
- Select GetXMLValue step and configure the the following values for the properties as shown on the below graphic
- Click on Maps xml node values to variables and map the XML nodes to variables/globals.
- Save the process definition, create necessary variable/globals, create a process instance and execute. The step should get XML node value details and store into the output variable.
- Select the process instance to render
- Click on the GetXMLValue step to view the instance properties