IBM BPM, V8.0.1, All platforms > Reference > Commands and scripts > Business Process Choreographer administrative scripts
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 it there are of it. This helps you to identify applications that can be uninstalled.
Prerequisites
The following conditions must be met:
- 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 deleteCompletedTaskInstances.py administrative script is in the Business Process Choreographer admin directory.
Syntax
-f listTemplates.py [ ([-node nodeName] -server serverName) | (-cluster clusterName) ] [-templateName templateName] [-applicationName applicationName] (-all | -active | -stopped | -invalid | -superseded) [-countInstances] [-groupBy (application | template)]
Parameters
- -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.
Example
For example, to list information about all versions of the application myapp that are deployed on the server server1:
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
Business Process Choreographer administrative scripts
Related tasks:
Listing information about deployed applications