Configuration and Administration

Long Running Tasks

This page is accessed via Business Process Automation > Long Running Tasks.

Use this page to see all long-running tasks, whether active or completed. This aids in performance diagnoses and acts as a portal to more specific task information like Bulk Plan results.

Only users with view rights to a domain's task table can see it's tasks. You can click on the action, agent, agent action, process, or transmission that started the task. When you attempt to interrupt a task, it may not be interrupted, such as when it has already finished.

When viewing a long-running task, various buttons appear, depending on the type of task and its state:

  • Interrupt: Appears if the task is interruptible and the current state is MEDIATING, QUEUED or RUNNING.
  • Resubmit: Appears if the task is resubmittable, the system is configured for scalability, and the current state is MEDIATING, QUEUED or RUNNING. Resubmission can be used to interrupt a long-running task and queue it up for reprocessing on another server (or this server after restart).
  • View Log: Always appears This links to the log viewer request screen with the task's start time, machine and log process ID filled out.
  • View Process: Appears if the task is MEDIATING, QUEUED, RUNNING or INTERRUPTING. Note that all tasks in this state are marked as ABORTED on server restart, so these states reflect an active process. The button links you to the Open Process screen for the task process with the process tree expanded.

Long Running Task States

The following describe each state of a long-running task:

  • Not Started: The task process has not started. This state should only occur if an exception occurred before the action, agent, or topic process could be started.
  • Mediating: The task is waiting in the workflow mediator.
  • Queued: The task is waiting in an event queue.
  • Running: The task is executing. A task may remain running after its thread of execution completes if it spawns off other processes (e.g. a workflow agent).
  • Interrupting: The task has received an interruption request but has not yet responded to it.
  • Interrupted: The task successfully stopped execution after an interruption request.
  • Resubmitted: The task successfully stopped execution after an interruption request, and has been resubmitted to the Process Control or Integration In queue for future processing.
  • Completed: The task process completed. Note that this can occur after a task has received an interruption request, if the task completes before it can respond to the request. In addition, a completed task does not necessarily mean it completed successfully. It simply means the process is complete without interruption. e.g., a failed agent or transmission will still be marked as COMPLETED if the failure wasn't due to a ProcessInterruptedException.
  • Aborted: On startup, a server marks all previous long-running tasks assigned to it as ABORTED, if the task's current state is not INTERRUPTED, RESUBMITTED, COMPLETED or ABORTED. In this way, a user can quickly identify tasks that may need special handling as they were effectively killed.

Note: A task in an INTERRUPTING state may end up as INTERRUPTED or COMPLETED. If the task completes before it checks for interruption, it will be marked as COMPLETE. Only if it checks for interruption and exits early (typically via a ProcessInterruptedException) will it be marked as INTERRUPTED. This is important to avoid false negatives when viewing historical tasks.

Types of Long Running Tasks

A long-running task is defined on the action, agent, agent action, transmission, or process control topics.

Actions

For actions, a default is established by the glog.action.numObjectsForLongRunningTask property, which can be overridden by the Minimum Item Count field on the action itself.

An action is interruptible if the Interruption Support field on the Action is set to Interruptible. They cannot be resubmitted.

Automation Agents

Automation agents can be marked as long-running in the header of the Autmation Agent header screen. Note that all long-running agents are interruptible as the agent will check for interruption before the execution of each agent action.

Agents check for interruption prior to each agent action. They cannot be resubmitted.

Agent Actions

Agent actions may be defined by the system as long-running. You cannot change this setting. It is possible for both an agent and one or more of its actions to be tracked as long-running tasks. On the Long Running Task screen, both the parent agent process and the child agent action process appear as separate tasks.

An agent action is interruptible if the Interruption Support field on the agent action is set to Interruptible. They cannot be resubmitted.

Transmissions

A transmission is long-running if:

Every transmission is interruptible:

  • while the transmission is queued in an event queue; or
  • before the first transaction has begun running.

Every transmission polled from the Integration In queue is resubmittable:

  • while the transmission is in the mediator; or
  • while the transmission is queued in an event queue; or
  • before the first transaction has begun running

Process Control Topics

Process control topics  are displayed as long-running in the Process Action screen.

Every process action is interruptible:

  • while waiting in the mediator; or
  • while queued in an event queue; or
  • when Interruption Support on the Process Action is Interruptible or Resubmittable.

Every process action request via Process Control (i.e. has a Process Control History record) is resubmittable:

  • while waiting in the mediator; or
  • while queued in an event queue; or
  • when Interruption Support on the Process Action is Resubmittable.

Task Cleanup

You can configure the Long Running Task Cleanup in Process Management to remove records of old long running tasks. You might want to have this scheduled to run periodically to remove completed tasks.

Related Topics