How is it possible to read from XML variable? I tried using
patExecContext.getProcessDataDocumentValue
patExecContext.getProcessDataValue
and it didn't work. Can someone please help
Aditya
Views
Replies
Total Likes
maybe try getProcessDataStringValue?
Views
Replies
Total Likes
It removes the XML tags.
XML Value
<form1>
<Details>
<review_from type="VARCHAR">06292009</review_from>
<review_to type="VARCHAR">06282010</review_to>
<site_name type="VARCHAR">General Electric Office, Schenectady</site_name>
<site_street type="VARCHAR">1 River Road</site_street>
</Details>
</form1>
Resultant Value
06292009
06282010
General Electric Office, Schenectady
1 River Road
Aditya
Views
Replies
Total Likes
Try 'getProcessDataValue'.
I did a little test with two process variables
1) xmlData - variable type 'xml'
2) xmlStr - variable type 'string'
and two services
1) Set Value
/process_data/@xmlStr <> serialize(/process_data/xmlData)
2) Custom Script
String xmlStr = patExecContext.getProcessDataValue("/process_data/xmlStr");
patExecContext.setProcessDataValue("/process_data/xmlData",xmlStr);
where the value of xmlStr was
<form1>
<Details>
<review_from type="VARCHAR">06292009</review_from>
<review_to type="VARCHAR">06282010</review_to>
<site_name type="VARCHAR">General Electric Office, Schenectady</site_name>
<site_street type="VARCHAR">1 River Road</site_street>
</Details>
</form1>
and the resulting value of xmlData was
<form1>
<Details>
<review_from type="VARCHAR">06292009</review_from>
<review_to type="VARCHAR">06282010</review_to>
<site_name type="VARCHAR">General Electric Office, Schenectady</site_name>
<site_street type="VARCHAR">1 River Road</site_street>
</Details>
</form1>
Steve
Views
Replies
Total Likes
Are the two services different ways of doing the same thing? Or, you assign the xmldata to xmlstr using setValue and then assign the string value back to xmldata.
Aditya
Views
Replies
Total Likes
I wanted to go through the exercise of passing XML and an XML string through patExecContext.
Views
Replies
Total Likes