Skip to main content

Hi,


Is there any worklist item URL available for updating a given task? We have a custom worklist and would like to implement the possibility to action the task without the user opening the item. We can of course implement this in a service using the K2 API, but if there is already a URL available in the RuntimeServices we would use that. 


Any feedback appreciated!


Anders

If you are using a custom Worklist, you do not need the URL. Just access the SerialNumber property of the WorklistItem object directly, and if you are using an external system, you need to use the ImpersonateUser method. 


If you are using version older than 4.5 KB 1420 you may need to stil use a dummy URL in the Client Event. For 1420, this also becomes optional with the introduction of SmartActions.


 


Also, just to check, when you say update, does that mean complete the item, or just update some variables, save it and wait for the user to actually complete it?


Sorry - the background information for my question was not complete. We do in fact have a custom worklist for our solution, but what we are actually trying to do in this case is to create a SSRS based report that allows the user to search for and display a summary of a given task. The user should then be able to update/complete the task without having to open the infopath form of the task. The idea was then to create an URL to do this from the displayed SSRS report to perform this task. The question is then whether there already exists a service for doing this instead of creating one ourselves. 


Thanks,


Anders


There's nothing out of the box that I know of, but you should be able to do that easily using the API or relevant service to create a page/service that will update or complete the Worklist item using the Serial Number and Action selected. 


What about using the K2Services Rest service. 


 http://localhost:81/K2Services/REST.svc/Worklist/Items(2199_120)/Actions(Approve)/Execute


I just did a test by passing it the tasks serial number and the action in the url.  I entered that URL in my browser and it the activity completed.


Here is the link in the out of the box help that gives some examples:


Developer Reference > Services Reference > K2 Services > REST Services > Worklist Service


Regards,


Tim


Nice one Tim. I think that's exactly what Anders needs.


Thanks, will try that. Although I already created a custom page for this I prefer using out-of-the-box functionality.


Thanks for your help,


Anders


Reply