Skip to main content

Hello!  I am working on a proof of concept where I import PDF files from a file share and add to process instance in the workflow.  There are two halves to the POC, one to create the workitem from a .NET service which will populate data from an XML file and the second half is to put it into workflow and pull in the PDF using the GetFileFromLocation inline function.  I have opened a ticket with support as I think there is a bug but wanted to post this to see if anyone had any ideas.  I'm using K2 Designer for this but I think the result would be the same if I was using K2 for Visual Studio however, being pretty new to K2 maybe I am incorrect in that assumption.  

 

For the workflow half, I'm creating a smart form and manually entering in the data which includes a field for FileName and FilePath.  The full process will automatically fill in these values and create a workflow instance.

 

Here is the summary of the ticket I opened along with the screen shot I included as support.  Any input woudl be appreciated!  Thanks!

 

 

I have been trying to use the GetFileFromLocation inline function for pulling in PDFs from a file share into a workflow process instance. I have set up the function with two fields that are completed on a SmartForm for FileName and FilePath. I include the full file path and file name in the FilePath as I was experiencing permission errors when I did not have the file name in the FilePath value. When I do the GetFileFromLocation, it adds an encoded XML string into a nvarchar(max) column in my database (set up as a File attachment in the Smart Object and called IncomingFax). However, the XML appears to be malformed as it as some garbage characters after the <content> tag and thus it does not appear in my SmartForm when I pull the item from an activity queue (basically the control is the default where you can import a file yourself).

To test this, I removed the GetFileFromLocation from my workflow and simply used the Attach File control on the same Smart Form to manually add the same file, started the process and was able to see the attachment and view it.

I have attached a screen shot from the database where you can see the two instances. Col 1 is the pdf I imported via GetFileFromLocation and Col 2 is by using the attachment control.

Is this a bug or is there more I have to do in setting up the GetFileFromLocation inline function?


16227i64ABF147A92E4440.png
Be the first to reply!

Reply