If you migrated your Business Process Choreographer
configuration from Version 7.0.0.2 or earlier, you can improve the
database performance by activating shared work items.
Any
new Business Process Choreographer configurations automatically support
shared work items.
About this task
Depending on how many work items you currently have in your
Business Process Choreographer database, and how many hours per day
you can run the work item migration script, this task might take several
days to complete.
Procedure
- Optional: Reduce the number of work items in
your system by completing one or more of the following steps:
- At a time when there is a low load on the
database, run the
migrateWI.py script to create shared
work items for existing work items.
- Decide on the maximum duration in minutes, duration,
that you want the script to run for.
- Change to the directory where the
migrateWI.py script
is located:

install_root/ProcessChoreographer/admin
install_root\ProcessChoreographer\admin
- Run the script by starting wsadmin with the following
parameters:
-conntype NONE
[-profileName profile]
[-tracefile trace_file]
-f migrateWI.py
-migrateToWISharing
[-duration duration]
[-slice slice_size]
-cluster clusterName
[[-dbUser userID] -dbPassword password]
[-dbSchema schema]
Note: You must run
the script on the node of a cluster member, and not on the deployment
manager. Because wsadmin overwrites its trace file, use the
-tracefile option
to specify a file name and location for the trace file for the work
item data migration. You do not need to stop the cluster. For more
information about using this script and its parameters, see
Business Process Choreographer data
migration script for shared work items.
- When the script finishes, it reports a summary of the
migration status of the work items that belong to each type of entity:
- The total number in the system.
- The number that were migrated.
- The number that still must be migrated.
- The percentage that are completed.
For example:
Entities Migrated Not migrated Completed
EventInstance 7602 7602 0 100%
WorkBasket 0 0 0 100%
TaskInstance 29883 29883 0 100%
EscalationInstance 4227 4227 0 100%
BusinessCategory 0 0 0 100%
ActivityInstance 52572 52572 0 100%
ProcessInstance 7602 3036 4566 39%
--------------------------------------------------------------
Total 101886 97320 4566 95%
-
If the script finished with less than 99% completed (that is, more than 1% of the total number
of entities and their corresponding work items in the system still need to be processed), repeat
step 2.
-
If the script finished with 99% or more completed, activate the shared work item support.
-
Stop the cluster where Business Process Choreographer is configured.
-
Now run the script a final time to process any remaining work items and switch into shared work
item mode, by starting
wsadmin with the following parameters:
-conntype NONE
[-profileName profile]
[-tracefile trace_file]
-f migrateWI.py
-setMode WS_SHARING_ACTIVE_MODE
-cluster clusterName
[[-dbUser userID] -dbPassword password]
[-dbSchema schema]
-
Success is indicated by the following message:
migrateWI.py finished with warnings.
In case of problems,
you might get a message similar to the following
one:
Exception received:
java.lang.IllegalStateException: Mode: WS_SHARING_ACTIVE_MODE
migrateWI.py finished, result = WARNING.
-
Restart the cluster.
Results
The Business Process Choreographer configuration is using
shared work items and has better performance for many database queries.
What to do next
Optionally, you can perform any of the following steps:
- Use the administrative console to change the default cleanup times
and retention periods for unused shared work items. You can change
these settings on the Runtime or Configuration tab
for the Human Task Manager.
- Delete unused staff query interfaces and unused work item patterns,
by running the cleanupUnusedStaffQueryInstances.py script.
- If you do not use any
queries that must run against the non-shared work items, you can free
up space in the database by customizing and running a copy of the dropClassicWIIndexes.sql script
to drop the indexes on the WORK_ITEM_T table.
- The script is in the following location.

install_root/BPM/dbscripts/database_type/Tuning
install_root/BPM/dbscripts/database_type/Tuning
- Make a copy of the script file dropClassicWIIndexes.sql.
- Edit your copy.
- Replace all occurrences of the string
@SCHEMA@ with
the name of your schema. If you use an implicit schema, you must delete
the string @SCHEMA@., including the trailing dot.
- If you are using a DB2® for z/OS® database, replace all occurrences of the string
@STOGRP@ with the name of your storage
group.
- If you are using an Oracle database, replace all occurrences
of the string
@INDEXTS@ with the name of the index
table space.
- Save your changes.
- Run your edited copy of the script. In your database client command
line processor, enter one of the following commands:
- For DB2:
db2 -tf
dropClassicWIIndexes.sql
- For Oracle:
sqlplus dbUserID/dbPassword@database_name
@dropClassicWIIndexes.sql
- For Microsoft SQL Server:
sqlcmd
-U dbUserID -P dbPassword -e -i dropClassicWIIndexes.sql
For more information about how to run scripts on your database,
see the product documentation for your database. If there are any
errors, or failure is indicated in your database client output, fix
the reported errors and repeat this step.