Skip to main content

I have a K2 blackpearl process with an InfoPath form, and there are two parallel activities. The legal approval activity will have a few changes to the form which I don't want to get overwritten by the price proposal activity.


I thought I knew how to do this - write the XML fields I need to save to some process data fields during the legal approval activity, after the InfoPath client event. Then, during the price proposal activity, write from these data fields back to the InfoPath XML fields (also after the InfoPath client event). I thought I could do this with the activity destination XML, since that would get written back to the process instance XML during the succeeding rule.


However, it is not working. Saving the information to the data fields works, but it's not getting saved back into the form during the price proposal activity. So maybe I am totally mixed up about activity vs. process data and/or this works a lot differently than in K2.net 2003.


Do I need to edit something in the succeeding rule to make this work?


Thanks,


Beth

Hi Beth,


The best and simply way to do this is to deal with SmartObject. Here, the big steps.


You create a SmartBox SmO with properties corresponding to your form data (not necessary all, but at least the one you manipulate during the parallel activities), add an property coresponding to the K2ProcessInstanceID. Once created, you add the load and the create method as SmartObject methods in your form using the SmartObject Integration step ; these will become datasources in your Infopath Form.


Now, you just need to execute the create method when you submit one of the parallel activities to populate your SmO. Then If you whant to display data from your SmO to your form you need to execute the Load method (using the K2ProcessInstanceID property)


HTH


Thanks! I think i will try this in a future process. For now I got this working with a few process datafields.


My mistake was that I was writing over my activity instance XML with the process instance XML in my event that changed the Document View field. And I had that in every activity so it was really confusing me. Once I fixed that, then everything worked as I thought it should. I was glad that my understanding of process vs. activity was accurate!


Beth


Reply