Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Parsing XML in execute script service


Not applicable
I have a XML type variable in my process which is supplied from front end .NET application. I want to catch that XML variable in execute script service window and add two new nodes of the same existing type in that XML. How is that possible? which getProcessData method I should use to access that variable in execute script and then how do I append childs in that XML. Please help. Thanks!
5 Replies


Not applicable
String FeedBackFor = patExecContext.getProcessDataStringValue("/process_data/@FeedbackForCN");

where FeedbackForCN is the name of a process variable

hope this helps


Level 9
I think you could probably do this completely with SetValue.

- get the current value of the node, and serialize it (to turn it into a string)

- manipulate the string, add your extra nodes to it.

- then deserialize the string, and assign it back to its parent node.

Haven't tried it, but it should work.



Level 8
Level 8

I have tried with:

String FeedBackFor = patExecContext.getProcessDataStringValue("/process_data/@FeedbackForCN") in my executescript-service, but nothing is stored in my FeedBackFor variable.

Just before invoking the executescript I check the variable with the logger and it shows that the variable contains the XML it should.

What could I be doing wrong?


Kim Christensen


Level 10
What is the variable type for FeedbackForCN?

If it's xml then your xPath needs to be /process_data/FeedbackForCN (no @ sign)



Not applicable
If you really want to use the execute script service, you can always use the getProcessDataValue(xpath) or getProcessDataValueByVariableName(variableName) methods...they both return Object objects, which you cast to the appropriate data type.

The methods of the patExecContext class are now documented here: