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
  • @greggl Now the category of the report, that is 'All Active Processes' chosen by you doesn't need a context at all(you may also see in the Process Report that there isn't a chosen context whereas in earlier report you have Process Model as context), that is you don't need any of the contextGroups/contextProcessIds/contextProcessModels/contextUsers context parameters. If at all the Process Report needs a context, it would have asked you at the beginning of the report creation itself for a Process Model or Process or User or Group(s) etc. Still in this case also, you need to add a Process Id in the report and use the corresponding field in the queryFilter later.

    Please bear in mind that a!queryProcessAnalytics() demands you the context only on need basis. In case of 'All Processes', context isn't needed. And in case of reports that accepts User as a context also doesn't need a context. If you send a context, the report accepts it, else the context of the user evaluating the expression will be chosen.


    Few categories which will serve your purpose of testing 'contextProcessIds' are as follows:
    1. Current Tasks for Process
    2. Sub-processes per Process
    3. Tasks by process
Reply
  • @greggl Now the category of the report, that is 'All Active Processes' chosen by you doesn't need a context at all(you may also see in the Process Report that there isn't a chosen context whereas in earlier report you have Process Model as context), that is you don't need any of the contextGroups/contextProcessIds/contextProcessModels/contextUsers context parameters. If at all the Process Report needs a context, it would have asked you at the beginning of the report creation itself for a Process Model or Process or User or Group(s) etc. Still in this case also, you need to add a Process Id in the report and use the corresponding field in the queryFilter later.

    Please bear in mind that a!queryProcessAnalytics() demands you the context only on need basis. In case of 'All Processes', context isn't needed. And in case of reports that accepts User as a context also doesn't need a context. If you send a context, the report accepts it, else the context of the user evaluating the expression will be chosen.


    Few categories which will serve your purpose of testing 'contextProcessIds' are as follows:
    1. Current Tasks for Process
    2. Sub-processes per Process
    3. Tasks by process
Children
No Data