IBM BPM, V8.0.1, All platforms > Administer the IT infrastructure > Administer Business Process Choreographer > Use scripts to administer Business Process Choreographer

Querying and replaying failed messages, using administrative scripts

Use an administrative script to determine whether there are any failed messages for BPEL processes or human tasks, and, if there are, to retry processing them.

The following conditions must be met:

When a problem occurs while processing an internal message, this message ends up on the retention queue or hold queue. To determine whether any failed messages exist, and to send those messages to the internal queue again:


Procedure

  1. Change to the Business Process Choreographer subdirectory where the administrative script is located.
    cd  INSTALL_ROOT/ProcessChoreographer/admin

    cd INSTALL_ROOT/ProcessChoreographer/admin

    cd INSTALL_ROOT\ProcessChoreographer\admin

  2. Query the number of failed messages on both the retention and hold queues.
    INSTALL_ROOT/bin/wsadmin.sh  -f queryNumberOfFailedMessages.py
               [ ([-node  nodeName] -server  serverName) | (-cluster  clusterName) ]
               [ -bfm | -htm ]

    INSTALL_ROOT/bin/wsadmin.sh  -f queryNumberOfFailedMessages.py
               [ ([-node  nodeName] -server  serverName) | (-cluster  clusterName) ]
               [ -bfm | -htm ]

    INSTALL_ROOT\bin\wsadmin -f queryNumberOfFailedMessages.py
               [ ([-node  nodeName] -server  serverName) | (-cluster  clusterName) ]
               [ -bfm | -htm ]

    Where:

    -node nodeName

    The name of the node where Business Process Choreographer is configured. This is optional when specifying the server name. The default is the local node.

    -server serverName

    The name of the server where Business Process Choreographer is configured. This is required if a cluster is not specified.

    -cluster clusterName

    The name of the cluster where Business Process Choreographer is configured. This is required if Business Process Choreographer is configured on a cluster.

    -bfm | -htm

    These keywords are optional and mutually exclusive. The default, if neither option is specified is to replay failed messages for both BPEL processes and human tasks. If you only want to replay the messages for BPEL processes, specify the -bfm option. If you only want to replay messages for human tasks, specify the -htm option.

    If you want to check for a server on the local node, enter:

    wsadmin -f queryNumberOfFailedMessages.py -server  serverName
  3. Replay all failed messages on the hold queue, retention queue, or both queues.
    INSTALL_ROOT/bin/wsadmin.sh  -f replayFailedMessages.py
           (([-node nodeName] -server server_name) | (-cluster cluster_name))
           -queue  replayQueue
           [ -bfm | -htm ]
       

    INSTALL_ROOT/bin/wsadmin.sh  -f replayFailedMessages.py
           (([-node nodeName] -server server_name) | (-cluster cluster_name))
           -queue  replayQueue
           [ -bfm | -htm ]
       

    INSTALL_ROOT\bin\wsadmin -f replayFailedMessages.py
           (([-node nodeName] -server server_name) | (-cluster cluster_name))
           -queue  replayQueue
           [ -bfm | -htm ]

    Where:

    -queue replayQueue

    Optionally specifies the queue to replay. replayQueue can have one of the following values:

    • holdQueue (this is the default value)
    • retentionQueue (only valid when the -bfm option is specified)
    • both (not valid when the -htm option is specified)

    -node nodeName

    The name of the node where Business Process Choreographer is configured. This is optional when specifying the server name. The default is the local node.

    -server serverName

    The name of the server where Business Process Choreographer is configured. This is required if a cluster is not specified.

    -bfm | -htm

    These keywords are optional and mutually exclusive. The default, if neither option is specified is to replay failed messages for both BPEL processes and human tasks. If you only want to replay the messages for BPEL processes, specify the -bfm option. If you only want to replay messages for human tasks, specify the -htm option.

Use scripts to administer Business Process Choreographer


Related concepts:
Recovery from infrastructure failures


Related tasks:
Querying and replaying failed messages, using the administrative console


Related information:
Manage failed events