Try to update the Worklist item before finishing it i.e. call k2Wli.Update() before k2Wli.Finish().
Hope this helps,
Ockert
Hi Ockert
I have tried that, I have also tried k2Wli.ProcessInstance.Update() and neither made a difference.
Any other ideas?
Please have a look at the included document. Change your code format to look like one of the examples.
thanks for that - seems to make sense. I'll give it a crack at work tomorrow and let you know. It does beg the question, why? Corrent me if I'm wrong but is Activity data generally only used in a multi-slot scenario?
Cheers
Jonathan
Have just tried it out and it works a treat!
Do you have others method to update the xml programmatically in K2 ?
Because that method do not work well with a digital signed form, The signature became invalid, and when I open the infopath form it says that the document has changed and the signature is now invalid.
Can I just update the xml node I want to change(with some method), and not all the xml ??
Hi all,
This is similar to something I'm trying to do, but can't get it to work.
I have split my workflow process into 3 separate processes. At the completion of the first I initiate the second, but the infopath xml data is not being passed on to the next process.
And to update it programatically it seems that the first process instance has to still be active, and the second also has to be active. The problem is that the first ends before the second starts.
In the event of the final activity of the first process, I am instantiating the second process with this code:
;Authentication=Windows;SecurityPackage="
' Set The Process
K2.Process = "eMOCeMOC PreStartup"
' Set The Folio Mapping
K2.BindFolio(IPCBindType.ProcData, "MOCNumber")
K2.BindField(IPCBindType.ProcData, "InstanceID", "InstanceID", IPCBindDirection.Out)
End Sub
Is there something I can do in here to pass the xml data to the second process?
You will need to add the datafield binding for your InfoPath schema as well. Easiest would be to rerun the IPC template and just ensure that you select the InfoPath schema there.
Alternatively you can add the binding yourself using code:
K2.BindField(IPCBindType.ProcXml, "K2InfoPathSchema", "K2InfoPathSchema", IPCBindDirection.InOut);
Also, if you need to keep the parent process 'alive' until the child process has finished, make the IPCEvent Synchronous.
From past experience I have seen that it is NOT a good idea to end your process flow with an IPC event due to timing constraints/issues. For safety sake, add an Activity (EndProcess) after the Activity containing the IPC event with a StartRule to start, say 1 minute after planning. This Activity can contain an empty Default Server Event.
Regards,
Ockert