Skip to main content

Hi all,


Now I'm having workflow that integrated with InfoPath.


My scenario is:


1. There is a web service that will start my workflow automatically


2. InfoPath document will be saved in SharePoint document library


Since workflow will be started automatically, so I think the option "Start without InfoPath form" should be my choice. (Please correct me if I'm wrong) But I still have no idea how it works, Do I have to fill-in data for those K2 fields (such as connection string, SN, etc...) manually so the InfoPath form can connect to K2 when the first destination user open the form?


The other thing is I would like to save InfoPath form in that document library (so user can open it later), how to tell the K2 workflow that which InfoPath document should be open, I cannot find how to specify URL if I'm using InforPath client event...


Thanks for any information in advance, I'm in the darkness right now =_=

1. you can write a code ( K2 object model) in your web service that starts processes instance.


2.  if you need to pass some data from web service to processes instance , then you can use process instance data variables.


3. You can user SharePoint document event in workflow to upload xml file onto form library. Hope this helps



Hi,


Yes you are correct, since your web service will start the workflow the start option should be "Start without InfoPath form". When you integrate the InfoPath form to your K2 process, K2 creates an XML field containing all the XML nodes defined in the InfoPath document. K2 will also set the required fields, like the Connection string, etc. in the initial values of the XML field. When you start your workflow you do not need to change anything on this field since it will be populated withe initial values which should be correct.


In your InfoPath integration wizard you specify the forms library where the temporary forms will be stored. After configuring this wizard K2 will automatically know that the temporary forms should be uploaded there and will generate the correct URL and display that to the user on his/her worklist. Simply configure an InfoPath Client event, slect your InfoPath form, view and action field and complete the wizard. When the process reaches this point, K2 will build up the URL and create a worklist item for the user with the correct URL specified. When the user clicks on the item to open it the form will be loaded from SharePoint.


To save a copy of the document after the process completes, use a SharePoint document event. Specify to upload the document from a process field and select the XML field which the K2 InfoPath Integration Wizard created. Since K2 maintains the contents of this field, it will have all the filled in values which were supplied during the process. Using this approach you do not need to know any URLs since K2 will have the latest data in the process definition.


Hope this helps!


thanks jpmarrapu and JohanL !! it really helps :)


Reply