Skip to main content

After certain activities, I am using an SharePoint Document event to upload a copy of the InfoPath form (xml node) to a SharePoint Document Library within a sub-site.


This is working. However, now I want to change the value of a node/field within the "shadow" InfoPath form. I don't want to change the of the InfoPath form that is stil being routed around by K2 so I either have to somehow do this before the shadow copy is written to the subsite or after. Each instance of the workflow corresponds to a subsite so there is a dynamic nature to this problem as well.


The shadow copy of the InfoPath form allow other users to visit the subsite and view a relatively updated copy of the InfoPath form while routing is still occurring. The problem is that the shadow copy needs to know that...well, it's a shadow copy. So, if K2, can set a flag in the IP form, then on FormLoad I can have the IP form lock down the IP views and provide the user with a message stating that the form is still being routed. I obviously have to be careful not to flip the "IsRouting" flag in the official K2 copy of the form.

Hi nutz4k2,


I think this is possible if you make use of another XML field. Create another XML field using the same structure as the current one used by your InfoPath form.


Use the DataEvent to copy the Form's XML field to the Shadow XML field.
Then in the same activity use the DataEvent again to update the shadow XML field's node to what you need.
In your Document Upload event upload the shadow XML field to the Library.


Using this approach you never update the main XML field and will not compromise the XML of the InfoPath Form.


Hope this helps!


Reply