Use the observerDeleteProcessInstanceData.py administrative
script to selectively delete from the reporting database of Business
Process Choreographer Explorer, all of the data for process instances
that match specified conditions. Deleting unnecessary data can improve
the performance of generating reports.
Prerequisites
The following conditions must be met:- Run the script in the connected mode, that is,
the application server must be running.
- If Business Process Choreographer is configured on
a cluster, then at least one cluster member must be running.
- If WebSphere® administrative
security is enabled, and your user ID does not have operator authority,
include the wsadmin -user and -password options
to specify a user ID that has operator authority.
- If you are not working with the default
profile, use the wsadmin -profileName profile option
to specify the profile.
Location
The observerDeleteProcessInstanceData.py administrative script is in the Business
Process Choreographer admin directory.
Syntax
-f observerDeleteProcessInstanceData.py
( [-node node_name] -server server_name) | (-cluster cluster_name )
[ -dataSource dataSource_JNDI_name ]
[ -dbSchemaName dbSchemaName]
(
( (-deletedBeforeLocal timestamp)|(-deletedBeforeUTC timestamp
| ( -templateName template_name -validFromUTC timestamp )
| ( -force [-templateName template_name -validFromUTC timestamp]
-state state (-reachedBeforeLocal timestamp)|
(-reachedBeforeUTC timestamp) ) ) )
Parameters
- -node node_name
- This name identifies the node where the Business Process Choreographer
Event Collector is configured. The default is the local node. This
parameter is optional if you specify the server parameter.
Do not specify the node if you provide the cluster parameter.
- -server server_name
- The name of the server where the Business Process Choreographer
Event Collector is configured. The default is the default server.
If you specify this parameter, you must not specify the cluster parameter.
- -cluster cluster_name
- The name of the cluster where the Business Process Choreographer
Event Collector is configured. If you specify this parameter, you
must not specify the server parameter.
- -dataSource datasource_JNDI_name
- Because a server or cluster can have multiple reporting databases,
this parameter identifies which database the command will act on.
The default is jdbc/BPEDB.
- -dbSchemaName dbSchemaName
- Use this parameter if the reporting database is set up with a
specific schema name.
- -deletedBeforeLocal
- Deletes all reporting data for process instances that reached
the state deleted before the specified local time. The date and
time, timestamp, are expressed in the following
format: 'yyyy-MM-dd[Thh:mm:ss]'
(year, month, day, T, hours, minutes, seconds). For example, 2008-07-20T12:00:00.
If you specify only the year, month, and day, the hour, minutes, and
seconds are set to 00:00:00 local time on the server.
- -deletedBeforeUTC timestamp
- Deletes all reporting data for process instances that reached
the state deleted before the specified time in
Coordinated Universal Time (UTC). The
date and time, timestamp, are expressed in the
following format: 'yyyy-MM-dd[Thh:mm:ss]'
(year, month, day, T, hours, minutes, seconds). For example, 2008-07-20T12:00:00. If
you specify only the year, month, and day, the hour, minutes, and
seconds are set to 00:00:00 UTC.
- -templateName template_name
- Deletes all reporting data for instances that belong to the specified
template version.
- -validFromUTC timestamp
- If you specify the templateName option, this
option is required to distinguish between different possible versions
of the template. The date and time, timestamp,
are expressed in Coordinated Universal Time (UTC), in the following
format: 'yyyy-MM-ddThh:mm:ss'
(year, month, day, T, hours, minutes, seconds). For example, 2008-07-20T12:00:00.
- -force
- Forces the deletion of all reporting data for process instances
either for all templates or for a specified template version that
reached a specified state before a specified time. If you use this
option, you must also specify the options -state,
and either -reachedBeforeLocal or -reachedBeforeUTC.
The options -templateName and -validFromUTC are
optional.
- -state state
- Specifies one of the following states: running, terminated, suspended, failed, finished, compensated.
- -reachedBeforeLocal timestamp
- Specifies a cutoff time in the server's local time, before
which the specified state must have been reached.The date and time, timestamp, are expressed in Coordinated
Universal Time (UTC), in the following format: 'yyyy-MM-ddThh:mm:ss'
(year, month, day, T, hours, minutes, seconds). For example, 2008-07-20T12:00:00.
- -reachedBeforeUTC timestamp
- Specifies a cutoff time in UTC, before which the specified state
must have been reached. The date and time, timestamp,
are expressed in Coordinated Universal Time (UTC), in the following
format: 'yyyy-MM-ddThh:mm:ss'
(year, month, day, T, hours, minutes, seconds). For example, 2008-07-20T12:00:00.
Examples
For example, to delete all reporting data
for instances of the process template my_template,
which is valid from midday on January 2, 2007 UTC, that are running
on node my_node in server my_server that were started before midday
(local time on the server) on July 20, 2007:

Enter the following
command:
wsadmin.sh –f observerDeleteProcessInstanceData.py
-node my_node -server my_server
-force -templateName my_template -validFromUTC 2007-01-02T12:00:00
-state running -reachedBeforeLocal 2007-07-20T12:00:00
Enter the following command:
wsadmin –f observerDeleteProcessInstanceData.py
-node my_node -server my_server
-force -templateName my_template -validFromUTC 2007-01-02T12:00:00
-state running -reachedBeforeLocal 2007-07-20T12:00:00