report

Hi all, I have created process report type as context type -Tasks assigned to group for the lists of tasks assigned to group(abc,mno,xyz). and when I tried to test through the a!queryProcessAnalytics(report:"my report") it is throwing the error that "Empty context passed in for report sg1 [id=46716]. (APNX-1-4156-000)". even though I have given the report context with list of groups.

Can Anyone suggest on this ?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to JS0001

    So the process report itself shows all task as expected, but QPA does not?

    Could it be that there are more tasks than the standard batch size is. Did you try to use a pagingInfo with a large batch size in the QPA call?

  • I agree with Stefan - please paste your entire QueryProcessAnalytics call here so we can see exactly what you're doing.  That is, including the "query" block including "pagingInfo".

  • No it is giving me the list of manager tasks only. It is not showing maker and checker group tasks.

    If I am taking this correctly, this reply to my question (?) indicates the underlying report in /design does not show anything other than the Manager tasks, so there are no others in the report to pass up via QPA.

    For which we have not confirmed there are any other of these tasks active in the system, for those other 2 groups?  

  •  a!queryProcessAnalytics(
          report: cons!MY_REPORT,
          contextGroups: {
            cons!MANAGER_GROUP,
            
          },
          query: a!query(
            logicalExpression: a!queryLogicalExpression(
              operator: "AND",
              logicalExpressions: {
                a!queryLogicalExpression(
                  operator: "OR",
                  filters: a!forEach(
                    items: touniformstring(
                      {
                        cons!CR_APP_TXT_ALL_PROCESS_MODEL_NAMES[7]
                      }
                    ),
                    expression: {
                      a!queryFilter(
                        field: "c16",
                        operator: "=",
                        value: fv!item
                      )
                    }
                  )
                ),
                a!queryLogicalExpression(
                  operator: "AND",
                  filters: {
                    a!queryFilter(
                      field: "c6",
                      operator: "includes",
                      value: local!customerName_txt,
                      applyWhen: not(
                        rule!APN_isBlank(
                          local!customerName_txt
                        )
                      )
                    ),
                    a!queryFilter(
                      field: "c8",
                      operator: "includes",
                      value: local!actions,
                      applyWhen: not(
                        rule!APN_isBlank(
                          local!actions
                        )
                      )
                    ),
                    a!queryFilter(
                      field: "c1",
                      operator: "in",
                      value: local!status_txt,
                      applyWhen: not(
                        rule!APN_isEmpty(
                          local!status_txt
                        )
                      )
                    ),
                    a!queryFilter(
                      field: "c4",
                      operator: "=",
                      value: local!cif_int,
                      applyWhen: not(
                        rule!APN_isBlank(
                          local!cif_int
                        )
                      )
                    ),
                    a!queryFilter(
                      field: "c9",
                      operator: ">=",
                      value: local!fromDate_dt,
                      applyWhen: not(
                        rule!APN_isBlank(
                          local!fromDate_dt
                        )
                      )
                    ),
                    a!queryFilter(
                      field: "c9",
                      operator: "<=",
                      value: local!toDate_dt,
                      applyWhen: not(
                        rule!APN_isBlank(
                          local!toDate_dt
                        )
                      )
                    ),
                    a!queryFilter(
                      field: "c7",
                      operator: "=",
                      value: local!originator_txt,
                      applyWhen: not(
                        rule!APN_isBlank(
                          local!originator_txt
                        )
                      )
                    )
                  }
                )
              }
            ),
            pagingInfo: a!pagingInfo(
              startIndex: 1,
              batchSize: 5
            ),
          )
        )

  • Two questions:

    1) you said you wanted the result to include tasks from all 3 groups, but in this example you're only passing the one constant, cons!MANAGER_GROUP.  Is it still not working for you even if you include all 3 groups here?

    2) Is it your intention to only show tasks for the single process model listed at "CR_APP_TXT_ALL_PROCESS_MODEL_NAMES[7]"?  This would be one reason why your QPA output is different from the list of tasks you see on the actual report.

    Can you confirm what you get if you run the following slimmed-down version of the QPA call, and whether or not it more closely matches your report output in the way you were hoping?

    a!queryProcessAnalytics(
      report: cons!MY_REPORT,
      
      contextGroups: {
        cons!MAKER_GROUP,
        cons!CHECKER_GROUP,
        cons!MANAGER_GROUP
      },
    
      query: a!query(
        pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 100)
      )
    )

  • 1) you said you wanted the result to include tasks from all 3 groups, but in this example you're only passing the one constant, cons!MANAGER_GROUP.  Is it still not working for you even if you include all 3 groups here? 

    Answer: yes, It is not showing list of all mentioned group tasks even if i include all 3 groups.

    2) Is it your intention to only show tasks for the single process model listed at "CR_APP_TXT_ALL_PROCESS_MODEL_NAMES[7]"?  This would be one reason why your QPA output is different from the list of tasks you see on the actual report.

    Answer: Yes