Skip to main content

Hi All,


1. I have a client requirement, where in, my client needs to archive all the infopath forms to be archived in a document library, irrespective of whether it has been approved or declined by any role in the workflow activity. I am getting an exception when I try to upload the document into the SharePoint forms library. My workflow activity has two outcomes - Approved and Declined and I want the form instance to be changed to a read-only view and archive it into the document library. I can see that it get archived without any error on Approval, however, I get this error only when it is Declined by the approver. (Wierd ... huh???)


The error says, there is a "Special Character" in the filename. Although, I just use the SN field from the K2 Node from within the infopath form, as the filename, K2 appends "|K2:<DomainName><User>" to the file name whenever it uploads it into the forms library. As a result the "|" symbol is giving me error. I tried to take out the new append from K2, but, to no avail.


2. I tried to make this a mandatory activity by dragging a default line from the previous activity, so that, it gets fired irrespective of whether it has been approved or declined by the approver. However, it gets fired for just one out come - Declined (and this event is not fired when the approver approves the form). I'm sure, there must be something, I'm missing out here.


Can someone help me out to resolve these?


Regards,


Anand

I have achieved this several times with no such issues. Instead of using the SN from the K2 node, rather build up the filename from the Process Data in the object browser, specifically [Process Instance > ID]_[ActivityInstanceDestination > ID]. As a matter of interest this string format is the actual format of the SN.


To achieve the read-only view I simply changed the [_K2/Document View] node to the name of the Read Only view BEFORE uploading the document.


To upload the document I used the Sharepoint Document Event Wizard and uploaded the XML Field (i.e. the XML field with the same name as the form name) with the filename set as above.


 


HTH


Reply