How does contextProcessModels property of a!queryProcessAnalytics() function wor

How does contextProcessModels property of a!queryProcessAnalytics() function work?

My a!queryProcessAnalytics() function works great below when using contextProcessModels, but when I try and switch to contextProcessIds to display just the current process, it returns nothing. So then I backed up and just tried to hard-code the process ID that I want which is 6400, and that doesn't work. I tried using the processId variable and toInteger(6400) but no luck. What gives?

How is the contextProcessIds used correctly to return just those process IDs (pp!id) and can you show an example?

Thanks much!

local!report: a!queryProcessAnalytics(
report:cons!eOff_TASKS_GRID,
/* contextProcessModels: cons!EOB_MAIN_PROCESS_MODEL, */
           contextProcessIds:{tointeger(6400)}
          
           /*
contextProcessIds:
           contextProcessModels:cons!eOFF_MAIN_PROCESS_MODEL
           contextProcessIds:6400,
           ri!processId,*/
          
/*


OriginalPostID-201423

OriginalPostID-201423

  Discussion posts and replies are publicly visible

Parents
  • So here are a few ways of doing it:

    1. Choose 'Tasks by process' category and build a Process Report as desired by you. As a context, choose a process instance initially while creating and saving the report (Please bear in mind that choosing a Process Instance as context is namesake and later on you will be overriding this in the a!queryProcessAnalystics() by making use of 'contextProcessIds' argument). And later on in the report, you need to pass the desired process id (identifier of the Process Backed Record) as 'contextProcessIds'.

    And re your statement 'Obviously I can't pre-select the process ids when building the report as they're determined at run time' - Select a process instance of your wish at the design time. But override the context of the Process Report by populating the 'contextProcessIds' argument of a!queryProcessAnalystics() with the value of the Process Id that comes from the identifier (rp!id) of the corresponding Process Backed Record. Simply speaking, choosing a process at design time is just to save the report and the context will be overridden when you invoke the a!queryProcessAnalystics() with a desired value for 'contextProcessIds'.

    2. Choose 'Tasks by process model' category and build a Process Report as desired by you. As a context, choose a process model initially while creating and saving the report. And later on in the report, you need to pass the desired the Process Model as 'contextProcessModels' and additionally pass the required process id (identifier of the Process Backed Record) as a queryFilter.

    You may choose any approach depending on your convenience and there isn't any wrong in choosing one over the other and it completely depends on your requirement. I would generally prefer the second way as it will also have PVs available for reporting.

    I assume that you don't have a issue in sending the process id as a context (as per approach - 1) or filter (as per approach - 2) as the process id will be available as the identifier of the corresponding Process Backed Record.
Reply
  • So here are a few ways of doing it:

    1. Choose 'Tasks by process' category and build a Process Report as desired by you. As a context, choose a process instance initially while creating and saving the report (Please bear in mind that choosing a Process Instance as context is namesake and later on you will be overriding this in the a!queryProcessAnalystics() by making use of 'contextProcessIds' argument). And later on in the report, you need to pass the desired process id (identifier of the Process Backed Record) as 'contextProcessIds'.

    And re your statement 'Obviously I can't pre-select the process ids when building the report as they're determined at run time' - Select a process instance of your wish at the design time. But override the context of the Process Report by populating the 'contextProcessIds' argument of a!queryProcessAnalystics() with the value of the Process Id that comes from the identifier (rp!id) of the corresponding Process Backed Record. Simply speaking, choosing a process at design time is just to save the report and the context will be overridden when you invoke the a!queryProcessAnalystics() with a desired value for 'contextProcessIds'.

    2. Choose 'Tasks by process model' category and build a Process Report as desired by you. As a context, choose a process model initially while creating and saving the report. And later on in the report, you need to pass the desired the Process Model as 'contextProcessModels' and additionally pass the required process id (identifier of the Process Backed Record) as a queryFilter.

    You may choose any approach depending on your convenience and there isn't any wrong in choosing one over the other and it completely depends on your requirement. I would generally prefer the second way as it will also have PVs available for reporting.

    I assume that you don't have a issue in sending the process id as a context (as per approach - 1) or filter (as per approach - 2) as the process id will be available as the identifier of the corresponding Process Backed Record.
Children
No Data