Obtaining XML schema via FilterService

  • 20 March 2007
  • 1 reply
  • 2 views

Badge +1
Hi Everyone,

I need to build up a DataSet from a process XmlField via the FilterService. I could get the XMLField value (the data itself) but I could not obtain the schema of the XmlField.
When the XmlField is empty I have no info about the schema either.
This makes impossible to build the DataSet schema when the XmlField is empty. (in this case I need an empty DataTable with the columns) I hope there is a way to get this schema in a similar way I get it with the K2ROM.
As a workaround I load the schema from a separate file now.

Thanks
Istvan

1 reply

Badge +5

Hi Istvan,


If you understand correctly you want to retrieve the total possibly schema for your process definition not just what's currently populated.


 A quick way to do this is when your page/app loads open a connection to the K2 server and request


K2.ProcessInstance.XmlFields["YourSchema"].MetaData;


Esnure that when your editing your processes schema that you click on the XmlMetadata tab and then click "Create XML Instance".  This generates a blank xml doc for you with all the possible elements.


Please let me know if this works or if you have further questions.


-mike

Reply