User Tools

Site Tools


Writing /app/www/public/data/meta/development/applications/polaris/filegeneration.meta failed
development:applications:polaris:filegeneration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
development:applications:polaris:filegeneration [2018/05/03 15:25] – created ashevyakovdevelopment:applications:polaris:filegeneration [2021/06/25 10:09] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== File Generation ======
  
 +===== Introduction =====
 +Automatic file generation is executed at the scheduled interval by the scheduler (**Quartz**) and generates the file on the specified handler (**ThreadConfig** domain - **FILE_GENERATION** type) using the specified **RemoteDiscoveryScript**.
 +
 +As of 03.05.2018, **Quartz** in the **SnmpManager** is known to experience some issues running on the multi-server configuration. Please refer to the [[https://errigal.atlassian.net/browse/IDMS-2695|IDMS-2695]] ticket for the further clarification.
 +
 +Created as a part of the [[https://errigal.atlassian.net/browse/IDMS-2362|IDMS-2362]] ticket.
 +
 +===== Domains =====
 +====GeneratedFile====
 +The file generation instructions are represented via the entries in the **GeneratedFile** Grails domain.
 +
 +Fields
 +  * **name** - name of the file to be generated. Example: **alarms_per_day_count.txt**
 +  * **description** - description of the file to be generated. What it does, why it's there, etc. Not used anywhere in the code, it is there to assist to direct DB queries (i.e. investigation).
 +  * **outputDir** - the output path (i.e. the folder where the file is put after it is generated). Default value: **/** (root directory).
 +  * **generationInterval** - how often the file is generated (allowed options: **EVERY_MINUTE**, **EVERY_FIVE_MINUTES**, **EVERY_TEN_MINUTES**, **QUARTER_HOURLY**, **HOURLY**, **DAILY**, **WEEKLY**)
 +  * **hourOfDay** - the hour on which the file is to be generated if the **generationInterval** is set to **DAILY** or **WEEKLY**. Allowed values: 0 (midnight) to 23.
 +  * **dayOfWeek** - the day of the week on which the file is to be generated if the **generationInterval** is set to **WEEKLY**.
 +  * **active** - whether the file generation is active or not.
 +  * **generationScript** - the **RemoteDiscoveryScript** of the **File Generation** type responsible for the file generation. Arguments in: **fullFileName** - the full path (path + name) of the file to be generated, **fileDesc** - description of the file to be generated. Returns: **String** (text of the file) or **Byte[]** (byte array representing the file contents (e.g. image)).
 +  * **appendDate** - whether the date should be appended to the file on its generation. Default date format: **"YYYY-MM-dd-'time'-HH-mm-ss"**.
 +  * **overwriteExistingFile** - whether the newly generated file should overwrite the existing one (i.e. the file with the exact same name in the exact same folder).
 +  * **deleteOnCleanup** - whether the files generated by this **GeneratedFile** entry should be deleted on the daily cleanup. Generated file expiration date: 7 days.
 +  * **customDateAppendFormat** - the custom date to be appended to the generated file. Might be useful if you want to, for example, include some words in the appended date.
 +  * **customDateMatchFormat** - required if the **customDateAppendFormat** is present. Used on the periodic old generated files cleanup to match the old files which were generated with the date of the custom format appended.
 +
 +{{:development:applications:polaris:generated_file_domain.png?1200|}}
 +
 +====FileGenerationHistory====
 +
 +A domain used to keep track of the file generation attempts.
 +
 +{{:development:applications:polaris:file_generation_history_domain.png?1200|}}
 +
 +===== Workflow =====
 +{{:development:applications:polaris:file_generation_workflow.png?1200|}}
 +
 +===== Troubleshooting Guide =====
 +  * Check that the generated file entry is **active**.
 +  * Check that the file generation script (**generationScript** field of the **GeneratedFile** domain) is specified and not throwing any exceptions.
 +  * Check that the specified output folder (**outputDir** field of the **GeneratedFile** domain) exists on the handler intended to run the file generation job.
 +  * Check that the *Quartz* is running and that the **FileGenerationJob** is running too.