I have implemented a ReportExecutionNotificationHook script, defining the callback as follows:
def callback = [
notifyOfReportExecution : { report , parameterSet , user , outputFormat , configs -> },
notifyOfReportsSuccessfulExecution : { compiledReport , report , parameterSet , user , outputFormat , configs ->
re.reportExecution(true, report, user, parameterSet);
},
notifyOfReportsUnsuccessfulExecution : { e, report , parameterSet , user , outputFormat , configs ->
re.reportExecution(false, report, user, parameterSet);
},
doVetoReportExecution : { report , parameterSet , user , outputFormat , configs -> }
] as ReportExecutionNotificationHook
In the report object received, report.getKey() always returns null. The report does have a key defined though (I see this for the Berichtsdokumentation report too, which also has a key).
I tried using parameterSet.getParameterMap() to get the “_RS_REPORT_KEY” ParameterValue, but this too had a null value.
Is this expected behaviour? I would like to do some processing in my hook based on the key value - is there another way to get the key if the above 2 methods are returning null by design?