Report generation (hwm_process_report)
This utility allows generation of process reports from filters specified in ProcMan or plugins implemented for this purpose in ProcMan. It can generate one or several reports. Reports generated from filters have a similar structure to the ProcMan’s work list. Reports generated from plugins contain one or several tables the content of which is dependent on the plugin implementation. Finally it sends a statistics file and files containing the generated reports in either CSV or HTML format as attachments in an E-mail. The reports can optionally be copied into a specified target directory on the server. For to start it, change in the directory where ProcMan is installed (with cd command in the command window or by setting the work directory in a scheduler) and execute the command:
Windows:
Unix:
In the execution command replace the <configuration_id> with valid configuration ids of the required configurations from the configuration file etc/hwm_process_report_config.php. Take care that the configuration ids are case sensitive so they have to be tipped exactly like they are specified in the configuration file. There can be specified as many configuration ids as many reports the generated E-mail shall contain.
Before the utility can be started the structure of the input file has to be described in the configuration file etc/hwm_process_report_config.php of the ProcMan installation. Let us explain the content of the configuration file on an example:
In the parameter description the description of the report has to be specified. It is used as a header for the report statistic in the statistics file in the mail attachment.
In the parameter mail_subject the subject of the text which appears in the subject of the sent mail has to be specified.
In the parameter mail_text the text of the mail has to be specified.
In the parameter mail_recipients a list of e-mail addresses to which the mails shall be sent has to be specified.
In the parameter mail_attachment_stats_prefix the prefix of the file name of the statistics file sent in the mail attachment has to be specified.
In the parameter mail_attachment_stats_suffix the suffix of the file name of the statistics file sent in the mail attachment has to be specified.
In the parameter mail_attachment_prefix the prefix of the file name of the report file sent in the mail attachment has to be specified.
In the parameter mail_attachment_suffix the suffix of the file name of the report file sent in the mail attachment has to be specified.
In the parameter stats_output_format the format of the statistics file in the mail attachment has to be specified. Possible values are 'CSV' or 'HTML'.
In the parameter output_format the format of the report file in the mail attachment has to be specified. Possible values are 'CSV' or 'HTML'.
In the parameter csv_delimiter the delimiter character for the CSV format has to be specified.
In the parameter csv_enclosure the enclosure character for the CSV format has to be specified. It specifies which character is used to enclose the values which contain special characters.
In the parameter report_dir a directory can be specified where the generated reports shall be copied.
In the parameter report_from the type of the report generator has to be specified. Possible values are 'filter' or 'plugin'.
In the parameter language the language for translation has to be specified. Possible values are 'en' for English or 'de' for German language.
In the parameter time_zone the time zone in which the time values shall be converted has to be specified.
In the parameter date_format the format of the date values displayed in the report has to be specified.
The parameter generate_index specifies whether to write the report entry index in the first column of the report tables (value true) or not (value false).
In the parameter client the client for which the report shall be generated has to be specified.
In the parameter user the user which shall be used for the report generation has to be specified.
In the parameter filter the private filter of the user has to be specified.
The parameter report_activities specifies whether there shell be generated only process entries (value false), or also activity entries (value true) in the reports.
In the parameter plugin the plugin class used for the report generation has to be specified. Currently following plugin classes are implemented:
hwm_report_example – just an example (report containing two constant tables)
hwm_report_db_query – report containing result of a specified SQL query
In the parameter plugin_report_name a speaking description of the plugin has to be specified.
In the parameter plugin_params the plugin specific parameters has to be specified.
In the config section configurations has to be defined. Meaningful is to define at least one configuration. The global parameters defined outside of the config section are used for all configurations unless they are overridden in partial configurations. Each configuration has to have an id and a subsection in which the global parameters can be overridden. The ids of the configurations are being used in the –c parameter in the execution command of the utility to specify the configurations using which the utility shall be executed.
For inline documented examples of the configurations please see etc/hwm_process_report_config.php.sample in the ProcMan installation.
Last updated