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.

Before you begin

The following conditions must be met:

Procedure

  1. Change to the Business Process Choreographer subdirectory where the administrative script is located. This topic applies only to the z/OS platformEnter the following command: This topic applies only to the z/OS platform
    cd install_root/ProcessChoreographer/admin
    This topic applies only to the Distributed platformsFor Linux operating systemFor UNIX operating systemEnter the following command:
    cd install_root/ProcessChoreographer/admin
    This topic applies only to the Distributed platformsFor Windows operating systemEnter the following command:
    cd install_root\ProcessChoreographer\admin
  2. Run the script to display the information.
    • This topic applies only to the z/OS platformThis topic applies only to the z/OS platformEnter the following command:This topic applies only to the z/OS platform
      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)]
    • This topic applies only to the Distributed platforms

      For Linux operating systemFor UNIX operating systemEnter the following command:

      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)]
    • This topic applies only to the Distributed platforms

      This topic applies only to the Distributed platformsFor Windows operating systemEnter the following command:

      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.
    Note: If you use this option, the script requires access to the Business Process Choreographer database, so you must 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.
    Note: If you use this option, the script requires access to the Business Process Choreographer database, so you must 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:

    This topic applies only to the z/OS platformEnter the following command:
    wsadmin.sh -f listTemplates.py  -server myServer -application myApp -all -countInstances
    For Linux operating systemFor UNIX operating systemEnter the following command:
    wsadmin.sh -f listTemplates.py  -server myServer -application myApp -all -countInstances
    For Windows operating systemEnter the following command:
    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. Optional: 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. Optional: 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.