IBM BPM, V8.0.1, All platforms > Administer applications and processes in the runtime environment > Manage processes and their components > Administer BPEL processes and human tasks > Optimizing BPEL process administration

Listing information about process and task templates

Use the listTemplates.py administrative script to list instance and version information about deployed BPEL process and task templates. This script provides an overview of which versions of a template are deployed with which applications. The information can help you identify whether an old version of an application can be undeployed. An application cannot be undeployed if there are any instances of any BPEL process templates or human task templates belonging to the application, regardless of the state of the instance.

The following conditions must be met:


Procedure

  1. Change to the Business Process Choreographer subdirectory where the administrative script is located.
    cd  INSTALL_ROOT/ProcessChoreographer/admin

    cd INSTALL_ROOT/ProcessChoreographer/admin

    cd INSTALL_ROOT\ProcessChoreographer\admin

  2. Run the script to display the information.

    •  INSTALL_ROOT/bin/wsadmin.sh  -f listTemplates.py
           [ ([-node  nodeName] -server  serverName) | (-cluster  clusterName) ]
           [-templateName  templateName]
           [-applicationName  applicationName]
           (-all | -active | -stopped | -invalid | -superseded)
           [-countInstances]
           [-groupBy (application | template)]
    • INSTALL_ROOT/bin/wsadmin.sh -f listTemplates.py [ ([-node nodeName] -server serverName) | (-cluster clusterName) ] [-templateName templateName] [-applicationName applicationName] (-all | -active | -stopped | -invalid | -superseded) [-countInstances] [-groupBy (application | template)]

    • INSTALL_ROOT\bin\wsadmin -f listTemplates.py [ ([-node nodeName] -server serverName) | (-cluster clusterName) ] [-templateName templateName] [-applicationName applicationName] (-all | -active | -stopped | -invalid | -superseded) [-countInstances] [-groupBy (application | template)]

    Where:

    -node nodeName

    The name of the node where Business Process Choreographer is configured. This is optional when specifying the server name. The default is the local node.

    -server serverName

    The name of the server where Business Process Choreographer is configured. This is required if a cluster is not specified.

    -cluster clusterName

    The name of the cluster where Business Process Choreographer is configured. This is required if Business Process Choreographer is configured on a cluster.

    -templateName templateName

    Optionally restricts the list to a particular temple.

    -applicationName applicationName

    Optionally restricts the reported information to the specified application. The default is to report information on all applications on the server or cluster.

    -all | -active | -stopped | -invalid | -superseded

    You can specify one of these options to restrict the list to a subset of the instances.

    -all

    Lists all valid templates. That is, templates that belong to a deployed application. This is the default behavior.

    -active

    Only lists valid templates that are in the state active.

    -stopped

    Only lists valid templates that are in the state stopped.

    -invalid

    Only lists templates that are in the Business Process Choreographer database, but do not belong to any deployed application. This is the only option that displays invalid templates.

    If you use this option, the script requires access to the Business Process Choreographer database, so run the script in connected mode, and if Business Process Choreographer is configured on a cluster, at least one cluster member must be running.

    -superseded

    Only lists templates for which a newer version is available in the runtime system, regardless of their state.

    -countInstances

    Optionally provides a count of how many instances of each template are in the system.

    If you use this option, the script requires access to the Business Process Choreographer database, so run the script in connected mode, and if Business Process Choreographer is configured on a cluster, at least one cluster member must be running.

    -groupBy (application|template)

    Optionally groups the information by application or by template.

    For example, to list information about all versions of the application myApp that are deployed on the server myServer, including how many instances there are of each template version:

    wsadmin.sh -f listTemplates.py -server myServer -application myApp -all -countInstances

    wsadmin.sh -f listTemplates.py -server myServer -application myApp -all -countInstances

    wsadmin -f listTemplates.py -server myServer -application myApp -all -countInstances

    The script outputs the information in a table that has the following columns:

    • Application name
    • Version
    • Template name
    • Valid-from date
    • Number of instances

  3. If you want to identify application templates that could be removed, look for superseded versions that have zero instances. Then perform Browsing and administering modules to check whether any SCA modules depend on the services exported by the application. By removing applications that are no longer needed, you can speed up how fast your server starts.

  4. If you want to uninstall a particular application template, but it still has running instances, consider performing any of the following.

    • Allow more time for the running instances to reach an end state, then run the script again.

    • Identify whether the running BPEL process instances can be migrated to a newer template instance.

    • Investigate the reasons why particular instances have not reached an end state, and consider whether it is acceptable to force any of then into an end state.


Results

You have the latest information about the applications.

Optimizing BPEL process administration