Skip to main content
I have a project that involves two different subprocesses using an InfoPath form. When one process is finished, it puts certain fields from the InfoPath form into data fields so that they can be passed to the other process via IPC Server Event.

The problem that I am having involves a repeating node in the InfoPath form. Since you are only able to pass simple data fields through the IPC Server Event, I am forced to put all of the fields that I want to pass into a simple data field. However, with a repeating section, I am unable to do this. Is there a way to pass repeating fields from one K2 process to another?

I am currently trying to take the xml for the entire repeating section and put it into a string so that I can pass it to the new K2 process. Then in the new K2 process I would just replace that string of xml where the repeating fields should be in the new xml of the InfoPath form. However, this doesn't seem to be working. Any suggestions on how I can do this?
A quick and dirty way to do this would be to create a new XML datafield in your child process, using the same schema (InfoPath schema in your case) as the parent.

You can do this very easily by using the Import Data Field wizard. Just name your temp XML field something other than the default K2InfoPathSchema since the child process will also be InfoPath enabled. Just ensure that you do not enable auditing for this field. You may also want to make it a hidden field.

Then, in your IPC event, just copy the entire XML field to the child process. You can then manipulate the data as you please in the first activity of the child process and just clear this temp XML data field once you're done.

I believe this should be a lot easier than having to create and populate multiple fields in the parent proc, especially when it comes to repeating sections.

Reply