Skip to main content

Hi All,


I have a requirement of using a XML file in K2.Previously i was writing the schema there only in the XML metadata option but now i have to use the file in XML schema option which we get while adding XML fields instead of writing the schema there.


Can anyone help me regarding this.......


 


Thanks in Advance....

This allows you to import an existing XML or XSD document.  When you browse to one and select, K2 Studio will interrogate the structure of of it and create an XML field with the corresponding schema.


If the schema changes in the external XML/XSD file, then it will need to be reimported into K2 Studio in order for K2 to recongize the new schema.


First of thanks a lot for replying...


As you told that every time if we change the xml schema we have to reimport it in K2 but is there any other option to dynamically change the XML schema through  code.


As far as I can tell the XML schema is just there for you to select the fields in the GUI?

I don't use InfoPath so I don't know if there is additional integration with the schema import for InfoPath forms?


Thats what i want,actually previously i was using XML metadata to display the fields in GUI but now i want to use XML schema.So that whenever if i will make any changes in the file it will get reflected in the K2 XML schema also.I am not using InfoPath forms any where.


Previously the XML metadata was something like this......


<XMLDataFields>


            <TaskOutComes>


                        <TaskOutCome>Rejection Allowed</TaskOutCome>


                        <TaskOutCome>Rejection Not Allowed</TaskOutCome>


            </TaskOutComes>


</XMLDataFields>


I have to display "Rejection Allowed" and "Rejection Not Allowed" in the GUI which i was doing by the help of XML metadata but the problem is that whenever we want to make any changes then we have drill down to that process activity and make the changes.


Thats why now i want to use XML schema which will fetch the schema file from any other file and further if we want to make any changes in the schema we can change it in the file and it will get reflect in the K2 XML schema also.


Please let me know ASAP whether it is possible or not through code also..


 


Thanks in advance........


There is no out-of-box way to automatically update XML field schemas based off of the change of an external file.


I suppose you could use the K2 Studio Interop API (interop.k2studio.dll) to programmatically update the appropriate XML fields using the Studio API.  Unfortunately I have no examples.  Has anyone else tried this and if so, willing to share some example code?


 


 


Reply