Configure Reports and Jobs

ccppmop159
HID_admin_configure_report_job_defs
As an administrator, you configure which reports and jobs are active for other users to run. A report or job definition consists of the following items:
  • General properties.
  • Parameters to filter report data or to specify the scope of a job.
  • Incompatible reports and jobs that cannot run concurrently with the selected report or job.
  • Associated categories to identify groups of similar reports and jobs. For example, finance-related jobs can be grouped in the financial processing category.
  • Access rights to define the resources, OBS units, or groups of users who can run or manage the report or job.
As an administrator, you select
Administration
,
Data Administration
,
Reports and
 
Jobs
. to make configuration changes. To view available reports and jobs, users select
Home
,
Personal
,
Reports and
 
Jobs
.
2
Video: Data Extraction
The following video is provided by CA Technologies.

To play this video in full screen, click the YouTube logo to the right of Settings at the bottom of the video. 
Create a Job Definition
Use the
Job Definitions
page to view a list of all available report and job definitions. You can edit only user-defined report and jobs.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click
    Reports and
     
    Jobs
    .
  2. Click
    New
    .
  3. In the 
    Executable Type
    field, specify the method for running the report or  job. The method is based on the job listener. Select one of the following executable types: 
    • Report
      : Executes a Jaspersoft report stored on your Jaspersoft server. For the product to be aware of reports, definition files refer to the executable by name. The executable name stores the file on the Jaspersoft server.
    • Java: 
      Executes queries. Use when you cannot implement the business logic XBL. Java is considered a super-set of XBL and PMD. For example, the following Java statement performs the
      calendar
      background process:
        
      com.niku.calendar.scheduler. CalendarBackgroundProcess
       
       
    • Persistent Meta Data (PMD): 
      Executes a set of queries at regular intervals. PMD does not contain business logic.
       
      For example, the following PMD statement executes the Post Incident Financials job: 
       
      itl.incidentCostCalc
       
       
    • SQL Stored Procedure: 
      Implements business logic as a stored procedure when operations are data intensive. For data intensive operations, a SQL stored procedure is selected over Java for implementing business logic. For example, the following stored procedure executes the Remove Job Logs job: 
       
      cmn_job_logs_delete_sp   
    • Extensible Business Language (XBL)
      : Implements business logic and executes queries. XBL is considered a super-set of PMD. For example, the following XQL/XBL statements execute the Post Timesheets and Time Slicing jobs, respectively:
        
      postTimesheets.xql
        
      blobcrack#blobcrack.xbl
    • Extract, Transform, and Load (ETL)
      : Executes an ETL extraction, structured data transformation, and loads the transformed data tables. For example, the Load Data Warehouse job extracts data from the
      Classic PPM
      database. This ETL job transforms that data into a denormalized format and then loads it into the data warehouse.
  4. In the 
    Executable Name
    field, enter a name for the report or job. The naming convention depends on the executable type. Refer to the following examples:
    • Report
      : The report name on the JasperReports server. For example, /ca_ppm/reports/investment_management/CSK_INV_TimeAndEstimate.
    • Java
      : Enter the class path. For example, com.myorg.projmgr.service.staffing.job.InvestmentAllocationJob or com.company.security.CleanUserSessionListener.
    • PMD
      : Enter a descriptive name using dot syntax; for example, itl.incidentCostCalc.
    • SQL
      Stored Procedure: Enter a descriptive name using underscores; for example, IMM_ASSIGN_INCIDENT.
    • XBL
      : For example, projmgr#projects/purgeProjects.xbl
    • ETL
      : Enter the ETL job filename.
  5. Save your changes.
Define the Report or Job Parameters
Report or job parameters enable users who run reports or jobs to filter data or to specify the scope of the report or job. For example, you add a parameter, make an existing one mandatory, or delete a parameter from a report or job definition.
Define all report or job parameters for passing on to the server from 
Classic PPM
. Define the parameters whether the report or job is executed directly from the product, or indirectly from a link in another report or job.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click
    Reports and
     
    Jobs
    .
  2. Open the report or job definition.
  3. Click
    Parameters
    , and then click
    New
    .
  4. Complete the requested information. The following fields require explanation:
    • Bind Parameter Code
      Defines the parameter bind code. For example, the job executable type is an SQL stored procedure and the SQL stored procedure parameter name is "P_JOB_RUN_ID". The bind parameter code is "P_JOB_RUN_ID."
    • Type
      Specifies the parameter field type that is displayed to users when they select parameters to run their job.
      Values:
      • Text: Displays a text field to users who run jobs.
      • Checkbox: Displays Boolean values (true or false).
      • Pull-down: Displays a list of values that users can select from a drop-down. Users click the Browse icon to select a single value from the lookup that appears.
      • Browse: Displays a long list of values that users can browse. Users click the Browse icon to select a single value from the lookup that appears.
      • Date: Displays date parameters. Users who run jobs can either enter a date or select a date from a calendar.
      • Relative Date: Displays a field to allow users to select a date relative to the day the job runs. The relative dates exist in a drop-down of calendar periods.
      • Time Period: Displays a field from which users can select a time period relative to the day the job runs. The drop-down provides system-defined periods.
      Save changes to set default values for browse or pull-down parameter types.
    • Default
      Indicates the read-only value of the parameter.
      Required:
      If you selected the Read-only field.
    • Read-only
      Indicates if the parameter is read-only when the field is selected. If you select Read-only, provide a value for the parameter in the Default field.
  5. Save your changes.
Reorder Report or Job Definition Parameters
Parameters are displayed in the order in which you add them to the report or job definition. The order of parameters is important for SQL Stored Procedure jobs. To reorder the definition parameters, at least one parameter must be defined.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click 
    Reports and
     
    Jobs
    .
  2. Open the report or job definition to reorder parameters.
  3. Select
    Parameter Order
    .
  4. Select the parameter and use the arrows to move the parameter up or down the list.
  5. Save your changes.
Identify Incompatible Report or Job Definitions
Some reports or jobs or instances of the same report or job cannot run simultaneously. For example, you cannot concurrently run a job with the Datamart Extraction job if they depend on data resulting from the datamart extraction.
Use the
Incompatible Jobs
page to identify the jobs that cannot run simultaneously as the selected job. If jobs become compatible, delete jobs from the list. Delete reports and jobs if they become compatible. For example, you schedule to run an incompatible report or job listed. The scheduled run time of the incompatible report or job is postponed until the running report or job completes. Use these steps to compile a list of reports or jobs that cannot run concurrently.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click
    Reports and
     
    Jobs
    .
  2. Open the report or job definition that you want to edit.
  3. Click
    Incompatible Jobs
    , and click Add.
  4. Select the check box next to the report or job that cannot run with this report or  job and click
    Add
    .
Associate Report or Job Definitions with Categories
Use the set of categories that are included with the product to group reports or jobs in meaningful ways. Categories help to filter reports or jobs. No new categories can be created or deleted. Use the
Associated Categories
page of report or job definition to add or remove jobs from categories.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click 
    Reports and
     
    Jobs
    .
  2. Open the report or job definition, and click
    Associated Categories
    .
  3. Click
    Add
    .
  4. Select the category to associate with the report or job, and click
    Add
    .
Report and Job Notifications
As an administrator, you can advise users to set up notifications if they want to know when a report or job is finished or fails. Recipients can receive notifications by an alert, email, or SMS text message. You can configure the subject and body of report and job notifications to meet your organization requirements. For example, email can indicate the reason for a failed job. 
Provide the following steps to users or give them a link to Personalize
Classic PPM
Notifications
:
  1. Click 
    Home
    Personal
    Account Settings
    .
  2. Click
    Notifications
    .
  3. Select the check box next to each notification and method you want to receive.
  4. Save your changes. 
Activate or Deactivate a Report or Job
Activate report or jobs to run them. Inactive reports or jobs display on the definitions page, but the check box in the Active column is not selected.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click
    Reports and
     
    Jobs
    .
  2. Select
    Job Definitions
    .
  3. Complete one of the following steps:
    • Select the inactive report or job, and click
      Activate
      .
    • Select the active report or job, and click
      Deactivate
      .
Create a Report Definition
Define Jaspersoft Studio reports in
Clarity
so that end-users can run these reports directly from the product under Home, Personal, Reports & Jobs. You can also run Jaspersoft Studio reports from Advanced Reporting. See
Advanced Reporting with Jaspersoft
,
Run or Schedule an Advanced Report
Use the Job Definitions page to view a list of all available report definitions. You can create and edit only user-defined reports.
Follow these steps:
  1. Click
    Administration
    ,
    Data Administration
    ,
    Reports and Jobs
    .
  2. Click
    New
    and enter the following information:
  • Job Definition Name
    Defines the report name as it appears in Jaspersoft. For example, KPIs by Project Type as shown for the Name field in the following image.
  • Job Definition ID
    Defines the Resource ID for the report as specified in Jaspersoft. Navigate to Advanced Reporting and select the Edit option for the report. The Resource ID appears on the Setup the Report page as shown in the following image: 
    Resource_ID_JS.PNG
  • Content Source
    Defines the source for the report content. Select
    Customer
    for user-defined reports.
  • Description
    Describes the report. For example, the KPI by Project Type report is described as a project management (PMO Accelerator) report.
  • Active
    Specifies whether the report is available to run for end-users. Activate the report to make it visible in
    Clarity
    from
    Home
    ,
    Personal
    ,
    Reports and Jobs
    . Verify that the report is also visible in Jaspersoft.
  • Executable Type 
    Specifies the method for running the report based on the listener. Select
    Report
    to execute a Jaspersoft Studio report that is stored on your Jaspersoft Server. For the product to be aware of reports, definition files refer to the executable by name. The Executable Name field stores the path to the file on the Jaspersoft server.
  • Executable Name 
    Defines the path to the repository folder where the report is stored in Jaspersoft. Complete the following steps to specify the path accurately:
    1. In Advanced Reporting, use the the repository folders navigate to the report.
    2. Right-click the report name and select
      Properties
      to see the full path to the report. 
    3. Use the same casing as shown for
      Path
      . The following example shows the executable name for the KPIs by Project Type report:
      executable_name_JS.PNG
3. Click
Save and Continue
.
The Parameters tab is selected. Proceed to define parameters for the report.
Define the Report Parameters
Report parameters allow users to filter data or to specify the scope of the report. For example, you add a parameter, make an existing one mandatory, or delete a parameter from a report definition. We recommend that you add the parameters one at a time rather than all at once. If there is a problem, you can then use the process of elimination to keep progressing incrementally. You must define a parameter for each input control that exists for the report in Jaspersoft. Also, you must define the parameters in the same order as the input controls.
Some parameters such as OBS type are dependent lookups in Jaspersoft. When you select an OBS type, it also shows an OBS unit. In PPM, you can use the OBS browse to filter on an OBS unit. You do not need to create a parameter for a dependent lookup.  
You can also skip mapping parameters for the “populate” input controls. These input controls appear in Jaspersoft as check boxes on the report for performance reasons. For example, the "populateProject" input control appears for the KPIs by Project Type report. When you check the input control, the report is pre-populated with projects. 
Example:
The following image shows how the parameters labels in
Clarity
map to the Jaspersoft input controls for the KPIs by Project Type report. There is no parameter mapping for the projectOBSTypekey_1 input control because it is a dependent lookup. Also, the "populate" input controls are skipped.
input_controls_JS.PNG
Prerequisite
When associating a parameter to a field type that is a lookup, verify that the lookup attribute exists in PPM. The lookup in
Clarity
must mirror the behavior of the Jaspersoft input control as they are both being used for the same parameter. 
Follow these steps:
  1. Click
    Parameters
    ,
    New
    .
  2. Enter the following information:
    • Parameter Label
      Defines the parameter label that users see when they run the report. Verify that the label corresponds to the input control in Jaspersoft. For example, for the KPIs by Project Type report, the Project Type parameter corresponds to the Project Type label in Jaspersoft. 
    • Bind Parameter Code
      Binds the parameter to the input control. The field determines how the
      Clarity
      parameter is passed as an input control to Jaspersoft. The bind parameter code for a parameter must exactly match the input control ID. For example, for the KPI by Project Type report, the bind parameter code for the Project Type parameter,  is projectTypeKey_1.
    • Type
      Specifies the parameter field type that users see when they select the parameter to run the job. The type should match the data type for the report in Jaspersoft.
      Values
      • Text
        : Displays a text field.
      • Checkbox
        : Displays Boolean values (true or false).
      • Pull-down
        : Displays a list of values that users can select from a drop-down. If you select this type, also select the following options:
        • Lookup Style
          . Select Single-select or Multiple-select depending on what style is selected for the corresponding input control in Jaspersoft.
        • Pull-Down
          . Browse and select a lookup to display for the field.
      • Browse
        : Displays a long list of values that users can browse. Users click the Browse icon to select a single value from the lookup that appears. If you select this type, also select the following options:
        • Lookup Style
          . Select Single-select or Multiple-select depending on what style is selected for the corresponding input control in Jaspersoft.
        • Browse
          . Browse and select a lookup to display for the field.
      • Date
        : Displays date parameters. Users can either enter a date or select a date from a calendar.
      • Relative Date
        : Displays a field to allow users to select a date relative to the day the report runs. The relative dates exist in a drop-down of calendar periods.
      • Time Period
        : Displays a field from which users can select a time period relative to the day the job runs. The drop-down provides system-defined periods.
    • Default
      Specifies a default value for the parameter. Provide a default value 
      only
       if a default is available for the corresponding input control in Jaspersoft.
      In PPM, if you do not specify a default, no default value appears for the report parameter. In Jaspersoft, the first value in a list of values is always selected and appears like a default value. This is true even if no default value is defined for the input control.
  3. Specify if the parameter requires a value and if it is read-only.
  4. After creating and saving all report parameters, click
    Save and Return
    .
  5. Click
    Parameter Order
    . Specify the order in which to display the parameters in the report. Follow the same order as that of the input controls in the Jaspersoft report.
  6. Click
    Save and Continue
    .
Define Report Incompatibility
You must specify if your report is incompatible to run simultaneously with any other reports or jobs. Also specify if multiple instances of the same report cannot run simultaneously.
Follow these steps:
  1. Click
    Incompatible Jobs.
  2. Select
    Report
    from
    Executable Type
    .
  3. Add the following information for your report definition as applicable:
    1. Any reports or jobs that cannot run simultaneously with the report.
    2. Another instance of the same report.
  4. Click
    Return
    when done.
Associate a Report Category
You can associate your report definition to existing categories to help with filtering. Verify that the categories match the ones associated with the report in Jaspersoft. For example, the KPIs by Project Type report is associated with the Project Management category. See
Associate Report or Job Definitions with Categories
for detailed instructions.
Define Report Access
As a prerequisite, you must have already set up report users in
Clarity
with the required Advanced Reporting access rights. The access rights map to corresponding Jaspersoft roles. See
Advanced Reporting Access Rights.
Specify the users, groups, or OBS units that can access and run your report and the type of access they have.
For example, the the KPIs by Project Type report is accessible to the following
Clarity
access groups:
  • PMO Advanced Reporting Project Management 
  • PMO Advanced Reporting All Reports and Domains
These access groups map to the CSK_ROLE_PROJECT_MANAGEMENT role in Jaspersoft.
Follow these steps:
  1. Click
    Access to this Report
    .
  2. Add the resources, groups, or OBS units to provide them either run or view and edit access to the report.
  3. Click
    Return
    when done.
See
Jobs Reference
,
Synchronize Jaspersoft Roles
job description for details on how roles are synchronized.
Create a Job
The software includes a list of stock jobs. If the included jobs do not meet your requirements, you can create new jobs. For a list of the access rights that are required to manage jobs (jobs access rights), see 
Access Rights Reference
.
With programming experience writing queries, statements, procedures, and Java classes, you can create new jobs, .
Follow these steps:
  1. Select a method that best addresses the job to create.
  2. Write the queries, statements, or procedures for the new job using Java and SQL.
  3. Deploy the executable.
  4. Create a job definition by referencing the executable type and name of the method.
To enable the background scheduler to clean up all processing jobs at startup, set the isPrimary attribute on the jobSchedulerInstance element in properties.xml to true. Setting this attribute to true is useful when the background server shuts down and restarts while a job is executing.
SQL Stored Procedure Guidelines
When you create a job using SQL stored procedures, pass the P_JOB_RUN_ID and P_JOB_USER_ID parameters. The parameter order for SQL stored procedures is important on SQL Server and Oracle. Read and follow these recommendations when writing stored procedure for SQL server and for Oracle:
SQL Server Recommendations
The stored procedure must start as follows:
CREATE PROCEDURE OR REPLACE PROCEDURE <my new job> ( @P_JOB_RUN_ID NUMERIC, @P_JOB_USER_ID NUMERIC, )
Oracle Recommendations
The stored procedure must start as follows:
CREATE OR REPLACE PROCEDURE <my new job> ( P_JOB_RUN_ID IN NUMBER, P_JOB_USER_ID IN NUMBER, ) AS <procedure body>
Other parameters are passed in the order that they are listed in the Parameters page of job definition.
Java Guidelines
If you select Java as the executable type, use the following steps to create the Java class, deploy, and register it.
Follow these steps:
  1. Create a Java class that performs the background processing.
    This class must implement the com.niku.union.interfaces.SchedulerListener interface. You only implement the scheduledEventFired() method of this interface.
  2. Implement the Java class using the scheduledEventFired() method of the following interface: com.niku.union.interfaces.SchedulerListener
  3. Compile the Java class. Verify that the compiler CLASSPATH is aware of the following: $NIKU_HOME/lib/union.jar
    See the Oracle website for more information about creating a JAR file. For example, the following JAR command creates a JAR file from a Java class jar cf myBackgroundJob.jar myBackgroundJob.class
  4. Deploy the class by placing the executable (for example, myBackgroundJob.class) in the $NIKU_HOME/customlib directory.
  5. Register this job by creating a job definition. For the executable name, enter one of the following:
    • Valid class name. For example, myBackgroundJob.
    • Fully qualified class name if this class is made a part of a package. For example, com.myserver.jobs.background.myBackgroundJob.
Java Class Background Jobs (Sample Code)
import com.niku.union.interfaces.JobSchedulerContext; import com.niku.union.interfaces.SchedulerListener; /** * Kicks off a background process. * This class is primarily used by the Job Scheduler. * @author Ken Chen */ public class myBackgroundJob implements SchedulerListener { /** * Constructor for the myBackgroundJob object */ public myBackgroundJob()  { } /** * Kicks off the background processing. * * @param jobContext_ Contains information required by job. * @exception Exception */ public void scheduledEventFired(JobSchedulerContext jobContext_) throws Exception { /** * The JobSchedulerContext parameter contains the Job definition ( * jobContext_.getJob() ) and the Job definition contains the value of the * OutputPath parameter. * * String outputPath = jobContext_.getJob().getRunOutputPath(); * File f = new File(outputPath, "myoutput.txt"); */ if(jobContext_ == null) { throw new Exception("Invalid JobContext"); } try { doSomeWork(); } catch (Exception e) { throw new Exception("Cannot doSomeWork()::" + e); } } private void doSomeWork(JobSchedulerContext jobContext_) throws Exception { } // Write your background processing logic here. // One important and useful thing you can get out of // jobContext_ is the SecurityIdentifier. // SecurityIdentifier gives you handle to current user // information under which job is executed. // The user who often schedules the job. // is "scheduler". String userName = jobContext_.getSecurityIdentifier().getUsername(); // // userName = "scheduler" // String sessionId = jobContext_.getSecurityIdentifier().getSessionId(); // // sessionId is the unique identifier for the job. // Every time job is invoked, sessionId is different. // ...job does its work. }
Update Investments Created Before 
Classic PPM
 Release 13.2 to Display Capital and Operating Expenses
If you have investments that were created before Release 13.2, you can update the investments to display both capital and operating expenses. To update your investments run the following jobs in this order:
  • Enable Capitalization
  • Copy Cost Type Plan of Record Charge Code with Cost Type
If you are processing investments with large amounts of data, limit the number of investments for a job run. When all of your investments have been successfully processed to show capital and operating expenses, we recommend deactivating the jobs. The statistics of a job execution are printed in a BG log file for the job. You can open and read the log file. The log file contains information such as the number of investments that were processed, skipped, or failed.
For more information about the jobs, see
Jobs Reference
.