This topic applies only to the IBM Business Process Manager Advanced configuration.

listTemplates.py administrative script

Over time, new versions of applications are installed, but an old version cannot be uninstalled until there are no more active instances of the old version. Use the listTemplates.py administrative script to display which versions of applications are deployed, and for each version, how many instances there are of it. This helps you to identify applications that can be uninstalled.

Prerequisites

The following conditions must be met:
  • If 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 listTemplates.py administrative script is in the Business Process Choreographer admin directory.
For Windows operating systeminstall_root\ProcessChoreographer\admin
For Linux operating systemFor UNIX operating systeminstall_root/ProcessChoreographer/admin

Syntax

-f listTemplates.py
     -cluster clusterName
     [-templateName templateName]
     [-applicationName applicationName]
     (-all | -active | -stopped | -invalid | -superseded)
     [-countInstances]
     [-groupBy (application | template)]

Parameters

-cluster clusterName
The name of the cluster where Business Process Choreographer is configured. In a multicluster setup, you must specify the application cluster because that is where Business Process Choreographer is configured.
-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 about all applications on the 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 behavior is the default.
-active
This option lists only valid templates that are in the state active.
-stopped
This option lists only valid templates that are in the state stopped.
-invalid
This option lists only 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.
Important: 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 at least one cluster member must be running.
-superseded
This option lists only 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.
Important: 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 at least one cluster member must be running.
-groupBy (application|template)
Optionally groups the information by application or by template.

Example

For example, to list information about all versions of the application myapp that are deployed on the cluster myCluster:

For Linux operating systemFor UNIX operating systemEnter the following command:
wsadmin.sh -f listTemplates.py  -cluster myCluster -application myApp -all -countInstances
For Windows operating systemEnter the following command:
wsadmin -f listTemplates.py  -cluster myCluster -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