Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When the In Adeptia Connect log cleanup runs, it deletes logs and repository files. You may want to archive these logs and repository files before they get cleaned up. You can archive the logs:

  • On a different database that should be on a different database server.
  • On the same database that is being used for main log tables.

It is recommended to use a different database setup on a different database server for archival of logs.

Enabling Archival

To enable the archival:and archival happens daily to clean up the logs and temporary repository files older than the specified number of days (retain time). The logs cleanup and archival  is governed by the properties that are discussed on this page. 

Setting up the cleanup and archival properties

Follow the steps given below to set the properties related to the archival and cleanup of the logs and repository files.

  1. Anchor
    steps
    steps
    Click Account > Settings.
  2. Expand the Server Node Settings in the left panel.
  3. Select the server node.
  4. Click Edit.
  5. Click  to expand Process Flow.
  6. Click  to expand Archival.

  7. Change the value of values for the properties described in the following properties table as per your need. 

  8. Create a database (for example, Adeptia_Logs_Archive on SQL Server) on the database server where you want to archive the logs.
  9. On this database, run the initialize-log-<database server name>.sql script located in the .../AdeptiaServer-x.x/ServerKernel/etc folder. This creates the tables where the archive logs will be stored (for example, for a database created on the SQL server run initialize-log-sqlserver.sql script and for a database created on an Oracle Server run initialize-log-oracle.sql).
  10. Now run the create-indexes-<database server name>.sql script located in the .../AdeptiaServer-x.x/ServerKernel/etc folder. This applies the indexes on the tables created in the previous step (for example, for a database created on the SQL server run create-indexes-sqlserver.sql script and for a database created on an Oracle Server run create-indexes-oracle.sql script).
  11. Make sure to set the value of abpm.logs.archival.database as 2
    Property Name

    Property 

    Description

    Default Value

    Possible Values

    Selection Criteria

    abpm
    .create.repository.archive.pathSpecifies whether to create the archive folder or not if it doesn’t exist
    .
    YesYes/NoUsing this property you can choose, whether to create the archive folder specified in the abpm.transaction.repository.archive.path property, or not.abpm.Set this property to Yes,
    logs.archival.enable
    Enable or disable Archival of Process flow log.NoYes/No

    Enables or disables the archival of the Process Flow logs and repository files. 

    • The possible values are yes and no.
    • Set the value for this property to yes if you want to archive the Process Flow logs and repositories before they are cleaned up by the cleanup
    process
    • task.
    •  
    abpm.logs.archival.database

    Specifies whether to

    archive the logs on the same database or another database.11/2

    use another database server for logs archival or not.

    • The possible values are and 2.
    • Set this property to 1 if you want to
    archive the logs in the
    • use same database
    , where the logs are being stored
    • server for logs and logs archival. In this case, for every log table, an archive table is created in the log database
    and logs are archived in these tables
    • for logs archival.
    • Set this property to 2 if you want to
    archive the logs in the different database.
    • use another database for logs archival.
      • It is recommended
    to
      • that you use the
    different
      • another database to archive the logs
    because archiving the logs on the same database may affect the performance. In case you have
      • . This prevents performance related issues that may occur when you use same database for logs and logs archival.
      • If you set this property to 2, you need to create a new database and

    the
      • create a replica of the log tables within that database.

    To
      • Tip

        You can refer to the section "Using separate database server for archived logs" discussed on this page to know how to create

    log
      • logs archival tables

    , refer to the section described later in this page
      • .

        To enable Adeptia Connect to connect to the

    Log Archival database that is on a different database server
      • newly created log archive database, you need to specify the Log

    Archival
      • Archive Database

    Configuration
      • properties.

    abpm.logs.
    archival
    sendNotification.
    batch.enable
    onArchivalFailure

    Specifies whether to

    archive the logs record by record or in a batch.NoYes/No

    If the value is No then records are archived one by one.

    If the value is Yes then the records are archived in batches. It is recommended that to archive records in batches to avoid any performance related issue.

    abpm.logs.archival.batch.sizeSpecifies the number of records to be archived in one batch.1000Any positive integer that can be easily supported by the archival database.Its value specifies the number of records archived in one batch when abpm.logs.archival.batch.enable property is set to Yes.abpm.logs.deleteData.onArchivalFailureSpecifies whether to delete the records from log table, in case any error occurred in archival, or not.NoYes/No

    If the value is No then records from main log tables are not deleted when there is any error during archival.

    If the value is Yes then records from the main log tables are deleted, even if there is any error during archival.

    It is recommended to keep this property as No.

    abpm.logs.sendNotification.onArchivalFailureSpecifies whether to send the mail, in case of any error during log archival or not.YesYes/No

    If the value is No then no mail notification is sent in case of any error during log archival.

    If the value is Yes then mail notification is sent to the email address configured in admin user, in case of any error during log archival. Make sure that Mail Server Parameters are configured properly.

    abpm.data.archival.enableOption to set process flow repository archival enable or disabled.NoYes/No

    Set this property to Yes, if you want to archive the process flow repositories before they are cleaned up by cleanup process.

  12. Click Save to save the changes.
  13. Restart Kernel and WebRunner.

Creating Log Archival Tables on Different Database Server

In case, you are using Adeptia Connect to process a large number of files every day, it is recommended to use a separate database server for log archiving. Following are the additional steps that you need to follow in order to create log archival tables on the separate database.
If you have already created the log archival tables on the different database, you can skip the following steps.

  1. send an email notification or not in case an error occurs during the logs archival. 

    • The possible values are yes and no.
    • Set the value for this property to yes if you want to send an email notification to the email address configured for the admin user, in case of an error during log archival. Ensure that the mail server parameters are configured properly when you set the value for this property to yes.
    abpm.archive.fetchsizeNumber of records to be fetched at a time from result set cursor.
    abpm.archive.pagesizeThe total number of records to be fetched by the query in a single page.
    abpm.archive.chunksizeNumber of records to be processed in each thread. All the threads run in parallel fashion.
    abpm.logs.b2b.retainTime

    Property that defines the retain time for EDI Transactions/Templates logs.

    abpm.logs.db.retryErrorCodes

    Error codes for which retry is performed in case an error occurs while executing the query for all the tables.

    You can enter multiple error code separated by comma.

    abpm.logs.db.skipErrorCodes

    Error codes for which no retry takes place in case an error occurs while executing the query for all the tables.

    You can enter multiple error code separated by comma.

    abpm.logs.retainTime

    Property that defines the retain time for the logs (other than EDI).

    abpm.archive.logRetainTimeProperty that defines the retain time for the archived logs.
    abpm.logs.retryCount

    The number of times the application retries running the query for log cleanup and archival in case the query execution fails.

    The number of times the retry happens in case of failure of execution of a query.

    abpm.logs.retryInterval

    Time interval (in seconds) after which the re-execution of query for transaction log and transaction data tables is performed if the query execution fails.

    abpm.archive.delete.chunksizeMaximum number of archived records that can be deleted from a thread at a time. All the threads run in parallel fashion.
    delete.chunksizeMaximum number of logged records that can be deleted from a thread at a time. All the threads run in parallel fashion.


  2. Click Save to save the changes.
  3. Restart Kernel and WebRunner.

Setting up the log and log archive database properties

Follow the steps given below to set the properties related to log and log archive database.

  1. follow the steps 1 through 4 given in the section Setting up the cleanup and archival properties.
  2. Click Image Added to expand Maintenance.
  3. Click Image Added to expand Cleanup and Archival Database Properties.
  4. Change the values for the following properties as per your need.
PropertyExample ValueDescription
abpm.archival.archive.db.maxActive50

Maximum number of simultaneous connections that can exist between the archive database and the application.

abpm.archival.archive.thread.corepoolsize20

Number of worker threads used for performing log archival and cleanup.

Info
Each thread consumes one connection.


abpm.archival.archive.thread.maxpoolsize20

Maximum number of worker threads that can be used to perform log archival and cleanup.

Tip

Ensure that this number is less than or equal to the number of connections in the connection pool.


abpm.archival.archive.thread.queuecapacity0The maximum number of log archival and cleanup tasks that can remain in queued state after all the defined threads are exhausted.
abpm.archival.archive.logdb.minIdle25The minimum number of idle archive database connections that must exist in the connection pool.
abpm.archival.archive.logdb.maxWait600000Maximum lifetime (in milliseconds) of the archive database connection after it is closed.
abpm.archival.archive.logdb.minEvictableIdleTimeMillis3600000Minimum time (in milliseconds) for which an unused archive database connection must sit idle before it becomes a candidate for eviction from the pool.
abpm.archival.archive.logdb.maxStatements0Maximum number of PreparedStatements the DataSource can cache for archive database.
abpm.archival.logdb.maxActive50Maximum number of simultaneous connections that can exist between the log database and the application.
abpm.archival.logdb.maxStatements0Maximum number of PreparedStatements the DataSource can cache for log database.
abpm.archival.logdb.maxWait600000Maximum lifetime (in milliseconds) of the log database connection after it is closed.
abpm.archival.logdb.minEvictableIdleTimeMillis3600000Minimum time (in milliseconds) for which an unused log database connection must sit idle before it becomes a candidate for eviction from the pool.
abpm.archival.logdb.minIdle25Minimum number of idle log database connections that must exist in the connection pool.
abpm.archival.logdb.testOnBorrowtrue

Specifies whether a log database connection from the pool has to be validated (usually by a simple SQL validation query defined in validationQuery) or not.

abpm.archival.archive.logdb.testOnBorrowtrue

Specifies whether an archive database connection from the pool has to be validated (usually by a simple SQL validation query defined in validationQuery) or not.

abpm.archival.logdb.validationQuerySELECT 1

Defines the query that will be executed for all the log database connection tests (validation) if the default ConnectionTester (or some other implementation of QueryConnectiontester, or better yet Full QueryConnectionTester) is being used.

Enter the following values based on the type of database you are using:

  • SELECT 1 for SQL and MYSQL
  • SELECT 1 FROM DUAL for ORACLE
  • ELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS for HSQL
abpm.archival.archive.logdb.validationQuerySELECT 1

Defines the query that will be executed for all the log database connection tests (validation) if the default ConnectionTester (or some other implementation of QueryConnectiontester, or better yet Full QueryConnectionTester) is being used.

Enter the following values based on the type of database you are using:

  • SELECT 1 for SQL Server and MYSQL
  • SELECT 1 FROM DUAL for ORACLE
  • SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS for HSQL
abpm.archival.archive.logdb.isolation.level1

Defines the degree to which a transaction must be isolated from the data modifications made by any other transaction in the database.

Transaction isolation level for the archive database connections in the connection pool.

  • Enter 1 for READ UNCOMMITTED
  • Enter 2 for READ COMMITTED
abpm.archival.logdb.isolation.level1

Transaction isolation level for the log database connections in the connection pool.

  • Enter 1 for READ UNCOMMITTED
  • Enter 2 for READ COMMITTED
abpm.archival.logdb.pooltypehikariDefines the type of JDBC connection pool to be used for log database.
abpm.archival.archive.logdb.pooltypehikariDefines the type of JDBC connection pool to be used for archive database.

      4. Click Save to save the changes.

      5. Restart Kernel and WebRunner.