Updating the Process Portal index
In IBM® Business Process Manager (BPM) V8.5 or later versions, changes made in IBM Process Designer to a team name in a process application might not get updated in the Process Portal index. Therefore, if you upgraded from IBM BPM V8.5 or later, it is recommended that you rebuild the index by using the processIndexFullReindex command described in the following section.
Additionally, on IBM Process Center, if you rename a team in the tip for a process application and process instances that were created with the old team name, you must rebuild the index to update the team name for the tasks for those instances. Rebuilding the index, in this case, is required for both IBM BPM upgrades and new installations.
Index administration
In a network deployment environment, all cluster members on the same node share the index by default. Run the commands for updating the index on the deployment manager. To specify where the command runs, include the -host host_name parameter of the node and the -port SOAP_port parameter of an application cluster member. Repeat the command for each node in the cluster. The default values for these parameters are -host localhost -port 8880.
Rebuilding the index
After a migration or upgrade from an earlier release of IBM BPM, the index is automatically rebuilt on server restart. In addition, if problems occur with the index or searches in Process Portal, you can manually rebuild the index.

processIndexFullReindex.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port


processIndexFullReindex.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port
The
command deletes the existing index and creates a new index. You can monitor the progress of both the
automatic and manual index rebuilds by checking the SystemOut.log file for the
CWLLG0764I and CWLLG0765I messages. These messages identify the
start and completion of the index rebuild. While the index is being rebuilt, the search facility in Process Portal is unavailable. Queries against the Process Portal index do not return any data, for example, when Process Portal users search against the Work task list, and on the Processes, Process Performance, and Team Performance dashboards.
Freeing up space in the index by removing deleted tasks and instances

processIndexRemoveDeleted.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port


processIndexRemoveDeleted.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port
Updating the index for a specific instance or task
If you do not change the default configuration settings in the 100Custom.xml file, the index is updated every 10 seconds. However, you can also trigger updates to the index when a specific instance or task is updated, for example, if you doubt the correctness of the search index record for a specific instance or task.
- For instances
processIndexUpdateInstance.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port instanceID
processIndexUpdateInstance.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port instanceID
- For tasks
taskIndexUpdate.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID
taskIndexUpdate.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID
Deleting a specific instance or task
- For instances
processIndexDeleteInstance.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port instanceID
processIndexDeleteInstance.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port instanceID
- For tasks
taskIndexDeleteTask.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID
taskIndexDeleteTask.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID

Cleaning up index tables
The BPM_TASK_INDEX and BPM_INSTANCE_INDEX database tables, which track indexes, contain rows that reflect the data in LSW_TASK and LSW_BPD_INSTANCE database tables. When you clean up operational data from these tables, the deleted rows are updated in the index tracking tables but not deleted. In some cases, your database tables can grow very large because they mostly store data that has already been deleted from the operational data tables and thus is no longer needed. In these cases, the large number of rows causes high CPU usage when the database locks the tables to complete the indexing process. Such high CPU usage causes overall slowness of Process Portal and out-of-sync issues of the search index.
To avoid such issues, you can clean up the BPM_TASK_INDEX and BPM_INSTANCE_INDEX tables by running one of the following commands on the command line. The command first verifies the total number of distinct indexes in your IBM BPM cluster, then purges all the rows from BPM_TASK_INDEX_JOB that are older than 7 days. For more information about determining the number of distinct indexes, see Configuring the Process Portal index.

indexTablesCleanup.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port -numIndexes num_indexes -maxDurationMinutes max_duration_in_minutes -taskIndexTableDeleteBatchSize task_index_table_delete_batch_size -instanceIndexTableDeleteBatchSize instance_index_table_delete_batch_size


indexTablesCleanup.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port -numIndexes num_indexes -maxDurationMinutes max_duration_in_minutes -taskIndexTableDeleteBatchSize task_index_table_delete_batch_size -instanceIndexTableDeleteBatchSize instance_index_table_delete_batch_size
- -numIndexes
- This parameter is mandatory and represents the number of Process Portal indexes for your IBM BPM database. This number is generally equals to the number of nodes in your IBM BPM cluster, unless you are using a shared file system to share indexes between nodes. This number should also count shut-down indexes.
- -maxDurationMinutes
- This parameter is optional and indicates how long, in minutes, this command will run. If you do not specify this parameter, the command runs until it finishes or encounters an error.
- -taskIndexTableDeleteBatchSize
- This parameter is optional and indicates the commit size of the database for the deletion of the BPM_TASK_INDEX table. By default, this size is set to 1000 rows.
- -instanceIndexTableDeleteBatchSize
- This parameter is optional and indicates the commit size of the database for the deletion of the BPM_INSTANCE_INDEX table. By default, this size is set to 1000 rows.