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 }, )
yes I have tried with the context Group, it is giving me the only one group task assigned list that is manager group task lists ,but I want maker ,checker task lists as well,how will i get all these groups assigned tasks
a!queryProcessAnalytics( report: cons!SG_Exercise8, contextGroups: { cons!MAKER_GROUP, cons!CHECKER_GROUP, cons!MANAGER_GROUP }, )
When run like this, the QPA call will return the report data evaluated against all 3 groups passed in. I.E., the back-end data resulting from the call should map exactly 1:1 with what you're seeing in the visual Process Report editor. If it still isn't doing that, then you might have a different issue with your configuration.
What is the nature of the data being returned by your QPA call here which makes you think it's only getting the results for one group?
Okay,how can I made changes in the report ? With the list of tasks assigned to those group users?
to confirm - when you edit the report object itself, what context does it take?
when I edit the report will get this and I have given report context as these groups, Because I need list of tasks assigned to these groups only.
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".
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