Saving a completed InfoPath doc


Badge +3

Please forgive the newbie ignorance.  I am trying to save a completed InfoPath doc to a forms library as the last activity in my process.  The end result is process portal indicates everything processed - my e-mails, tasks alerts, etc all run as planned, but I don't believe the form is actually being saved to the forms library.  It's not there.  In the upload wizard, I've selected the root node xml field for my source document.  I've named the doc to be saved with the ProcessID so that it's unique.  I've added .xml to the end of the file name.  Example of the file name:  ROOTXML - PROCESSID.xml


I've added the K2 services account to the library with contribute permissions.  Still won't show up.  I can't find any errors - everything says it processed to completion. 


11 replies

Badge +6

Hi,


Are you using the SharePoint Document event to upload the InfoPath XML to form library? if so, please check settings once, i believe in that the way that you are going is right. Perhaps, there could be some issues with the configuration. if provide me with the screen shot of the process it would help me to provide the root cause for this problem. Thanks

Badge +3

Yes, I am using the SharePoint Document event to upload the InfoPath XML to a form library.  I've attached a Word doc of my screen shots (change the extension back to .docx to open).  I'm wondering if the trouble is from the library.  I've created a form library to store completed forms.  This is not the same library that houses the form content type.  I've granted 'contribute' permissions to the K2 service account.  What should the permissions be?    The workflow works perfectly save for this last step.

Badge +6

Hi,


Can you please try with "_" when you are saving the form with .xml, might be - will be the issue, if it is not working please create another process file and concentrate on SharePoint upload event.


Please let me know your results.


 


 

Badge +3

Thank you so much for your assistance with this, but I discovered the error was entirely my fault.  I did not have the site URL defined for 'development' deployment.  Once that was entered - works like a charm! 

Badge +3

just curious. what do you do with the form while it's being routed around through k2 because only a copy of the XML is submitted to K2. The original copy is still sitting in the document library.

Badge +10

The K2 blackpoint Server will create the InfoPath form in the Forms Library as soon as a client event is active. When the client event finishes it will clean up the form and delete it from the library again, so the ones you are seeing must be active instances or ones where an error occurred while the K2 blackpoint Server was cleaning them up.


If you want to store the form as an XML file during the process then you have to use the the Document Event after the Client Event to upload the contents of the XML field to SharePoint as a file.


I suggest that you do not modify the temporary files the K2 blackpoint Server creates in the Forms Library.

Badge +2

Hi Klaz, I am also a new b. how did you set URL for development environment.

Badge +10

Hi Karan,


There are two ways:


1) In Visual Studio view the K2 Object Browser by clicking on the View menu > K2 Object Browser. When the K2 Object Browser opens up, ensure the environment is specified as Development (if not, change it using the drop-down arrow). Right click the field you want to modify and select Edit. Type the new URL and click OK.


2) Open the Management Console in Workspace. Expand the structure under your Server name to the following node: Environment Library > Templates > Default template > Environments > Development > Environment Fields. Look for the field you want to edit, select it and click the Edit button. This will allow you to chang the field to the new URL.


Hope this helped!

Badge +6

K2 will remove the form from the document library and creates a new documetn for the next activity processing. This is done becuase of the security reasons. If you want to store the document with all the information you have to use, sharepoint documents event you can store the file in a new document library. If you want to give a read only view to the users then you have to use data event to chnage the document view and then use the sharepoint document event to upload the document with that view.


Phalani.

Badge +4

Is there any way to do this in K2 Sharepoint Designer (4.5)?

Badge +10

Hi Mike,


It is strangely enough not possible.


There is a Create List item event which should have been able to provide this functionality. The problem however is that the Context browser does not allow you to drag and drop groups into the event wizard's fields. You are only able to drop fields. Even with Inline functions it is not possible to drop the top level node into the expression box.


Your best approach with this would be to design the Process using the K2 Designer for SharePoint and then export it to K2 Studio. Using K2 Studio you will be able to add a document upload event which can upload the top node of your InfoPath Form's XML field.


If anyone has any other ideas on how to accomplish this I would be interested to know.


Regards,

Reply