public class ExceptionTask extends ActionTask
Title: Service Event Fabric Core
Description: Defines an Exception Task that is triggered after an error occurred during execution of a regular task.
Copyright: Copyright (c) 2023
Company: StreamScape Technologies
AbstractTask.ListenerHelper
START_TASK_NAME, START_TASK_OID
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
addTag(java.lang.String tag)
Adds the specified tag.
|
void |
clearProperties()
Removes all properties.
|
void |
clearTags()
Removes all tags.
|
void |
disableResumptionOn(TaskState state)
Deselects the specified state as a 'resuming' state, disallowing to start execution of a next task
if the current task was not completed properly and moved to this 'bad' state.
|
void |
disableResumptionTotally()
Deselects any supported task state as a 'resuming' state, disallowing to start execution of a next task
if the current task was not completed properly and moved to this 'bad' state.
|
void |
enableResumptionOn(TaskState state)
Marks the specified state as a 'resuming' state, allowing to start execution of a next task
even if the current task was not completed properly and moved to this 'bad' state.
|
void |
enableResumptionTotally()
Marks each supported task state as a 'resuming' state, allowing to start execution of a next task
even if the current task was not completed properly and moved to this 'bad' state.
|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getAuthor()
Returns a name of the user that created this object.
|
java.util.Date |
getCreationTime()
Returns a timestamp indicating when the object was created.
|
java.lang.String |
getDescription()
Returns a description of the object.
|
java.util.Date |
getLastUpdateTime()
Returns a timestamp indicating when the object was updated last time.
|
java.lang.String |
getName()
Returns a name of the object.
|
java.util.UUID |
getOID()
Returns an unique identifier of the object.
|
Task |
getTriggerTask() |
java.util.UUID |
getTriggerTaskId() |
TaskType |
getType()
Returns a type of the task.
|
boolean |
isForTaskList() |
void |
putProperty(java.lang.String name,
java.lang.Object value)
Puts a new property with the specified name and value.
|
void |
removeProperty(java.lang.String name)
Removes the specified property.
|
void |
removeTag(java.lang.String tag)
Removes the specified tag.
|
void |
setDescription(java.lang.String description)
Sets the specified description of the object.
|
void |
setMetadata(java.lang.String metadata)
Sets the specified metadata of the object.
|
void |
setModel(java.lang.String model) |
void |
setName(java.lang.String name)
Sets the specified object name.
|
void |
setUndoLimit(int undoLimit) |
void |
setWeight(byte weight)
Sets the specified weight of the task.
|
void |
undo()
Resets the state of the current execution, forcing the task to retry its execution.
|
void |
undo(long delay)
Resets the state of the current execution, forcing the task to retry its execution after the specified delay (in seconds).
|
doSetUndoLimit, getModel, getScript, getTaskWindow, getUndoLimit, hasScript, isEncrypted, listEventIds, setEncrypted, setScript
doDisableResumptionOn, getAfterTaskName, getAfterTaskOID, getConsequent, getExceptionTask, getExecution, getOrder, getOwner, getPrecedent, getRuleSet, getState, getTaskList, getTaskWindowUnit, getWeight, isResumptionEnabledOn, isResumptionEnabledTotally, listResumptionStates, setAfterTask, toString
existsProperty, existsTag, getEndTimeMsec, getExpirationDate, getMetadata, getProperties, getProperty, getPropertyList, getPropertyResolved, isAutoComplete, listProperties, listTags, setTaskWindow, setTaskWindowUnit
clone, getSerialVersionUID
getClass, hashCode, notify, notifyAll, wait, wait, wait
getFullName, isAutoComplete, setTaskWindow, setTaskWindowUnit
existsProperty, existsTag, getEndTimeMsec, getExpirationDate, getMetadata, getProperties, getProperty, getPropertyList, getPropertyResolved, listTags
getAuthor, getCreationTime, getLastUpdateTime, getOID
getDescription, setDescription, setName
getName
public TaskType getType()
Task
getType
in interface Task
getType
in class ActionTask
public boolean isForTaskList()
public java.util.UUID getTriggerTaskId()
public Task getTriggerTask()
public void enableResumptionOn(TaskState state) throws SchedulerException
Task
enableResumptionOn
in interface ExecutableObject
enableResumptionOn
in interface Task
enableResumptionOn
in class AbstractExecutableObject
state
- the state to be marked as a resuming state.SchedulerException
- if the specified state is not supported as a resuming state or
if the operation is not supported.public void enableResumptionTotally() throws SchedulerException
Task
Task.enableResumptionOn(TaskState)
for further details.enableResumptionTotally
in interface ExecutableObject
enableResumptionTotally
in interface Task
enableResumptionTotally
in class AbstractExecutableObject
SchedulerException
- if the operation is not supported.public void disableResumptionOn(TaskState state) throws SchedulerException
Task
Task.enableResumptionOn(TaskState)
for further details.disableResumptionOn
in interface ExecutableObject
disableResumptionOn
in interface Task
disableResumptionOn
in class AbstractExecutableObject
SchedulerException
- if the specified state is not supported as a resuming state or
if the operation is not supported.public void disableResumptionTotally() throws SchedulerException
Task
Task.enableResumptionOn(TaskState)
for further details.disableResumptionTotally
in interface ExecutableObject
disableResumptionTotally
in interface Task
disableResumptionTotally
in class AbstractExecutableObject
SchedulerException
- if the operation is not supported.public void putProperty(java.lang.String name, java.lang.Object value) throws SchedulerException
ExecutableObject
The following value types are supported:
putProperty
in interface ExecutableObject
putProperty
in class AbstractExecutableObject
name
- the property name.value
- the property value.SchedulerException
- if the specified value has invalid type or
if the operation is not supported.public void removeProperty(java.lang.String name) throws SchedulerException
ExecutableObject
removeProperty
in interface ExecutableObject
removeProperty
in class AbstractExecutableObject
name
- the property name.SchedulerException
- if the operation is not supported.public void clearProperties() throws SchedulerException
ExecutableObject
clearProperties
in interface ExecutableObject
clearProperties
in class AbstractExecutableObject
SchedulerException
- if the operation is not supported.public void addTag(java.lang.String tag) throws SchedulerException
ExecutableObject
addTag
in interface ExecutableObject
addTag
in class AbstractExecutableObject
tag
- the specified tag.SchedulerException
- if the operation is not supported.public void removeTag(java.lang.String tag) throws SchedulerException
ExecutableObject
removeTag
in interface ExecutableObject
removeTag
in class AbstractExecutableObject
tag
- the specified tag.SchedulerException
- if the operation is not supported.public void clearTags() throws SchedulerException
ExecutableObject
clearTags
in interface ExecutableObject
clearTags
in class AbstractExecutableObject
SchedulerException
- if the operation is not supported.public void setWeight(byte weight) throws SchedulerException
Task
setWeight
in interface Task
setWeight
in class AbstractTask
weight
- the weight to be set.SchedulerException
- if the specified weight has a wrong value or
if the operation is not supported.public void setMetadata(java.lang.String metadata) throws SchedulerException
ExecutableObject
setMetadata
in interface ExecutableObject
setMetadata
in class AbstractExecutableObject
metadata
- the metadata to be set.SchedulerException
- if the operation is not supported.public void setUndoLimit(int undoLimit) throws SchedulerException
setUndoLimit
in class ActionTask
SchedulerException
public void setModel(java.lang.String model) throws SchedulerException
setModel
in class ActionTask
SchedulerException
public void undo() throws SchedulerException
Task
This method is only applicable to Action Task.
This method is only applicable if the task is currently running.
undo
in interface Task
undo
in class ActionTask
SchedulerException
- if the operation is not supported.public void undo(long delay) throws SchedulerException
Task
This method is only applicable to Action Task.
This method is only applicable if the task is currently running.
undo
in interface Task
undo
in class ActionTask
delay
- the delay (in seconds) before retrying the task.SchedulerException
- if the specified delay is a negative number or
if the task is not currently running or
if the operation is not supported.public java.util.UUID getOID()
SchedulerObject
getOID
in interface SchedulerObject
public java.lang.String getName()
NamedObject
getName
in interface NamedObject
public void setName(java.lang.String name) throws SchedulerException
DescribedNamedObject
setName
in interface DescribedNamedObject
name
- the name to be set.SchedulerException
- if the name has wrong format.public java.lang.String getDescription()
DescribedNamedObject
getDescription
in interface DescribedNamedObject
public void setDescription(java.lang.String description)
DescribedNamedObject
setDescription
in interface DescribedNamedObject
description
- the value to be set.public java.lang.String getAuthor()
SchedulerObject
getAuthor
in interface SchedulerObject
public java.util.Date getCreationTime()
SchedulerObject
getCreationTime
in interface SchedulerObject
public java.util.Date getLastUpdateTime()
SchedulerObject
getLastUpdateTime
in interface SchedulerObject
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.