Skip to main content

We have a query regarding k2 performance. The scenario in our project is that we expect around a million process instances( including Active, Completed) created in our system in PROD environment. And at a point we need to query the tasks which are being assigned to a specific user. For this we are relying on the K2 in built “ActivityInstanceDestination” smart object to do a query and find out the tasks that are assigned to a  particular user. We did a sample check and found that for 30k process instances the query to get the tasks assigned to user ( using ActivityInstanceDestination smart object) is taking around 10sec. In PROD this will be degrade the performance more as we will have million process instances.

Do you have any inputs or suggestions to handle this particular case, why the ActivityInstanceDestination Smart object query performance is that slower. Is there any way to tweak its performance or is there any other way to get the tasks assigned to a particular user( both Active and completed ones).

The ActivityDestinationInstance SmartObject is part of the reporting SmartObjects used to show historical information.  It happens to show the current assignments, but it is a historical log of all task assignments that have ever occurred.  So as you execute a million workflow instances every year the historical data will grow and the time to query this data will increase.  There are other SmartObjects under the System category that can be used to return only the currently assigned tasks rather than historical and those will be more suitable for your needs.  The only catch is some of those system SmartObjects require the users to have admin rights on the workflow.  If that doesn't meet your needs there is a project on the Market section of Community that includes a worklist service broker that also only returns active tasks.


Hi David, 

Un fortunately we cant rely on the other system smart objects as we need the information of ActivityInstanceDestinationID of the worklistitems.

Can you point us to the Market place application that you are mentioning so that we can have a look at that once.


Reply