jwesener2
Novice

OOB SmartObject to get Task Count

Is there an OOB SmartObject available to show the count of total tasks assigned to a specific user?  Ideally it would allow input or filter properties for a specific Process Name. 

 

I need to be able to display this on a form without first loading the Worklist Control. 

0 Kudos
Reply
4 Replies
emilyc1
Apprentice

Re: OOB SmartObject to get Task Count

Hi jwesener2,


 


The closest OOB SmartObject  I can think of that could accomplish this would be the Activity Instance Destination SmartObject. You can filter Status = "Active" and input the user's FQN for the Destination input, which would return the total number of active tasks as the amount of rows. Unfortunately this does not have any sort of column that will output the actual task count, however you could always call an API to count the rows or build another SmartObject based off of these results to display task count on a view for example. 


 


Cheers,


Emily

0 Kudos
Reply
Widson
Apprentice

Re: OOB SmartObject to get Task Count

Hi  @jwesener2;

 

I think another alternative will be to create a customized K2 worklist  in smartform as shown in the following link (http://help.k2.com/onlinehelp/K2Five/DevRef/5.2/default.htm#Runtime/WF-Client/Retrieve-worklist.html)

and/or make use of  worklist service broker as shown here (https://community.k2.com/t5/K2-blackpearl/Worklist-Service-Broker/ba-p/889?nobounce).

 

Should you find the above content useful, kindly Mark such as "Accepted Solution and/or Kudo", to assist other community members searching for similar solutions.

 

Kind regards;

Widson.

0 Kudos
Reply
JohanL
Apprentice

Re: OOB SmartObject to get Task Count

Hi,

 

Another option is to make use of K2's Workflow REST APIs to get the counts.

http://help.k2.com/onlinehelp/k2five/devref/5.3/default.htm#Runtime/WF-REST-API/WF-REST-API.htm%3FTo...

 

You can then register a REST service instance pointing to this instance. 

There is a Task object that exposes a method called "Get Tasks" and this gives you the count as one of the properties.

 

Hope this helps!

0 Kudos
Reply
khanh1
Apprentice

Re: OOB SmartObject to get Task Count

Hi jwesener2,


 


Perhaps, another option is to use the Workflow Instance reporting smartobject.


7711i1B738493B0E927F8.png

0 Kudos
Reply