Skip to main content

HI,

 

I have a XML field in the kprx (workflow) page and I write to that XML field. It has various nodes. Now it writes fine because when I navigate to that workflow through workspace and look at the values for that xml it seems to be populated fine. Now in the next step i read from that xml. I drag and drop the various nodes into a smartobject input method. Now here, nothing seems to be passed to the smartobejct call.

 

Just wondering if anyone else has had this issue.

Thanks in advance. 

Did you define a schema for the field?  As I recall, XML fields are useless without that.

 

Once that is added, you should be able to expand the field in the object browser to access specific nodes of the XML.


Thanks for your reply,

 

Im not entirely sure what you mean by creating a schema in K2. What I did to create the XML field was to fo to the process fields context menu and under the process level data fields and them XML data fields section. Create a XML field and then right click on that and add kept adding nodes. I only had to give the name for each node.


My experience is that that method rarely works. :)

 

What I have always had success with is creating an .xsd XML schema file (there are tools online that can assist with this).  Save the resulting .xsd file to disk.  Then in the XML field properties dialog, go to the XML Schema tab, click Browse, and point it at the .xsd file.  K2 then reads the schema and generates the nodes hanging off of the field for you.


Thanks Scott,

 

I also tried that method but no luck. I spent far too much time on this trying to get it to work. Changing node types etc etc. No matter what combination i treid, it just wouldn't read from them. I gave up and used normal datafields in the end; although i did end up with a lot of datafields. Its very strange becasue, I have used XML datafields before and have been able to read from each node in the workflow. I followed the same exact process as before. The only difference being that ths XML field had about 20 nodes and the previous ones only had about 5.

 

Thanks for your help.


Reply