This content has been marked as final. Show 5 replies
String FeedBackFor = patExecContext.getProcessDataStringValue("/process_data/@FeedbackForCN");
where FeedbackForCN is the name of a process variable
hope this helps
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.
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?
What is the variable type for FeedbackForCN?
If it's xml then your xPath needs to be /process_data/FeedbackForCN (no @ sign)
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: