Skip to main content
Nintex Community Menu Bar

REST API - Out of Office Tasks

  • May 7, 2020
  • 7 replies
  • 108 views
  • Translate

Forum|alt.badge.img+3

We are using the workflow REST API to list, open/assign, and action workflow tasks through a custom web app. We have discovered that tasks assigned to a different user through out of office forwarding do NOT show up in the list of tasks. Additionally, you cannot open/allocate or action these tasks through the API endpoints either. Has anyone else run in to this, or possibly found a solution for handling OOF tasks through the API?

 

If I recall correctly, this functionality was available through the on-prem api endpoints, through passing a "shareduser" parameter.

 

Thanks in advance!

7 replies

You can call the Rest API smart object to get the details. 

 

Smart object is - com_K2_System_Workflow_SmartObject_WorklistItem

 

If you are using k2 forms then there is no need to call API and all just go and call the smo direct on form and get the task.

 

you can find the smart object here.

 

Categories -> System -> Management ->  Workflows -> (Worklist Item)

 

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 9 replies
  • May 13, 2020

Hi  @ProInception ,

 

Thanks for the response. I'm glad to know about that SmartObject because it does give me the list of items, including OOF tasks, but that appears to be the only method it contains. I'm also looking for a way to open, assign, and action those OOF tasks through the REST API.

 

Calling the task endpoint with the SN provided in that SmartObject result still results in 'access denied'.
/Api/Workflow/Preview/tasks/:serialNumber


Thanks again!

Translate

you need to write rules on form and you can do everything by using it . There you can find serial number as well.


@dknudsen&nbsp;wrote:<br><p>Hi&nbsp; <user-mention data-id="29193">@ProInception&nbsp;,</user-mention></p><p>&nbsp;</p><p>Thanks for the response. I'm glad to know about that SmartObject because it does give me the list of items, including OOF tasks, but that appears to be the only method it contains. I'm also looking for a way to open, assign, and action those OOF tasks through the REST API.</p><p>&nbsp;</p><p>Calling the task endpoint with the SN provided in that SmartObject result still results in 'access denied'.<br><span>/Api/Workflow/Preview/tasks/:serialNumber</span></p><p><br>Thanks again!</p><hr>

Hi  @ProInception&nbsp;,

 

Thanks for the response. I'm glad to know about that SmartObject because it does give me the list of items, including OOF tasks, but that appears to be the only method it contains. I'm also looking for a way to open, assign, and action those OOF tasks through the REST API.

 

Calling the task endpoint with the SN provided in that SmartObject result still results in 'access denied'.
/Api/Workflow/Preview/tasks/:serialNumber


Thanks again!


 

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 9 replies
  • May 13, 2020

Sorry, I forgot to clarify that this is not a K2 Smart Form. We have written our own UI (.Net), and we interact with K2 through the REST API only.

 


@ProInception&nbsp;wrote:<br><p>you need to write rules on form and you can do everything by using it . There you can find serial number as well.</p><hr>

you need to write rules on form and you can do everything by using it . There you can find serial number as well.




Translate

OK then its ok you need to construct your worklist URL and pass the serial No SN value and then get it into worklist that's it.

 

are you facing any isuse?

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 9 replies
  • May 15, 2020

Yes, the issue is that when I have a task assigned to me, due to Out of Office Forwarding, the REST API returns:

{
  "Message""Task could not be retrieved. Either access denied or not found."
}
I used the SmO you suggested earlier, and see the item in the result set with SerialNumber 809_56. The AllocatedUser is not my username, because of the OOF. Sending the request to https://*****.onk2.com/api/workflow/v1/tasks/809_56
 
Tasks that are assigned to me in the traditional manner, have no issues. Only OOF, as it seems to be missing the SharedUser parameter, or something. Even the K2 worklist passes in a "&SharedUser=" parameter, when you watch what it is doing.
Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 9 replies
  • May 22, 2020
There's a submission on the idea forum for this, could use some more up votes:
https://ideas.k2.com/ideas/APIT-I-1250
Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings