# TaskRuntimeMBean

Overview | Related MBeans | Attributes | Operations

## Overview

Exposes monitoring information about an ongoing and potentially long-running administrative process. This should be taken to mean, at minimum, any OA&M operation involving I/O. Examples include starting and stopping servers, deploying and undeploying applications, or migrating services.

An MBean operation of this sort should fork a separate thread to perform the actual work and immediately return an instance of TaskRuntimeMBean to the caller. The caller can then use this to track the task's progress as desired. Users can also query for all instances of TaskRuntimeMBean to get a summary of both currently-running and recently-completed tasks.

Instance of TaskRuntimeMBean continue to exist in the MBeanServer after the completion of the work they describe. They will eventually either be explicitly deregistered by the user, or removed by a scavenger process which periodically purges TaskRuntimeMBeans that have been completed for some time.

Fully Qualified Interface Name | If you use the `getMBeanInfo` operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name: `weblogic.management.runtime.TaskRuntimeMBean`
Factory Methods | No factory methods. Instances of this MBean are created automatically.
Access Points | You can access this MBean from the following MBean attributes:
JDBCDataSourceTaskRuntimeMBean.SubTasks JDBCDataSourceTaskRuntimeMBean.ParentTask ServerLifeCycleTaskRuntimeMBean.SubTasks ServerLifeCycleTaskRuntimeMBean.ParentTask TaskRuntimeMBean.SubTasks | TaskRuntimeMBean.ParentTask WLDFImageCreationTaskRuntimeMBean.SubTasks WLDFImageCreationTaskRuntimeMBean.ParentTask
Deprecated Factory Methods and Access Points |
DeploymentTaskRuntimeMBean.ParentTask DeploymentTaskRuntimeMBean.SubTasks |

## Related MBeans

This section describes attributes that provide access to other MBeans. For more information about the MBean hierarchy, refer to WebLogic Server MBean Data Model.

SubTasks |

### SubTasks

An array of `TaskRuntimeMBeans` that describes a set of parallel tasks which are components of this task.

A value of `null` indicates that this task has no subtasks.

A simple example of a task with subtasks would be one which monitors a user's request to start a cluster; that task should return a set of subtasks indicating the individual server-startup processes which compose the overall cluster-startup task.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | TaskRuntimeMBean[]
Relationship type: | Containment.

## Attributes

This section describes the following attributes:

BeginTime Description EndTime Error Name Parent | ParentTask Running Status SystemTask Type

### BeginTime

The time at which this task was started.

Privileges | Read only
Type | long

### Description

A description of this task.

Privileges | Read only
Type | java.lang.String

### EndTime

The time at which this task was completed.

A value of `-1` indicates that the task is currently running.

Privileges | Read only
Type | long

### Error

Returns an exception describing the error, if any, that occurred while performing this task.

Privileges | Read only
Type | java.lang.Exception

### Name

The name of this configuration. WebLogic Server uses an MBean to implement and persist the configuration.

Privileges | Read only
Type | java.lang.String

### Parent

Return the immediate parent for this MBean

Privileges | Read/Write
Type |

### ParentTask

The task of which this task is a part.

A value of `null` indicates that this task is not a subtask.

For more information, see:

- getSubTasks

Privileges | Read only
Type |

### Running

Indicates whether the task is still running.

Privileges | Read only
Type | boolean

### Status

The status of this task.

Privileges | Read only
Type | java.lang.String

### SystemTask

Indicates whether this task was initiated by the server versus a user.

Privileges | Read only
Type | boolean

### Type

Returns the type of the MBean.

Privileges | Read only
Type | java.lang.String

## Operations

This section describes the following operations:

cancel |

### cancel

Attempts to cancel this task.

An exception is thrown to indicate failure to cancel the task. Not all tasks can be cancelled.

Operation Name | `"cancel"`
Parameters | `null`
Signature | `null`
Returns | `void`
Exceptions | `java.lang.Exception`