Process Template Deletion Tool - Quick Reference

Note: This document must be printed in landscape format!

Currrently, you can only logically delete process templates but not physically remove them from the run-time database. For example, if you delete templates from your template list in the Runtime client, they are no longer available to the Runtime client but they are not physically removed from the database. These logically deleted process templates waste space in your database and can impact performance.

You can use the Process Template Deletion Tool (PTDT) to physically remove logically deleted process templates from the run-time database. The PTDT can be used with versions 3.3.2 and 3.4.0 of IBM WebSphere MQ Workflow (MQWF). The tool runs on all supported platforms, except z/OS.

Getting started

To run the PTDT on your system, you must have installed and configured an MQWF Runtime client.

If you are running MQWF with DB2 Universal Database, ensure that JDBC 2.0 is used. To switch to JDBC 2.0:

  1. Stop all MQ and DB2 services that are running on your machine.
  2. Call usejdbc2.bat.
    This file is located in the java12 directory in your DB2 installation directory.

Before you use the PTDT, it is recommended that you make a backup copy of your run-time database.

Setting up the PTDT

The PTDT consists of the fmcjptdt.jar file that contains the Java code and a JNI library (fmczptdt.dll on Windows, libfmczptdt.so on AIX and Sun Solaris, libfmczptdt.sl on HP-UX systems). A configuration file, ptdt.properties, is also supplied.

To install the PTDT:

  1. Unzip ptdt_v3xx.zip (where xx is your installed MQWF version) to your file system.
  2. Include the fully-qualified path for fmcjptdt.jar, jlog.jar and fmcoutil.jar in your CLASSPATH (as shown in the example scripts) and the corresponding JNI library in your systems library search path.
    Because these files are not needed by any other MQWF program, you can copy them into the PTDT directory.
  3. Ensure that the configuration file, ptdt.properties, is in the directory from where you call the PTDT.

To avoid the need to set the environment variables each time you start the tool, it is recommended that you use a start script. Examples of scripts for Windows platforms and for UNIX are given here.

Example of a start script for Windows platforms

@echo off
setlocal
REM
REM set the CLASSPATH for Java
REM
REM Add the path to find the JDBC classes
REM On Oracle you have to use classes12.zip from your Oracle installation instead of db2java.zip
REM
set <DB2InstanceDirectory>\sqllib\java\db2java.zip;%CLASSPATH%
REM
REM Add the path to find the PTDT classes
REM
set CLASSPATH=<installationDirectory>\fmcjptdt.jar;<installationDirectory>
\jlog.jar;<installationDirectory>\fmcoutil.jar;%CLASSPATH%
REM
REM fmcoutil.jar may also be in your MQWF installation directory.
REM If you are using MQWF 3.4 you also can use this file.
REM
REM set the PATH for the DLLs
REM
set PATH=<installationDirectory>;%PATH%
REM
REM And now launch the PTDT pass the arguments
REM
java com.ibm.workflow.util.ProcessTemplateDeletion.Main %*
REM
endlocal

Example of a start script for UNIX systems

#!  /usr/sh
# set the CLASSPATH for Java
#
# Add the path to find the JDBC classes
# On Oracle you have to use the path and file name of classes12.zip
#
export CLASSPATH=<DB2InstanceDirectory>/sqllib/java/db2java.zip:$CLASSPATH
#
# Add the path to find the PTDT classes
#
export CLASSPATH=<installationDirectory>/fmcjptdt.jar:<installationDirectory>
/jlog.jar:<installationDirectory>\fmcoutil.jar:$CLASSPATH
#
# fmcoutil.jar may also be in your MQWF installation directory.
# If you are using MQWF 3.4 you also can use this file.
#
# Set the Path for the shared libraries
# Replace LIBPATH with: LD_LIBRARY_PATH on Solaris
# SHLIB_PATH on HPUX
export LIBPATH=<installationDirectory>:$LIBPATH
#
# And now launch the PTDT pass the arguments
#
java com.ibm.workflow.util.ProcessTemplateDeletion.Main $*

Starting the PTDT

You can use the following command to start the PTDT from the command prompt:
java com.ibm.workflow.util.ProcessTemplateDeletion.Main [Options]

The options are:

-u <username>          : name of the runtime database administrator 
or a database user with deletion rights
-p <password> : password to access the database
-y <configuration id> : MQWF configuration ID

The username and password are mandatory. If you do not specify this information, the tool prompts you for the input. If no MQWF configuration ID is specified, the system default configuration is used.

Customizing the PTDT

You can control the behaviour of the tool by setting properties in the ptdt.properties file. This file must be in the directory from where you call the PTDT. If it is missing, the program exits with an error.

You can set the following properties:

  • Test mode control.
    This parameter is useful if you want to see how the deletion of the templates might affect your run-time database. If Test_Mode=true is set, changes made to the database are rolled back so that the run-time database remains unchanged. The PTDT also reports additional information.

    If Test_Mode=false is set, the test mode is switched off and transactions are committed to the database.

  • Trace file name.
    If Trace_File_Name=<filename> is set, trace output is written to the specified file. By default the trace is written to the ptdt.log file in the current directory.

    To switch on tracing, set the environment variable FMC_TRACE_CRITERIA=9,FFFF,FFFFFFFF in your command prompt before you start the PTDT. To switch off tracing, remove this variable or set its value to an empty string.

Using the PTDT

The main menu

If your logon information is correct, the main menu is displayed:

            -------------------MAIN-MENU---------------------
| (l) --> List all active process templates |
| (f) --> List deleted process templates |
| (r) --> Remove deleted process templates |
| (x) --> Exit |
-------------------------------------------------

To carry out an action, type the corresponding letter on the command line and press Enter:

  • To see all active process templates, type l
  • To list the templates that are logically deleted, type f
  • To physically remove templates that are logically deleted, type r
  • To exit the tool, type x

Example: Removing process templates from the database

You can remove templates from the database only if you have you logically deleted them first. This example describes how to select a set of templates, logically delete them, and then remove them from the database.

  1. From the main menu, type l to list the active process templates.
    The list of templates is displayed and the following submenu is shown:

                MARK  NAME
    ---------------------------------
    0.( ) CreditRequest
    1.( ) GDCCreditRequest
    2.( ) GDCNestedBlockCR
    3.( ) Hotel booking
    ----------------------------------------------------
    | (r) --> Reduce list of active process templates |
    | (l) --> Show versions of selected templates |
    | (x) --> Exit |
    ----------------------------------------------------
    Your choice:

  2. To reduce the list of active templates, type r.

    You are prompted for a selection pattern. You can use '?' or '_' as wildcards for a single character and '*' or '%' as wildcards for multiple characters. You can mark a template for deletion by typing its number in the command line. After you have marked a template, an updated list similar to the following is shown:


                MARK  NAME
    ---------------------------------
    0.( ) CreditRequest
    1.( ) GDCCreditRequest
    2.( ) GDCNestedBlockCR
    3.(X) Hotel booking
    ----------------------------------------------------
    | (r) --> Reduce list of active process templates |
    | (l) --> Show versions of selected templates |
    | (x) --> Exit |
    ----------------------------------------------------
    Your choice:
  3. To list the versions of the marked templates, type l.

    Version means that the templates are differentiated by the VALID_FROM date. This date is either specified when the template is created or it is the date and time the template was imported into Runtime.

                MARK  NAME              VALID_FROM 
    ---------------------------------------------------
    0.( ) Hotel booking 2003-02-06 14:52:17.996
    1.( ) Hotel booking 2003-02-11 13:20:07.136
    2.( ) Hotel booking 2003-02-11 13:32:37.715

    ------------------------------------------------
    | (n) --> Select versions between two numbers |
    | (a) --> Select all versions |
    | (u) --> Unselect all versions |
    | (d) --> Delete selected versions of |
    | process templates |
    | (x) --> Exit |
    ------------------------------------------------
    Your choice:

    The version list shows all the versions of the process templates you selected in step 2.

  4. Select the versions to be deleted:
    • To select all the versions, type a.
    • To select versions between two sequence numbers, type n.
  5. Type d to logically delete the selected versions of the templates.
  6. Type x in this menu and in the following menu to return to the main menu.
  7. In the main menu, type f to list all the logically deleted templates:
                MARK  NAME
    ---------------------------------
    0.(X) Credit Request
    1.(X) Hotel booking
    ----------------------------------------------
    | (c) --> Remove deleted process templates |
    | (x) --> Exit |
    ----------------------------------------------
    Your choice:
  8. Type r to remove all the logically deleted process templates from the database.

    You will be prompted if some lists or queries use a specific template within a filter. If a query or a filter explicitly uses the global container of a template you will also be notified. These templates cannot be deleted until the query which uses the global container is changed. This also happens if you try to remove a template that has an active process instance.

You can also remove logically deleted templates without listing these templates first. You can do this directly from the main menu by typing r.

Trademark attributions and copyrights

© IBM Corporation 2003.
All rights reserved. 

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. IBM Web site pages may contain other proprietary notices and copyright information which should be observed. 

The following terms are trademarks of the IBM Corporation in the United States, other countries, or both: AIX, DB2 Universal Database, IBM, WebSphere. 

Special attributions

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Other company, product, and service names may be trademarks or service marks of others.

 

Subheadings
















 
Notices



 

     (Back to the top)