cancel
Showing results for 
Search instead for 
Did you mean: 

Job Chain fails when using query filter as the constraint type for a parameter

nanda_kumar21
Active Contributor
0 Kudos

Hi Everyone,

I have created reports to get the list of jobs with status 'error'. I am able to submit the System_ReportRun and obtain the report in HTML format.

I created a job chain, with System_ReportRun in step 1 and System_MailSend in step 2. Now when i maintain the Report name hardcoded in the job chains, the job is successful and sends me a mail.

But i want to define a parameter, so that i can select the report i want to generate at job submission. So i defined a parameter and used query filter as the constraint type.

Now when i submit, i get the drop down with all the reports available

, but when i select any one of them and submit, the job chain ends up in error with the following log:

-- JOB RUN STACK TRACE --

java.lang.RuntimeException: Unable to find report Report:GLOBAL.PTP_BIWEEKLY_ERROR_REPORT

at com.redwood.scheduler.system.jobs.CreateReportFromReportObject.runInternal(CreateReportFromReportObject.java:227)

at com.redwood.scheduler.system.jobs.CreateReportFromReportObject.run(CreateReportFromReportObject.java:135)

at com.redwood.scheduler.system.jobs.CommonSystemJob.execute(CommonSystemJob.java:53)

at com.redwood.scheduler.systemjobservice.impl.JobWorker.doWork(JobWorker.java:241)

at com.redwood.scheduler.infrastructure.workqueue.Worker.run(Worker.java:64)

at java.lang.Thread.run(Thread.java:579)

can someone please help me solve the error?

Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hello,

As you can see, when you use a Queryfilter your object name is prefixed with the object type (Report: in this case). The Job only expects everything after the :.

So use an expression on the subjob instead of a parameter reference:

=String.substring(chainParameters.REPORT,String.indexOf(chainParameters.REPORT,':')+1)

Regards Gerben

Answers (1)

Answers (1)

Former Member
0 Kudos

try to find an operation from Reports tab:

right-clicking the report which you want to run, then "New job definition..." instead of the custom job.

query filter don't work well here.