Importing and Exporting Audit Trail Information - Technology Preview

Infinity provides a technology preview for enhanced archiving functionality including export, import, unload and load of Audit Trail information.

Note
This feature is customer technology preview only. It may not be functionally complete and is not intended for production use.

Required Configuration

Note that to enable the functionality, you have to configure the ZIP archiver by adding the following the files at engine-core/meta-inf/services:

Add the following properties to your carnot.properties file:

org.eclipse.stardust.engine.core.persistence.archive.IArchiveReader.Providers = org.eclipse.stardust.engine.core.persistence.archive.ZipArchiveReader
org.eclipse.stardust.engine.core.persistence.archive.IArchiveWriter.Providers = org.eclipse.stardust.engine.core.persistence.archive.ZipArchiveWriter

Exporting Audit Trail Information

For exporting audit trail information you can use one the following commands:

The following options are available for these commands:

Filtering Options with no Combination allowed

No combination of these filters are allowed for one command invocation.

If none of the above filters are specified, all process instances of all models and version for given partition are exported where filters below need to be applied if available.

Filtering Options with Combination allowed

Passing Preferences on Export

Note that inserting preferences for audit trail exports into the PREFERENCES table is not supported anymore. Instead, the preferences have to be uploaded using the console command like in the example below:

console -user motu -password motu -force preferenceStore -load -sourceFile preferences.zip

The folder structure of the preferences.zip file needs to be as follows:

preferences
   stardust-archiving
      preference

Please find below an example preference file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<preferences id="preference" module="stardust-archiving">   
   <preference name="stardust-archiving.import.archive.filesystem.root">C:/audit/import1</preference>  
   <preference name="stardust-archiving.export.archive.filesystem.root">C:/audit/export1</preference>
   <preference name="stardust-archiving.export.archive.filesystem.dateFormat">yyyy/MM/dd HH:mm</preference>
   <preference name="stardust-archiving.export.archive.filesystem.folderFormat">/yyyy/MM/dd/HH/mm</preference>    
   <preference name="stardust-archiving.export.archive.auto">false</preference>
   <preference name="stardust-archiving.export.archive.auto.documents">ALL</preference>
   <preference name="stardust-archiving.export.archive.descriptor.keyonly">false</preference>
</preferences>

Examples

Exporting all terminated process instances of a model

With the following command, all terminated process instances of model with OID 1 are exported and from the active Audit Trail and dumped to a given dump location:

console -user motu -password motu export -dump <Dump location> –modelOids 1

Exporting all terminated process instances of specified processes for a given start time

The following command exports all terminated process instances of processes ProDef1 and ProDef2 that started before a given date 2015-01-01.

console -user motu -password motu export -dump <Dump location> –processes ProDef1,ProDef2 –toDate 2015-01-01

Dumping all terminated and active processes for a given start time

The following command dumps all terminated and active processes that have been started at or after 2015-01-01 to an archive structure in C:/tmp.

console -user motu -password motu export –fromDate 2015-01-01 –dump c:/tmp

Archiving all terminated process instances of specified models

The following command archives and deletes all terminated process instances of models with OID 2 and 3:

console -user motu -password motu archive -modelOids 2,3

Importing Audit Trail Information

The following import command options are available:

Filtering Options with no Combination allowed

Filtering Options with Combination allowed

Passing Preferences on Import

The target Audit Trail (import) is not necessarily the source (export) Audit Trail. Therefore it is required to have configuration settings for both, target and source. The console command line tool allows to pass a preference.xml on import as a short cut. That way you can determine the configuration when running the console command.

Import preference settings

The following properties can be configured for import:

Example preference settings

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<preferences id="preference" module="stardust-archiving">
 <preference name="stardust-archiving.import.archive.ID">MyArchive</preference>
 <preference name="stardust-archiving.import.archive.type">filesystem</preference>
 <preference name="stardust-archiving.import.archive.filesystem.root">/data/archive</preference>
</preferences>

Importing Examples

Importing all process instances with a specified OID range

The following example command imports all process instances with an OID between 1 and 100:

console import –processOids 1-100

Importing all process instances started in a specified time frame

The following example command imports all process instances that have been started at or after 2015-01-01 and before 2015-01-02:

console import –fromDate 2015-01-01 –toDate 2015-01-02

Importing all process instances with specified descriptor ID and start date

The following example command imports all process instances with customer ID "123" and contract ID "abc" that have been started at or after 2015-01-01:

console import –data customerId=123,contractId=abc –fromDate 2015-01-01