Defining a job that runs a JSP report

Applies to: On premises Cloud Pak for Data

You can use the Scheduler to create jobs that automatically run JSP reports.

Before you begin

About this task

You run JSP report jobs by using a custom job, which is available by default. You specify the JSP report to run, parameters for the job, and when to run the job.

For example, you can create a job that runs the Attestation Creation Report each week. The Attestation Creation Report is a JSP report that identifies Campaigns that need attestations and sends notification emails to the relevant users.

If the JSP report takes parameters, such as the name of a business entity or a profile, you can pass those parameters to the job.

The following table shows the required and optional parameters for JSP report jobs.

Item Description
Java™ class com.ibm.openpages.api.service.local.scheduler.jobs.JSPReportJob
Required parameter JSPReport – Specifies the path to the JSP report. For example:

Reporting/Hidden Reports/Attestation Reports/Attestation Creation Report

Optional parameters
  • OutputEntity – Specifies the full path to a Business Entity object. The report output is attached to the Business Entity that you specify.
  • SaveOutput (true|false) -- Specifies whether the output of the report is saved. Default is false.

    If SaveOutput is true and OutputEntity is empty, the report output is saved to the /aurora/output/jspreport directory on the application server.

  • Report parameters – If the JSP report uses parameters, you can add the parameters to the job definition. Parameter names must match the report parameter names exactly.

    If you add a parameter to the job definition, you must provide a value for the parameter. You cannot leave a parameter value empty.

    If the value of a parameter contains spaces, surround the value with quotation marks.

Procedure

  1. Log on as an administrator.
  2. Collect the information that you need to run the JSP report:
    1. Click Open Administration menu Administration menu > System Configuration > Pages and Templates, locate the JSP report, and then click its name.
      The report's details are displayed.
    2. Get the report name and folder:
      Copy the text in the Folder field. Remove / _cw_channels /, and then remove the spaces between each /. Add the report’s name to the path.
      For example: Reporting/Hidden Reports/Attestation Reports/Attestation Creation Report
    3. If the JSP report uses parameters, get the parameter names. The parameter names are shown in the Page Details section.
    4. If you want to attach the report output to a business entity, get the business entity’s full path:
      Click Organization > Business Entities, click the name of the business entity you want to use, and copy the value of the Folder field.
  3. Click Open Administration menu Administration menu > Solution Configuration > Scheduler.
  4. Click New Job.
    The New Job panel opens.
  5. Enter a Name for the job. You can't change the name later.

    Allowed characters are A-Z, a-z, 0-9, underscore, hyphen, and spaces. Special characters are not allowed.

  6. Enter a Description.
  7. In the Java class name field, paste the following text:
    com.ibm.openpages.api.service.local.scheduler.jobs.JSPReportJob
  8. Leave Enabled selected. You can change it later.
  9. In Custom configuration click New.
  10. In the Name field, type JSPReport. In the Value field, type the path the JSP report.
  11. To define other parameters, click New and enter the parameter's name and value. Repeat this step for each parameter that you want to add.
  12. Optional: To set up a repeatable schedule for the job, click Edit next to Schedule Otherwise, leave Schedule set to Not scheduled, and go to step 13.
    1. Enter a Name.

      The Name displays in the Scheduler as the Schedule Name. Allowed characters are A-Z, a-z, 0-9, underscore, hyphen, and spaces. Special characters are not allowed.

    2. Enter a Description (optional).
    3. Select a schedule type in Define Schedule:
      • Recurring
      • Specified Date/Time
      • Cron Expression
    4. If you chose Recurring:
      • Select a value in Repeat (Daily, Weekly, Monthly, Quarterly) and add details such as day, month, or quarter.
      • Enter a Time of Day.
      • Select an End Date (optional).
    5. If you chose Specified Date/Time:
      • Select a Date.
      • Enter a Time of Day.
    6. If you chose Cron Expression:
      • Enter a Cron Expression.
      • Select an End Date (optional).

      Advanced users can choose a cron expression if a Recurring or Specified Date/Time schedule does not meet your needs. Use the syntax for cron expressions, not crontab expressions.

    7. Click Done.
  13. Click Create.