LiveCycle provides a means to purge process data
by using the LiveCycle Java API and web service API. Process
data that is generated when a long-lived process is invoked can
become too large, resulting in lower LiveCycle performance
and the use of unnecessary disk space. It is good practice to purge
process data when records are no longer necessary. For information
about long-lived processes, see Understanding LiveCycle Processes.
When purging process data, you can purge a specific process or
all processes that belong to a category defined in Workbench. For
example, consider the processes shown in the following illustration.
If you purge process data that corresponds to processes under
the Samples - LiveCycle category, then all process data
that belongs to the MortgageLoan - Prebuilt and SecureDocument processes
is deleted. To purge data that belongs to a specific process, specify
the name of the process. For example, you can purge process data
that corresponds to the SecureDocument process (shown in the previous
illustration). Optionally, when purging process data, you can define
a filter expression that only purges data that conforms to the filter.
When purging data, it is possible to purge just that process
or the process and its child processes. A child process is a process
that was instantiated as part of another process execution (for
example, the parent process).
Hinweis: This topic discusses how to purge a specific
process using a filter as opposed to purging processes that belong
to a category.
Summary of stepsTo purge process data, perform the following tasks:
Include project files.
Create a ProcessManager Client API object.
Specify the filter that determines the data to purge.
Perform the purge operation.
Include project filesInclude necessary files in your development
project. If you are creating a client application by using Java,
include the necessary JAR files. If you are using web services,
make sure that you include the proxy files.
The following
JAR files must be added to your project’s class path:
adobe-livecycle-client.jar
adobe-usermanager-client.jar
adobe-workflow-client-sdk.jar
adobe-utilities.jar (required if LiveCycle is deployed
on JBoss)
jbossall-client.jar (required if LiveCycle is deployed
on JBoss)
For information about the location of
these JAR files, see Including LiveCycle Java library files.
Create a ProcessManager Client API objectTo programmatically
purge process data, you create a Process Management client object
to use the Process Manager Service API.
Specify the filter that determines the data to purgeTo create
a filter that purges process data, specify three values:
The name of the process variable on which the filter is based.
The condition that you want to use (use a condition operator).
The value of the process variable.
The following
condition operators can be used:
equal
not equal
less-than
less than or equal
greater than
greater than or equal
SQL LIKE
begins with text
ends with text
contains text
These operators are expressed
as a ConditionEnum enumeration value. For example, to specify greater
than, you use the following value ConditionEnum.GREATER_THAN.
Condition
filters can be combined using logical filters (AndFilter and OrFilter)
to build complex expressions. For example:
(approved=true | approved=yes) & date<'January 10, 2008' & customer ~ 'John Doe'
Using
complex expressions is the only way to specify multiple process
variables in one filter expression. The logical filters are created
by using the AndFilter (PurgeFilter left, PurgeFilter
right) or OrFilter (PurgeFilter left, PurgeFilter right)
constructors, where left and right are other instances of a condition
or logical filter.
Hinweis: A filter is only used
when purging data that corresponds to a specific process. If you
are purging data that corresponds to processes belonging to a category,
then a filter is not used.
Perform the purge operationAfter you include required library
files, create a ProcessManager Client API object, and optionally
define a filter, you can purge process data. When purging process data,
you can specify the minor and major version of the process and specify whether
child process data should also purged.
Purge process data using the Java APIPurge process data by using the ProcessManager API (Java):
Include project files
Include client JAR files,
such as adobe-workflow-client-sdk.jar, in your Java project’s class
path.
Create a ProcessManager Client API object
Specify the filter that determines the data to purge
Create
a ConditionFilter object by using its constructor
and passing the following values:
A string value that
specifies the process variable on which the condition is based.
A ConditionEnum value that specifies the
condition operator. For example, specify ConditionEnum.GREATER_THAN to
specify greater than.
A string value that specifies the value of the process variable.
Perform the purge operation
Perform the purge operation
by invoking the ProcessManager object’s purgeProcess method
and passing the following values:
A string value
that specifies the name of the process to purge.
A short value that specifies the major version of the process.
A short value that specifies the minor version of the process.
An integer value that specifies the status of the process.
Valid values are 1 which specifies to purge completed
processes only; 2 which specifies to purge terminated
processes only; 3 which specifies to purge both completed
and terminated processes.
A long value that specifies the seconds defining the age
of the process to purge. The process is purged if its completion
time is less than or equal to the time calculated by subtracting
the number of seconds specified by this value from the time when
the purge started. For example, to purge processes completed a day
ago, set this field to 86400 (number of seconds in a day).
A ConditionFilter object that represents
the filter that is used to purge the process.
A Boolean value that specifies whether to delete child processes.
Specify false to only delete just the parent process.
In this situation, process data related to child processes are not
deleted.
Hinweis: You can purge all processes
that belong to a category by invoking the ProcessManager object’s purgeProcesses method.
Purge process data using the web service APIPurge process data by using the ProcessManager API (web
service):
Include project files
Create a Microsoft
.NET client assembly that consumes the ProcessManagerService WSDL.
To create a proxy object that lets you invoke purge data operations
by using Base64 encoding, specify this WSDL definition:
http://localhost:8080/soap/services/ProcessManager?WSDL&lc_version=8.2.1.
You
must specify &lc_version=8.2.1 (or later) because
the purge operation was added in LiveCycle 8.2.
Reference the Microsoft .NET client assembly.
Create a ProcessManager Client API object
Using the Microsoft .NET client assembly, create a ProcessManagerService object
by invoking its default constructor.
Set the ProcessManagerService object’s Credentials data member
with a System.Net.NetworkCredential value that specifies
the user name and password value.
Specify the filter that determines the data to purge
Create a ConditionFilter object by using
its constructor.
Specify the process variable on which the condition is based
by assigning a string value to the ConditionFilter object’s variable data
member.
Specify the condition operator by assigning a ConditionEnum
value to the ConditionFilter object’s condition data member. For
example, specify ConditionEnum.GREATER_THAN to
specify greater than.
Specify the value of the process variable by assigning a
string value to the ConditionFilter object’s value data
member.
Perform the purge operation
Perform the purge operation
by invoking the ProcessManagerService object’s purgeProcess method
and passing the following values:
A string value
that specifies the name of the process to purge.
A short value that specifies the major version of the process.
A Boolean value that specifies whether to use the previous
value. Specify true.
A short value that specifies the minor version of the process.
A Boolean value that specifies whether to use the previous
value. Specify true.
An integer value that specifies the status of the process.
Valid values are 1 which specifies to purge completed
processes only; 2 which specifies to purge terminated
processes only; 3 which specifies to purge both completed
and terminated processes.
A Boolean value that specifies whether to use the previous
value. Specify true.
A long value that specifies the seconds defining the age
of the process to purge. The process is purged if its completion
time is less than or equal to the time calculated by subtracting
the number of seconds specified by this value from the time when
the purge started. For example, to purge processes completed a day
ago, set this field to 86400 (number of seconds in a day).
A Boolean value that specifies whether to use the previous
value. Specify true.
A ConditionFilter object that represents
the filter that is used to purge the process.
A Boolean value that specifies whether to delete child processes.
Specify false to only delete the parent process.
A Boolean value that specifies whether to use the previous
value. Specify true.
|
|
|