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

Problem getting xml out of Document variable


Level 6
I have done this before, but I am getting a coercion error in this particular process.

I have a document variable that contains data submitted as XDP. I can verify during playback that the content is XML. I need to access data in this. I first am using a setValue to move it to an XML variable. This is where I am getting the coercion error.
6 Replies


Level 6
The process where I have done this before was long lived and this one is short lived. Would that be an issue?


Level 7
Does this process still work if you change it to a long lived process ?



Level 10
This should work. It shouldn't matter if it's long or short lived.

Are you sure the error is on that conversion.



Level 6
This is in a sub process. I have now moved the failing setValue mapping back into the parent long lived process and it works.

Other differences is the variable in the sub process is a document and a Document Form in the parent process. I was passing the Document Form in then trying to get the data out of it. I am now moving the data out into an xml variable, then to an xfaForm and passing in the xfaForm. The reason I would prefer the first way is I am calling the sub process multiple times and have to add the extra set value step in front of most of them.

I had even tried using a script step instead of a setValue. I tried using getInputStream off the document object as well the read methods. All I got was three characters total.


Level 4
S. Bishop

Have you tried using the exportData service? You should be able to extract the XML data from the Document using it.

Josh Boyle

Cardinal Solutions Group


Level 6
I believe the core issue was that the content type on the document was not set. I already changed my process and got around the issue another way, but ran into another similar issue where setting the content type fixed it.

I would bet the coercion utility uses the content type to decide what to do.