Stardust 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.
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:
org.eclipse.stardust.engine.core.persistence.archive.IArchiveReaderorg.eclipse.stardust.engine.core.persistence.archive.ZipArchiveReaderorg.eclipse.stardust.engine.core.persistence.archive.IArchiveWriterorg.eclipse.stardust.engine.core.persistence.archive.ZipArchiveWriterThe following export command options are available:
-batchSize <arg> - defines the number of process instances
to be exported per batch. Defaults to 1000.-concurrentBatches <arg> - defines how many batches can
export concurrently. Defaults to 10.-partition - Optionally specifies the partition(s) the
operation should be run against. Defaults to the default partition. Accepts as
argument a single partition ID or a comma separated list of partition IDs.-archive - default. Delete data from the Audit Trail
database.-dump, -d <arg> - optional. Dumps all process instances
(terminated and active) to the specified archive location.-withDocuments, -wd <arg> (latest/all) - optional
parameter determines if documents are exported too. Per default no
documents are exported. Valid options are: NONE/LATEST/ALL.-modelOids <OID[,OID]*> - all process instances
for the models specified by the models OIDs provided (comma separated list of
OIDs). Process instances must be terminated (completed or aborted).-models, -model <ID[,ID]*> - all process instances of a
model with given ID (comma separated list of IDs).
Process instances must be terminated (completed or aborted).-processOids <OID[,OID]*>/<OID-OID> - all process
instances with given OID defined via a comma separated list of OIDs or a
range, e.g.: 1-1000. Note that process instances must be terminated
(completed or aborted).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.
-processes, -procDef <ID[,ID]*> - all process instances
of process definition with given IDs (comma separated list).
Process instances must be terminated (completed or aborted).-toDate, -td <timestamp> - all process instances terminated at
toDate or before if the use case is archive. All process instances started at toDate
or before if the use case is dump.-fromDate, -fd <timestamp> / <t1> -toData <t2>
- Restricts any operation to process instances started after the
given date (always inclusive).
The specified date must conforms to ISO date patterns
(i.e. "2005-12-31", "2005-12-31 23:59" or "2005-12-31T23:59:59:999"),
or "yyyy/MM/dd hh:mm:ss:SSS" for backward compatibility. If fromDate is not
provided and toDate is provided fromDate defaults to 1 January 1970.-dateDescriptors, -ddscr <arg> -
Restricts any operation to process instances that has the specified descriptor
values. Use this option to specify descriptors that have date values.
The specified date must conforms to ISO date patterns
(i.e. "2005-12-31", "2005-12-31 23:59" or "2005-12-31T23:59:59:999"),
or "yyyy/MM/dd hh:mm:ss:SSS" for backward compatibility.-descriptors, -dscr <ID=VALUE[,ID=VALUE]*> -
Restricts any operation to process instances that has the descriptor values.
Use this option to specify all non-date descriptors. If more are specified as
comma separated list, the filtering is done with AND conjunction.With the following command, all terminated process instances of model with OID 1 are exported and deleted from the active Audit Trail:
console export –modelOids 1
The following command exports all terminated process instances of processes ProDef1 and ProDef2 that started before or at 2015-01-01.
console export –processes ProDef1,ProDef2 –toDate 2015-01-01
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 export –fromDate 2015-01-01 –dump c:/tmp
The following import command options are available:
-partition - Optionally specifies the partition(s) to be
imported into. Accepts as argument a single partition ID or a comma separated
list of partition IDs. If this parameter is not used, the import command of
sysconsole has an effect only on the default partition.-concurrentBatches <arg> - defines how many batches can export
concurrently, defaults to 10.-withDocuments, -wd <arg> (latest/all) -optional parameter
determines if documents are imported too. Per default no documents are exported.
Valid options are: NONE/LATEST/ALL.-preferences <arg> - optional parameter pointing to a
preferences.xml that contains information about the archive/dump where the data is imported from.-models, -model <ID[,ID]*> - Imports all process instances
for specified list of model IDs (comma separated list of IDs).-processOids <OID[,OID]*> - all process instances with
given OID.-processOids <OID-OID> - all process instances for given
range.-processes, -procDef <ID[,ID]*> - Imports all process instances
for a specified list of process definition IDs (comma separated list of IDs).-toDate, -td <timestamp> - all process instances started at
toDate or before.-fromDate, -fd <timestamp> / <t1> -toData <t2>
- Restricts import to process instances started after the given date (always
inclusive). The specified date must conforms to ISO date patterns
(i.e. "2005-12-31", "2005-12-31 23:59" or "2005-12-31T23:59:59:999"),
or "yyyy/MM/dd hh:mm:ss:SSS" for backward compatibility. If fromDate is not
provided and toDate is provided fromDate defaults to 1 January 1970.-dateDescriptors, -ddscr <arg> -
Restricts any operation to process instances that has the specified descriptor
values. Use this option to specify descriptors that have date values.
The specified date must conforms to ISO date patterns
(i.e. "2005-12-31", "2005-12-31 23:59" or "2005-12-31T23:59:59:999"),
or "yyyy/MM/dd hh:mm:ss:SSS" for backward compatibility.descriptors, -dscr <ID=VALUE[,ID=VALUE]*> - Restricts any
operation to process instances that has the descriptor values. Use this option
to specify all non-date descriptors. If more are specified as comma separated list
the filtering is done with AND conjunction.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.
The following properties can be configured for import:
Archive ID from which Audit Trail information is imported. Per default the ID matches the runtime UUID. The ID can be overridden manually. For the import case the archive ID is optional.
Only evaluated if type is file system. It defines the location where the archived data will be read from.
Toggle that specifies if documents/revisions must be imported. The default would be none (none/latest/all). Latest indicates that just the latest version should be imported. All indicates that all revisions should be imported.
<?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>
The following example command imports all process instances with an OID between 1 and 100:
console import –processOids 1-100
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
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