Configure Jobs and Reports

HID_admin_configure_report_job_defs
ccppmod142
HID_admin_configure_report_job_defs
Clarity Project and Portfolio Management (PPM)
stock report and job definitions are available for your 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 to identify reports and jobs that cannot run concurrently with the selected report or job.
  • Associated categories to identify groups of like reports and jobs. For example, finance-related jobs can be grouped in the financial processing category.
  • User access to identify the resources, OBS units, or groups of users who have rights to run or manage a report or job.
To view existing reports and jobs, open
Home
, and from
Personal
, click
Reports and Jobs
.
2
 
Video: Data Extraction
Watch the video below to learn the benefits of data extraction jobs:

To play this video in full screen, click the YouTube logo to the right of Settings at the bottom of the video. 
Create Report or Job Definitions
Use the
Job Definitions
page to view a list of all available report and job definitions. You can edit only user-defined reports.
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
      : A report executable type executes a Business Objects Crystal Report. These reports are stored on a Business Objects 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 Business Objects 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 and Report Library Entries 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
  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
      : Enter the path and file name of the report as it is stored in the Business Objects InfoView folder. All report executable names are relative to the folder in InfoView. If the report is stored in the CA Clarity folder, only the file name of the report is entered. For example, Budget Forecast Analysis. If you store the report in a subfolder under the CA Clarity folder, both the subfolder name and file name are entered in the field, separated by a forward slash. For example, CA Custom Reports/Project Milestone Summary, where CA Custom Reports is the folder and Project Milestone Summary is the file name.
    • 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
  5. Save your changes.
Define the Report or Job Definition 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 definition.
Define all report parameters for passing on to the reports server from 
Clarity Project and Portfolio Management (PPM)
. Define the parameters whether the report is executed directly from the product, or indirectly from a link in another report.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click
    Reports and Jobs
    .
  2. Open the report or job definition to add parameters.
  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 report or job.
      Values:
      • Text: Displays a text field to users who run reports or 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.
        If the parameter is a multi-select style, ensure that the Crystal Reports or Web Intelligence document parameter is marked to allow multi-value selection. For example, on the Crystal Report parameter, set Allow multiple values=True.
      • Date: Displays date parameters. Users who run reports or 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 report or 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 report or 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.
Delete Saved Job Parameters
You can delete saved job parameters. The saved parameters appear on the list page below their associated job type.
Follow these steps:
  1. Open
    Administration
    , and from
    Data Administration
    , click
    Reports and Jobs
    .
  2. Open the job definition, and click
    Parameters
    .
  3. Select the saved job parameter to delete, and click
    Delete
    .
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 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 reports 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 reports or jobs is postponed until the running report or job completes. Use these steps to compile a list of reports that cannot run concurrently with the report.
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
    .
    Many reports or jobs can be incompatible with themselves (including, you cannot concurrently run multiple instances of the same report).
Associate Report or Job Definitions with Categories
Use the set of categories that are included with the product to group reports and jobs in meaningful ways. Categories help to filter reports and jobs. No new categories can be created or deleted. Use the
Associated Categories
page of report or job definition to add or remove reports or 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 Notification
You can set up notifications to send with report or job completion statuses. The notifications are sent when a report or job you initiated, scheduled, or have been assigned to has completed or failed. If a job fails, verify the job log for more information. You can configure the subject and body of reports and jobs notifications to meet your organization requirements.
If you are set up to receive email notifications when a job fails, the email indicates the reason for the failure. The recipient receives notifications that are based on the method the resource specifies on the Notifications page. For example, recipients can receive report and job notifications by an alert, email, and SMS.
Follow these steps:
  1. Open
    Home
    , and from
    Personal
    , click
    Account Settings
    .
  2. Click
    Notifications
    .
  3. Select the check box next to each notification and method you want to receive, and save the changes.
Activate or Deactivate a Report or Job
Activate reports 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 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/lib 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.
  6. Repackage niku.ear and redeploy it for WebSphere.
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 <CAPPM> 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 defined for the scheduled report in Clarity. * * 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 
Clarity Project and Portfolio Management (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
.