Skip to main content

Common

note

Download and install the Common package before using any other packages. The Common package contains entities that are required for other packages to work.

The Common package contains modules that provide the following basic iCore functionality:

  • Daily maintenance
    Provides a simple way to set up daily "clean-up" of tracking entities.
  • System common (error handling) 
    Provides the basis for all processings in iCore, as well as error handling. 

Daily maintenance

The Daily Maintenance module contains all the entities required to set up daily cleaning of tracking history in an iCore system.

The cleaning is performed by a Workflow (_iCPS_DailyMaintenance), which is triggered by a Timer (_iCPS_Daily Maintenance). When the Workflow is triggered, it runs another Workflow which marks retained Nodes for deletion based on the Settings. The package also includes a custom filter which shows all parts of the package, for example produced content such as Jobs and Summary Nodes, as soon as Daily Maintenance has been run on the system.

A summary is presented in the iCore log once the cleaning activity is completed. The log displays the elapsed time and the number of different entities that were removed. As a default, each run will also create a summary Node, which contains more detailed cleaning statistics and information about the Settings that were used. The data will be saved for 30 days, unless specified.

note

For more information about the clean-up procedure, refer to the documentation of the Workflow activities Clean-up Tracking and Clean-up Audit Log.

Setting up the module

  1. Review the package settings and adjust them to meet your requirements.
  2. Activate the Timer (_iCPS Daily Maintenance).
    • As a default, the Timer is inactivated.

Setting attributes

The module is set up with the attributes in Setting attribute group "_iCPS_Daily Maintenance Configuration", as described below:

NameDescription
Audit log batch sizeSpecifies the number of Audit log entries to attempt to delete in each batch. A larger number results in longer batch times, while a smaller number may extend the total time required for the clean-up.
Audit log batch timeoutSpecifies the maximum amount of time that a batch of deletions can take. If a batch is not completed within this time, the activity is aborted.
Audit log batches between checkpointsSpecifies how often manual checkpoints are generated in the database during a clean-up session.

  • If set to 0, no manual checkpoints are generated.
  • If set to a positive value N, a checkpoint is generated between every N batches. In simple recovery mode, this may help prevent the database log to grow to a very large size during the cleanup, however generating manual checkpoints too frequently may cause a significant slowdown of the clean-up and higher I/O load on the database server.
Audit log delay between batchesSpecifies the desired delay between two consecutive batches. On heavily loaded systems, it can be useful to set a non-zero delay to give other processes more time to access the database.
Audit log maximum total durationSpecifies the maximum time that the activity is allowed to run. If this time is reached before activity is finished, the activity will terminate after the next batch. If set to 0 or left empty, no time limit sis incurred.
Batch size (Event)Specifies the number of Events to attempt to delete in each batch targeting Events. A larger number will result in longer batch times, but a too small number may lead to an increase in the total time required for the clean-up.
Batch size (Job)Specifies the number of Jobs to attempt to delete in each batch targeting Jobs. A larger number will result in longer batch times, but a too small number may lead to an increase in the total time required for the clean-up.
Batch size (Log)Specifies the number of Log entries to attempt to delete in each batch targeting the log. A larger number will result in longer batch times, but a too small number may lead to an increase in the total time required for the clean-up.
Batch size (Node data)Specifies the number of Node files to attempt to delete in each batch targeting Node data (Node files). A larger number will result in longer batch times, but a number too low may lead to an increase in the total time required for the cleanup.
Batch size (Node)Specifies the number of Nodes to attempt to delete in each batch targeting Nodes. A larger number will result in longer batch times, but a too small number may lead to an increase in the total time required for the clean-up.
Batch timeoutSpecifies the maximum amount of time that a batch of deletions may take. If a batch is not completed within this time, the activity is aborted.
Batches between checkpointsControls how often manual checkpoints are generated on the database during a clean-up session. If set to 0, no manual checkpoints are generated. If set to a positive value N, a checkpoint is generated between every N batches.
Create Node with summarySet to True to create a Node which contains a summary of the maintenance operation.
Days to keepNumber of days to keep entities.
Days to keep filesNumber of days to keep files specified in the File filters attribute.
Days to keep retained NodesNumber of days to keep Nodes with Retain property set to 'True'. To deactivate the attribute, set it to '-1'.
Delay after deadlockSpecifies the delay that will be applied after a database deadlock occurs before retrying the operation.
Delay between batchesThe desired delay (in milliseconds) between two consecutive batches. In heavily loaded systems it can be useful to set a non-zero delay to give other processes more time to access the database.
File filtersDirectory containing the files (for example: c: mp*; c:\tmp1\Temp.txt) used by Days to keep files attribute. Use common Windows filter syntax.
Maximum batch countControls the maximum number of batches that the activity will run. If this number is exceeded before all entities are deleted, the activity will terminate. If set to 0 or left empty the number of batches are unlimited.
Maximum Daily Maintenance timeoutControls the maximum time that the activity is allowed to run. If this time is reached before all entities are deleted, the activity will terminate after the next batch. If set to 0 or left empty, no time limit is incurred.
Session lock timeoutSpecifies the maximum time to attempt to acquire a lock on the clean-up session. If a lock cannot be acquired within this time, the session is aborted.
Summary typeIf left empty or set to 0, no details are written. If set to 1, summary timing information about each batch is included. If set to 2, full details about each batch is included. If set to 3, some additional timing information is included.
Use XRef for cleaning retained Nodes by Node typeSet to 'Y', to use the Cross-reference "_iCPS_Dailymaintenance_RetainNodes_per_NodeType" to set the Retain property to 'False' on Nodes of a specified Node type.

General tips

  • It is possible to save Nodes for a different amount of days than the other tracking entities (Events, Logs and Jobs). For example, by setting the Days to Keep attribute to 20 and the Days to Keep Retained Nodes attribute to 40, all Nodes with the Retain property set to 'True' will be saved for 40 days while all other Nodes and tracking entities will be saved for 20 days. If you require more customization, you can:
    • Set the attribute Use XRef for cleaning retained Nodes by Node type to 'Y' to set the Retain property to 'False' on Nodes of a specified Node type. The Node type is specified in the Cross-reference "_iCPS_Dailymaintenance_RetainNodes_per_NodeType", where Key 1 is the Node type, and Value 1 is the number of days to keep the Nodes. 
  • Use the iCPS_Daily Maintenance Configuration attribute group to create a new Setting for your maintenance setup without changing the default: Edit the run parameter on the Event type "Daily Maintenance requested" or create a new Event type that defines your own setting to use. If you choose the second alternative, you need to also set the Timer to use the new Event type instead of the default version.

System common (error handling)

The entities in the system common module provide the basis for processings in iCore (for example, the iCPS_ScriptBase Script), as well as for general error handling.

Setting attributes

The module is set up with the attributes in Setting attribute group "_iCPS_System Common", as follows:

NameDescription
Debug LevelHandles logging in Components built on Scripts and Workflows. Set the desired debug level: 1=Minimized, 2=Normal, 3=Verbose, 4=Verboses+(CodeGen).
Error Handling ComponentSpecifies which Component is used for Error handling. Default: _iCPS_ErrorHandlingMail.
Error Handling Type1 = Standard, 2 = iCore Reporting, 0 = None.
Temporary directoryStores temporary files during processing.

For clustered iCore systems: make sure the path to the Temp folder is valid for all machines.

_iCPS_ErrorHandlingMail (Component) uses the Setting attribute group _iCPS_Error mail, which contains attributes Mail From, Mail Subject, SMTP Password etc.

See also

Overview