Specifying data to capture for Reports

You can capture the values of job and printer properties and store them in tables in the PostgreSQL database without adding steps to your workflows. Each job property is stored in a column in the job_history table or job_printing table. Each printer property is a column in the job_printing table or printer_status table.

  • Do not complete this procedure if you are only using the WritePropsToReportsDatabase step to capture data.
Before you do the steps in this procedure, determine which job and printer properties you want to capture and when you want to capture them.

You update the lists of properties in the Reports.json file to instruct Ricoh ProcessDirector which values to save. That file has three sections:

  • jobStepProgress

    Lists the job properties that are captured at the start and completion of each step in the workflow.

  • jobPrinting

    Lists the job and printer properties that are captured when a job starts printing and when it finishes printing successfully. These properties are also captured when a job stops printing due to an error.

  • printerStatus

    Lists the printer properties that are captured each time that the Enabled status or Printer status changes.

Do not specify positional job properties or properties that let users select multiple values from a list, such as Job.MediaRequired and Printer.Media. Ricoh ProcessDirector does not capture the values of those properties. Instead, Ricoh ProcessDirector writes a message to the system log when it finds those properties in the Reports.json file. The message includes the names of any undefined properties.

The values of the properties listed in each section are stored in a separate database table.

Each section also contains common JSON properties that control how the Ricoh ProcessDirector property values are captured in the database table. Before you do the steps in this procedure, determine how you want to set those values for each section.

  • captureData

    Enables and disables the capture of property values for the database table.

  • onCaptureFailure

    Specifies whether the job continues to the next step or is put in the error state when property values cannot be stored in the database. This JSON property is only in the jobStepProgress section.

  • directoryToDumpOnFailure

    Specifies the full path and name of the directory that Ricoh ProcessDirector writes a file to when it cannot put the property values in the database table. The file contains the property values in comma-separated value (CSV) format.

  • tableName

    Specifies the name of the table in the PostgreSQL database.

To specify the data to capture for Reports:
  1. Log in to the primary computer.
  2. Open the Reports.json file in a text editor.

    If any JSON values include Unicode characters, open the file with an editor that saves text in UTF-8 format.

    The file is in the config directory:

    • /aiw/aiw1/config/Reports.json (Linux)
    • C:\aiw\aiw1\config\Reports.json (Windows)

    We recommend that you keep a copy of the original Reports.json file. If the updated file contains JSON syntax that is not valid, you can compare the updated file with the original file.

  3. Find the captureData JSON property in each section: jobStepProgress, jobPrinting, and printerStatus.

    • To enable the capture of Ricoh ProcessDirector property values and put them in the database table, set the JSON property value to enable.
    • To disable the capture, set the value to disable.

    In this example, the captureData property is set to enable:

    "captureData": "enable",

    The Reports can capture the values of the properties when you save the Reports.json file. The data capture starts when a data collection event occurs, for example, a job enters a step, printing starts, or the printer status changes.

  4. If you enabled data capture for the jobStepProgress table, find the onCaptureFailure JSON property.

    • If you want the job to go to the next step when property values cannot be put in a database table, set the value to continue.
    • If you want to put the job in the error state, set the value to error.

    In this example, the onCaptureFailure property is set to error:

    "onCaptureFailure": "error",
  5. For each section that you enabled, find the directoryToDumpOnFailure JSON property.

    Specify the full path and name of the directory that Ricoh ProcessDirector writes the CSV file to when it cannot put property values in a database table.

    In this example, the directoryToDumpOnFailure property is set to /aiw/aiw1/jobhistorydump:

    "directoryToDumpOnFailure": "/aiw/aiw1/jobhistorydump",

    If Ricoh ProcessDirector is running on a Windows primary server, you do not need to change the directory path to C:\aiw\aiw1\jobhistorydump.

  6. For each section that you enabled, find the tableName JSON property.

    If you want to change the name of the table in the PostgreSQL database, enter a new name.

    This example shows a table named job_history:

    "tableName": "job_history",

    If you change the name of the table, the table remains in the database with all the data collected before the name was changed.

    • If you change the table name after you configure the Reports, you must restart Ricoh ProcessDirector to pick up the new name.
  7. For each section that you enabled, find the properties JSON property.

    The jobPrinting section has two JSON properties: jobProperties and printerProperties.

    List the database name of each job or printer property that you want to capture values for. Do not mix job and printer properties under the same JSON property.

    This example shows four job properties in the jobStepProgress section:

    "properties": [,
       "Job.Instance",
       "Job.TotalSheets",
       "Job.TotalPages",
       "Job.SubmitTime",
    ]

    You can use an asterisk (*) to match zero or more characters. This example captures values for all the Custom (database name Job.Info.Attr) job properties:

    "properties": [,
       "Job.Info.Attr*",
    ]

    The order of the properties in the array has no effect on how the data is captured.

    This example shows five job properties in the jobPrinting section:

    "jobProperties": [,
       "Job.ID",
       "Job.Name",
       "Job.CurrentPrinter",
       "Job.Media",
       "Job.Duplex"'
    ]

    This example shows five printer properties in the jobPrinting section:

    "printerProperties": [,
       "Printer.Id",
       "Printer.CustomerName",
       "Printer.Model",
       "Printer.Model.Specific",
       "Printer.Destination"'
    ]

    This example shows five printer properties in the printerStatus section:

    "properties": [,
       "Printer.Status",
       "Printer.ID",
       "Printer.Model",
       "Printer.Model.Specific",
       "Printer.SerialNumber"'
    ]
  8. When you finish specifying Ricoh ProcessDirector properties in each section that you enabled, save the Reports.json file and exit the text editor.
For an example of the edited Reports.json file, see the related topics.
Continue with the procedure for setting up the data retention period.
 
Copyright © 2018