REST API get all available, unassigned task using administrator profile

1
0
-1

I would like to get all available, unassigned task (assigned_id equal to blank or null) via API using an administrator account/profile.
Reason for this is to create an auto-assign task for users who are currently online or active. Auto-assigning will be based on availability of the user or base on his/her current assign load.

How can i filter this to the API?

1 answer

1
0
-1
This one is the BEST answer!

If you just want to list task yous must use REST API with "Finds HumanTasks"
You can add various filters to define the tasks.
https://api-documentation.bonitasoft.com/latest/#tag/HumanTask/operation...

Ex: /API/bpm/humanTask?p=0&c=100&f=state=ready&f=assigned_id=0

Comments

Submitted by chris_dev on Thu, 11/16/2023 - 06:28

The problem with humanTask and userTask api is that it can't filter in assigned_id field equal to null or empty (i'm using an administrative account).
How can i filter all task without assigned_id?

Submitted by sjamet on Thu, 11/16/2023 - 06:42

I think /API/bpm/humanTask?p=0&c=100&f=state=ready&f=assigned_id=0 might work.

In my case i have only unsigned tasks.

Submitted by chris_dev on Fri, 11/17/2023 - 07:28

@sjamet you are right, set value to zero works

Notifications