OOB SmartObject to get Task Count


Badge +4

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. 


4 replies

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

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.

Badge +10

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%3FTocPath%3DRuntime%2520APIs%2520and%2520Services%7CWorkflow%7CWorkflow%2520REST%2520API%7C_____0

 

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!

Userlevel 6
Badge +16

Hi jwesener2,


 


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


Reply