Skip to main content


 

Symptoms


In a K2 workflow (I use Visual Studio 2013), I tried to set an item using the "Get document reference" event. I proceeded as follows:
1- Create a new "Get document reference" event
2- Set site collection and select a library
3- In specify filters, I checked "ID" and enter an ID in it. I also set the reference Name as currentQualityItem
4- Then I click finish

Then I have created an "Update Document Properties" event based on this document reference. In this event, I specify some new values for the document properties.
When I call the workflow, the workflow finishes with no errors but the document properties are not modified at all.

So I tried to do exactly the same, this time without using the "get document reference". In the "Update Document Properties" I select "browse to document" and then do the following:
1- Set site collection and select a library
2- In specify filters, I select "ID" and enter the same ID as previously

This time it works perfectly well.

Is there a known issue with the "Get Document reference" event when we get a document by ID?
Any workaround to let me get the item in one place only? Or to let me use a variable in the "browse to document" box of the "Update document properties" event? Since I have more than 20 "Update document properties" event, when I go from QA to Prod, I have to edit the "browse to document" 20 times...
 

Diagnoses


Tried to reproduce and found similar results.
 

Resolution

Last suggestion made:
On your SharePoint 2013 Document Library, on the ribbon bar, click on the Library button, then on the K2 Application. On the next page, select "Workflow" and create a new workflow using the K2 for SharePoint Designer where you use the "Get Document Reference" and "Update Document Properties" events. Save and deploy this workflow (obviously give it a different name) and see if this works like it should?

Later on, you can save this workflow as a KPRX file (by opening it up in K2 for SharePoint Designer again) and using the "Save As" functionality. It will download a .EXE file which you can auto-extract to a folder, then open that solution in K2 for Visual Studio and edit it there.

However, keep in mind that whenever you deploy a workflow using K2 for Visual Studio, you can't open or edit that same workflow in K2 for SharePoint Designer again.

---------------------

Last response from customer:
I have already modified and deployed the workflow without using the reference.




 
Be the first to reply!

Reply