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
The error is not about the report. It is about the context on which the report is being built. Like the user, groups, or any other thing that you used.
a!queryProcessAnalytics( report: cons!SG_Exercise8, contextUsers: { cons!MAKER_GROUP, cons!CHECKER_GROUP, cons!MANAGER_GROUP }, )
In that same area, when viewing the report in /design, does it show tasks for the Maker and Checker groups?
And what are the results you see for tasks, in the report editor, when it's set to those context groups? Unless something else is wrong, like I said before, I'd expect to see the same list of tasks there in the report editor as well as resulting from your QPA call (assuming it's pointed at the exact same report and passing in the exact same list of groups for context).
No it is giving me the list of manager tasks only. It is not showing maker and checker group tasks.
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".
JS0001 said: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?
okay.
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) ) )
Answer: yes, It is not showing list of all mentioned group tasks even if i include all 3 groups.
Answer: Yes