Deleting data from the observer database

Use an administrative command to selectively delete from the Business Process Choreographer Observer database all of the data for process instances that match specified conditions.

Why and when to perform this task

You can delete the observer information for process instances in three ways:

Steps for this task

  1. 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
  2. Delete observer data for process instances from the database.
    On Windows systems, enter the following command:
    install_root\bin\wsadmin -lang jython 
         -f observerDeleteCompletedProcessInstances.py
         [([-node nodeName] -server serverName) | (-cluster clusterName)]
         -dataSource dataSourceJNDIName
         ( -templateName templateName  -validFrom timestamp)
         | -completedBefore timestamp 
         | -force -state state -reachedBefore timestamp
         [-profileName profileName]
    On UNIX and Linux systems, enter the following command:
    install_root/bin/wsadmin -lang jython 
         -f observerDeleteCompletedProcessInstances.py
         [([-node nodeName] -server serverName) | (-cluster clusterName)]
         -dataSource dataSourceJNDIName
         ( -templateName templateName  -validFrom timestamp)
         | -completedBefore timestamp 
         | -force -state state -reachedBefore timestamp
         [-profileName profileName]
    Where:
    -node nodeName
    This name identifies the node. The default is the local node. This parameter is optional.
    -server serverName
    The name of the server. This is parameter optional. The default is the default server.
    -cluster clusterName
    The name of the cluster. This parameter is optional.
    -datasource datasourceJNDIName
    Identifies the database that the command will act on. This parameter is required because a server or cluster can have multiple observer databases.
    -templateName templateName-validFrom timestamp
    Optionally, specifies the name of the process template or human task template for which observer data will be deleted. If this option is specified, you must also specify the -validFrom option.
    The timestamp string specifies the date from which the template is valid (in UTC) as displayed in the administrative console. It has the following format: 'yyyy-MM-ddThh:mm:ss' (year, month, day, T, hours, minutes, seconds). For example, 2006-11-20T12:00:00
    -completedBefore timestamp
    Optionally, deletes observer data for 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
    -force -state state -reachedBefore timestamp
    Optionally, forces the deletion of observer data for process instances that reached the given state 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 process instances running on node myNode in server myServer that reached the state finished before midday on May 16, 2008, run the following command:
    wsadmin –lang jython –f observerDeleteCompletedProcessInstances.py 
            -node myNode -server myServer 
            -force -state finished -reachedBefore 2008-05-16T12:00:00
    If successful, the tool reports the number of instances for which observer data was deleted and the number of table entries that were deleted from the database. Otherwise, error information is reported and no changes are made to the database.

Result

The observer data for the specified process instances has been deleted from the observer database.

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)