Skip to main content

Hi,


I've got a library with versioning enabled. What I want to do is to get the document's version number. I've tried several ways but I haven't found any solution.


Is there a way to get a document's version number in K2 studio? The document event wizard "Get documents metadata" doesn't allow me to choose the version field...


 Thx in advance!


amanax

If you want the version of the item that the workflow is running on you can try _UIVersion or _UIVersionString under actual item Xml field. (unfortunately my K2 test environment license has expired so I cannot test it 😞 )


Or there is a "joker" event the reference event. You can solve that problem with custom method invoke.


 I hope I can help...


 


Hi,


 unfortunatly I found that you couldn't retrieve the document version (and the version comment) through built in features of K2. (nor in SmartObjects). We created a simple webserivce to retrieve these information and using it in InfoPath directly or in reference event within K2 process, and pass the data to the process.


Maxim


Hi Maxim,


 we solved it in a similar way. We also wrote a simple webservice to retrieve a documents version. However, we call it from the InfoPath form as we need the actual version number when opening the form. Moreove we created an universal data connection so that the webservice could be called from the InfoPath form.


thx & greetz


amanax


Hi,


 thats good. We found an strange thing when you use udcx and migrate into different enviroment: it would fail if you call the webservice automaticly (with checking the option in webservice dataconnection).


Btw. in K2 BlackPoint Studio, there is a known issue regarding webservice reference event, if you want to put webservice call in K2 process, its better to make a wrapper class and call the webservice through this wrapper. (you dont have to redo all reference events.)


 Regards,


Maxim


Reply