BPMReplayOnHoldEMTasks command

This command resumes Event Manager tasks that are on hold so that they can be scheduled by the Event Manager again.

The Event Manager schedules and drives the execution of work in the Process Server and Process Center. The work includes invocation of undercover agents (UCAs), execution of Business Process Definitions (BPDs), invocation of BPD system task implementations, and invocation of BPD timer events. The scheduling and driving of the work is accomplished with Event Manager tasks. When an exception occurs, such as a queue-full condition of the monitor event queue, re-execution of the tasks starts, which attempts to overcome the exception. The re-execute-limit property that is specified in the Event Manager configuration settings determines the number of times to try again (set to 5 by default). After that limit is reached for an Event Manager task, it is not tried again. To prevent a situation where reaching the limit result in a BPD instance that is not continuing its navigation anymore, and it stops responding, Event Manager tasks that fail and reach the re-execute-limit are put on hold. The tasks are retained in the database, but they are flagged to be on hold and rescheduled to be run in the future when the BPMReplayOnHoldEMTasks command is run.

For example, when monitoring is enabled and the Process Server produces more monitor events than can be processed fast enough, the queue fills up and results in a queue full condition. The BPD transactions that attempt to emit the monitor events fail and are rolled back. Respective Event Manager tasks are tried again until reaching the re-execute-limit of the Event Manager. Event Manager tasks that were tried until reaching the re-execute-limit can be resumed with the BPMReplayOnHoldEMTasks command.

When a work item has reached the maximum retry execution or the queue is full, the items will be listed in the Event Manager console page and marked with a scheduled execution date of 2099-02-01. Because of localization, the date might also appear as 1/2/99.

The BPMReplayOnHoldEMTasks command is run using the AdminTask object of the wsadmin scripting client.

Prerequisites

The following conditions must be met:
  • Run the command in the connected mode, that is, do not use the wsadmin -conntype none option.
  • You must be a user in the DeAdmin role.
  • In a network deployment environment, you must run this command on the node that contains the application cluster member that handles the Process Server or Process Center applications. Do not run this command from the deployment manager profile.
  • You can run the command from any cluster member in a network deployment environment. However, you must first establish the wsadmin session to the SOAP port of the cluster member from where you are running the command.

Location

Start the command from the profile_root/bin directory of the application cluster member to which you want to connect. The application cluster can be on a Process Center or a Process Server node.

Logs created during processing of the command are in the SystemOut.log file of the cluster member that you connected to.

Syntax

BPMReplayOnHoldEMTasks
[-getNumberOfTasks true|false]
[-maxNumberOfTasksToReplay number_of_replays]
[-bpdInstanceId instance_id]

You can specify only one of the optional parameters each time you run the command.

Parameters

-getNumberOfTasks true|false
An optional parameter that retrieves the number of Event Manager tasks that are on hold. Set this parameter to true if you want the BPMReplayOnHoldEMTasks command to retrieve the number of Event Manager tasks available for replay. If you specify this parameter, you cannot specify any other parameters.
-maxNumberOfTasksToReplay number_of_replays
An optional parameter that replays on-hold Event Manager tasks, up to a maximum number specified. Use this parameter to set an upper limit for the number of on-hold Event Manager tasks to be replayed. If you specify this parameter, you cannot specify any other parameters.
-bpdInstanceId instance_id
An optional parameter that replays on-hold Event Manager tasks for the BPD instance that is specified. Specifies for which BPD instance the on-hold Event Manager tasks are replayed. If you specify this parameter, you cannot specify any other parameters.

Example

The following example illustrates how to query the number of available on-hold Event Manager tasks in the system:
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython

wsadmin>AdminTask.BPMReplayOnHoldEMTasks ('[-getNumberOfTasks true]')

Example of output:

'The BPMReplayOnHoldEMTasks command found 20 on hold Event Manager Task(s) ready for replay.'

The following example illustrates how to replay 13 on-hold Event Manager tasks:
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython

wsadmin>AdminTask.BPMReplayOnHoldEMTasks ('[-maxNumberOfTasksToReplay 13]')

Example of output:

'The BPMReplayOnHoldEMTasks command replayed 13 on hold Event Manager Task(s).'

The following example illustrates how to replay on-hold Event Manager tasks for BPD instance 49:
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython

wsadmin>AdminTask.BPMReplayOnHoldEMTasks ('[-bpdInstanceId 49]')

Example of output:

'The BPMReplayOnHoldEMTasks command replayed 1 on hold Event Manager Task(s).'

The following example illustrates how to replay all on-hold Event Manager tasks:
wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython

wsadmin>AdminTask.BPMReplayOnHoldEMTasks();

Example of output:

'The BPMReplayOnHoldEMTasks command replayed 20 on hold Event Manager Task(s).'