tbyrne777
Cloud Wanderer

Release/Redirect via SmartObject

I'm trying to create a SmartObject that will allow users to Release/Redirect their tasks from a custom dashboard. In the past, I would write a custom WCF service to handle this and wrap it in a SmartObject - I'm trying to avoid this by using some of the more out-of-box services instead.

 

Using the "Task" SmartObject that exists under "SystemManagementUsersSmartObjects" requires that the current user be a Server Admin to release their tasks, so that is out of the question.

 

Using the WCF services endpoint, the "Release" and "Redirect" functions there seem to try to open the work item before releasing it, and even though it is running under the context of the K2 service account it is unable to do so. I was hoping these would just administratively release the task (much like the K2 Management site does).

 

So the question is if there is any out of the box hook that can be used to allow regular system users to release and/or redirect tasks without having to roll my own service to do so?

0 Kudos
Reply
6 Replies
Not applicable

Re: Release/Redirect via SmartObject

Hello,


 


I think our best bet is to utilize the Workflow REST API and create a SmartObject from the REST broker to do this. THis way we can use the Service Account's credentials to run this and don't need to provide any additional permissions to users. 

0 Kudos
Reply
tbyrne777
Cloud Wanderer

Re: Release/Redirect via SmartObject

Thank you, I  had made an attempt to do this but was unclear what values to use in the REST broker to configure the out-of-box REST API. Is there any documentation with guidance on this?

0 Kudos
Reply
Nik
Nintex Newbie

Re: Release/Redirect via SmartObject

Hi  @tbyrne777

 Please find below link for Workflow REST API documentation

https://help.k2.com/onlinehelp/k2five/userguide/5.0/default.htm#K2_Management_Site/Integration/Workf...

 

I have executed this using postman 

Redirect 

 

URL : http://bpmdev.com/Api/Workflow/V1/tasks/SN/actions/redirect 

Body :  {
"RedirectTo":"UserName"

 

Release

 URL: http://bpmdev.com/Api/Workflow/V1/tasks/SN/actions/release

 

Hope this will help you.

 

0 Kudos
Reply
tbyrne777
Cloud Wanderer

Re: Release/Redirect via SmartObject

Thanks, I was able to get that far but I was hoping to create a SmartObject that binds to the Workflow REST Api... I couldn't figure out how to register it as a service instance

0 Kudos
Reply
Widson
Nintex Newbie

Re: Release/Redirect via SmartObject

0 Kudos
Reply
dodge1976
Design Dabbler

Re: Release/Redirect via SmartObject

Hi!

This would really help solving a problem in daily application management! I want to offer the process owners the possibility to release a task from their process forms. 

 

I enabled the REST API (currently running on 5.1) and also created a service instance / SMO based on the REST service type linking to it. I used the service account as static credentials in the service instance. When I execute the ReleaseTask method with a serial number it doesn't find it. The task is currently opened by my regular user account. When I configure the service instance to use my regular user account I can use the SMO to release the task. The service account has admin permissions on this workflow. It works for the user who has currently open it. Any ideas or suggenstions?

 

Many thanks!

Joachim

0 Kudos
Reply