Use an administrative command to selectively delete from the Business
Process Choreographer database any top-level process instances that have reached
an end state of finished, terminated, or failed.
Before you begin
Before you begin this procedure, the application
server on which process instances are to be deleted must be running. That
is, the -conntype none option of wsadmin cannot
be used, because a server connection is required. No special authority is
required to run this command, even if security is enabled.
Why and when to perform this task
A top-level process instance is considered completed if it is
in one of the following end states: finished, terminated or failed.
You specify criteria to selectively delete top-level process instances and
all their associated data (such as activity instances, child process instances,
and inline task instances) from the database.
Steps for this task
- Change to the Business Process Choreographer subdirectory where
the administration scripts are located.
On Windows
® systems, enter:
cd install_root\ProcessChoreographer\admin
On UNIX
® and Linux
® systems,
enter:
cd install_root/ProcessChoreographer/admin
- Delete process instances from the database.
On Windows systems,
enter the following command:
install_root\bin\wsadmin –lang jython –f deleteCompletedProcessInstances.py
[([-node nodeName] -server serverName) | (-cluster clusterName)]
(-all | -finished | -terminated | -failed )
[-templateName templateName [-validFrom timestamp]]
[-startedBy userID ]
[-completedBefore timestamp]
[-profileName profileName]
On UNIX and Linux systems,
enter the following command:install_root/bin/wsadmin –lang jython –f deleteCompletedProcessInstances.py
[([-node nodeName] -server serverName) | (-cluster clusterName)]
(-all | -finished | -terminated | -failed )
[-templateName templateName [-validFrom timestamp]]
[-startedBy userID ]
[-completedBefore timestamp]
[-profileName profileName]
Where:
- -node nodeName
- Optional when specifying the server name. This name identifies the node.
The default is the local node. You can specify the server name and node name
or the cluster name.
- -server serverName
- The name of the server. Required if the cluster name is not specified.
You can specify the server name and node name or the cluster name.
- -cluster clusterName
- The name of the cluster. Required if the business process container is
configured for a WebSphere® cluster. You can specify the cluster
name or the server name and node name.
- -all|-finished|-terminated|-failed
- Specifies which process instances are to be deleted according to their
state. You can specify a combination of finished, terminated, failed,
or all.
- -templateName templateName
- Optionally, specifies the name of the process template or human task template
to be deleted. If this option is specified, you can also use the validFrom
- -validFrom timestamp
- The date from which the template is valid (in UTC) as displayed in the
administrative console. This option can only be used with the templateName option.
The timestamp string has the following format: 'yyyy-MM-ddThh:mm:ss'
(year, month, day, T, hours, minutes, seconds). For example, 2006-11-20T12:00:00
- startedBy userID
- Optionally, only deletes completed process instances that were started
by the given User ID.
- -completedBefore timestamp
- Optionally, deletes completed process instances that completed before
the given time. The timestamp string has the following
format: 'yyyy-MM-ddThh:mm:ss' (year, month, day, T, hours, minutes, seconds).
For example, 2006-07-20T12:00:00
- profileName profileName
- The name of a user-defined profile. Specify this option if you are not
working with the default profile.
For example, to delete all of the process
instances running on node myNode in server myServer that
are in the state finished, and were started by the user Antje,
run the following command:wsadmin –lang jython –f deleteCompletedProcessInstances.py
-node myNode -server myServer
-finished
-startedBy Antje
Result
The completed process instances have been deleted from the database.