Why queryProcessAnalytics function is not working in rule event?

   

When i try to use this function inside rule event it will throw an below error,

"(ERROR:EVAL:@reason=index)"and process status is changed to "Paused By Exception"
How do i resolve this?

P.S. :- Value of pv!ppid_int is set to tp!id (also tried with ri! and pp!id)

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Hi Shubham Aware (shubhama),

    Could you try using this code:

    if(
      rule!RCOS_PFM_nullCheck( ri!ppid_int ),
      {},
      index(
        index(
          a!queryProcessAnalytics(
          report: cons!RCOS_PFM_CUSTODIAN_TASK_REPORT,
            contextProcessModels: cons!RCOS_PFM_CUSTODIAN_PROCESS_MODEL,
            query: a!query(
              pagingInfo: a!pagingInfo(
                startIndex: 1,
                batchSize: 1,
                sort: a!sortInfo(
                  field: "c32",
                  ascending: false
                )
              ),
              filter: a!queryFilter(
                field: "c28",
                operator: "=",
                value: ri!ppid_int
              )
            )
          ).data,
          "c31",
          ""
        ), 1, {}
      ) = "1"
    )

    If you still get the same issue, first test the result executing the queryprocessanalytics rule, to see if it's ok, then with the first and then the last one, like debugging your results.

  • Hi Vibanco

    I have tried this way also process status is changed to paused by exception.

    Actually problem with my condition is value of my pv! is not changing that's why rule event is not getting called after interval of time.
    In rule event we need to pass any parameter as it's value may get changed and based on that value rule condition is executed.