Updating the Process Portal index

If a problem occurs with the Process Portal index, you might need to run a command to rebuild it. You can also update the index for an instance or task, remove an instance or task from the index, or clean up the index tables.

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.

Important: The following information applies to both Heritage Process Portal (deprecated) and Process Portal.

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.

To manually rebuild the index, enter one of the following commands on the command line:For Windows operating system
processIndexFullReindex.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port
For Linux operating systemFor UNIX operating system
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.

Attention: For compatibility with previous releases of Process Portal, the taskIndexFullReindex command is still available. However, this command produces the same result as the processIndexFullReindex command.

Freeing up space in the index by removing deleted tasks and instances

When tasks and instances are deleted from the database, they are also automatically deleted from the index. However, you can manually delete tasks and instances from the index that were previously deleted from the database. To remove the deleted tasks and instances from the index, enter one of the following commands on the command line:For Windows operating system
processIndexRemoveDeleted.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port
For Linux operating systemFor UNIX operating system
processIndexRemoveDeleted.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port
Attention: For compatibility with previous releases of Process Portal, the taskIndexRemoveDeletedTasks command is still available. However, this command produces the same result as the processIndexRemoveDeleted command.

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.

You can update the index by entering one of the following commands on the command line.
For instances
For Windows operating system
processIndexUpdateInstance.bat -user DeAdmin_user -password DeAdmin_user  -host host_name -port SOAP_port instanceID
For Linux operating systemFor UNIX operating system
processIndexUpdateInstance.sh -user DeAdmin_user -password DeAdmin_user  -host host_name -port SOAP_port instanceID
For tasks
For Windows operating system
taskIndexUpdate.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID
For Linux operating systemFor UNIX operating system
taskIndexUpdate.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID
The index is updated for the specified instance or task, regardless of its state. For example, if the specified task is in the completed state and the value for the <task-index-update-completed-tasks> element in the 100Custom.xml file is set to false, the index is still updated for the task.

Deleting a specific instance or task

To delete a specific instance or task from the index, enter one of the following commands on the command line.
For instances
For Windows operating system
processIndexDeleteInstance.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port instanceID
For Linux operating systemFor UNIX operating system
processIndexDeleteInstance.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port instanceID
For tasks
For Windows operating system
taskIndexDeleteTask.bat -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID
For Linux operating systemFor UNIX operating system
taskIndexDeleteTask.sh -user DeAdmin_user -password DeAdmin_user -host host_name -port SOAP_port taskID
IBM BPM version 8.6.0 cumulative fix 2018.03

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.

For Windows operating system
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
For Linux operating systemFor UNIX operating system
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
Specify the parameters as follows.
-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.