Delete Workflow Processes Command Line Utility
The Delete Workflow Processes command line utility allows you to find and remove old or obsolete workflow processes from Windchill.
You can use this utility to search for processes and determine if they should be permanently removed. For example, you might have legacy processes that are closed and are no longer used.
This utility accepts the following flags. For example, to view help you can enter the following command:
windchill wt.workflow.utility.DeleteWfProcesses -help
-help
Use the -help flag to view the list of available options.
-writelog
Write the results to a log.
Use the -help flag to identify where the log file is saved.
-commit
Processes are not deleted until you use the -commit flag.
-user
-password
You might be required to provide credentials.
Running the Delete Workflow Processes Command Line Utility
Running the utility should be accomplished in two steps:
1. Search for and identify the processes to be deleted using the following command:
windchill wt.workflow.utility.DeleteWfProcesses -p "%<criteria>%"
where <criteria> is the attributes used to identify the workflow process to be deleted. Use the following command line options:
-p
Identify processes using a string in the process name.
For example, the following command displays all processes with “test” in the process name:
windchill wt.workflow.utility.DeleteWfProcesses -p "%test%"
-s
Search by process state.
-SD
The process start date (MM/DD/YYYY)
-ED
The process end date (MM/DD/YYYY)
-PT
Search by the name of the workflow process template.
-c
-o
Search by class name (-c) and object ID (-o).
These options must be used together.
2. If you are satisfied with the processes returned in the first step, you can permanently delete them using -commit:
windchill wt.workflow.utility.DeleteWfProcesses -p "%<criteria>%" -commit
* 
If no search criteria is specified, all processes are removed when the -commit option is used.
In some cases, you might want to delete all workflow processes associated with a particular business process, such as Windchill ESI. In the following example, all processes with “ESI” in the name and in the OPEN_RUNNING life cycle state are displayed:
windchill wt.workflow.utility.DeleteWfProcesses
-p %ESI% -s "OPEN_RUNNING"
After listing all processes with the example characteristics, they can be deleted using the following command:
windchill wt.workflow.utility.DeleteWfProcesses
-p %ESI% -s "OPEN_RUNNING" -commit
War dies hilfreich?