Skip to main content
November 27, 2022
Question

Process Task Report tasks and task in interface is not matching

  • November 27, 2022
  • 4 replies
  • 0 views

Hi In my task report there are 3 active tasks, but when I tried to query that report in Interface it is only showing 2 active tasks.

Can you please help me to know what is the issue?

Code for the same:

a!localVariables(
  local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: -1
  ),
  local!report: a!queryProcessAnalytics(
    report: cons!TS_Constant_Process_Approval,
    query: a!query(pagingInfo: local!pagingInfo)
  ),
  a!gridField(
    label: "My Tasks",
    instructions: local!report.description,
    data: local!report.data,
    columns:
    a!forEach(
      items: local!report.columnConfigs,
      expression: a!gridColumn(
        label: fv!item.label,
        sortField: fv!item.field,
        value: if(
          fv!item.configuredFormatting = "TASK_STATUS",
          index(
            {
              "Assigned",
              "Accepted",
              "Completed",
              "Not Started",
              "Cancelled",
              "Paused",
              "Unattended",
              "Aborted",
              "Cancelled By Exception",
              "Submitted",
              "Running",
              "Error"
            },
            /* Task status ids start with 0, so add one to reach the first index */
            tointeger(index(fv!row, tointeger(fv!item.field) + 1, -1 )),
            "Active"
          ),
          if(
            fv!item.configuredDrilldown = "TASK_DETAILS",
            a!linkField(
              links: a!processTaskLink(
                label: index(fv!row, fv!item.field, {}),
                task: index(fv!row, fv!item.drilldownField, {})
              )
            ),
            index(fv!row, fv!item.field, {})
          )

        ),
        align: if(fv!item.configuredFormatting = "DATE_TIME", "END", "START")
      )
    ),
    pageSize: 20,
    rowHeader: 1
  )
)


Thanks in Advance.

4 replies

stefanhelzle0001
Brainy
November 27, 2022

You did not pass any context to queryProcessAnalytics. Please provide the same context as configured in the process report.

November 27, 2022

Hi,

May you please also share the screen shot of local variable's values in the left palette just below the rule inputs?

Specially local!report...

Thank You. 

November 27, 2022

Hi Thanks for the response,

I used refresh method to refresh local variables and it worked.

November 27, 2022

great!