Skip to main content
justins0004
January 30, 2021
Question

Active Task Dashboard with multiple assignees (Group or users)

  • January 30, 2021
  • 0 replies
  • 0 views

Hi Everyone,

I have a Request dashboard with few filters. This dashboard includes all the active tasks part of the application.
I am facing a timeout issue (> 2 secs) when I use the filter for assignees (intermittent). User can select a particular group or an user to filter. I am looking for suggestion on this filter for assignees.

To fetch the active tasks we are using a process report that filters all the active tasks with the report context being all the process models within the application.
We have around 70 process models and currently active tasks in the Production is around 5600. When it was below 4000 active tasks the filters were working great.

Key points:
1. The tasks can be assigned to multiple assignees which could be group and/or multiple users.
2. On the report I have a column "Task Assignees" which I has:
- Definition: =joinarray(task_assignee_owner(),";")
- Formatting: Normal Text

The "Task Assignees" column was made this way because of multiple assignees and in my Query Process Analytics I am using:
a!queryFilter(
field:"c31",
operator:"includes",
value:ri!assignedTo_usrOrgrp
)

I tried another approach earlier which is described below, but it is more time consuming because of using non Text formatting
In my report I had 2 separate colums for assignees:

1. C29 (Assigned Users) = tostring(touser(task_assignee_owner())) of formatting "Normal Text"
2. C30 (Assigned Groups) = tostring(togroup(task_assignee_owner())) of formatting "Group Profile"

Code piece in my queryAnalystics

if(
runtimetypeof(ri!assignedTo_usrgrp)=5, /*Check for Groups*/
apply(
a!queryFilter(
field:"c30", operator:"includes", value:_
),
touniformstring(union(togroup(ri!assignedTo_usrgrp),togroup(ri!assignedTo_usrgrp)))
),
{}
),
if(
rule!APN_isBlank(ri!assignedTo_usrgrp),{},
a!queryFilter(
applyWhen: runtimetypeof(ri!assignedTo_usrgrp)=4, /*Check for Users*/
field:"c29",
operator:"includes",
value:ri!assignedTo_usrgrp)
)