Class GatewayTaskRecord
java.lang.Object
simpleorm.dataset.SRecordInstance
com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecord
com.inductiveautomation.ignition.gateway.tasks.GatewayTaskRecord
- All Implemented Interfaces:
Serializable
This record holds the definition of a task. A task might be scheduled for a single execution, or might execute
repeatedly.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class simpleorm.dataset.SRecordInstance
SRecordInstance.BrokenOptimisticLockException
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntField
static final StringField
static final IdentityField
static final BooleanField
static final BooleanField
static final RecordMeta<GatewayTaskRecord>
static final EnumField<ScheduleMode>
static final StringField
static final StringField
static final LongField
static final StringField
static final StringField
static final StringField
Fields inherited from class com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecord
DEFAULT_VALUE, FORM_META_KEY, INDEXED, UNIQUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()
getMeta()
This must be defined in every user record's definition to access the SRecord which provides the meta data for this instance.getMode()
getName()
Returns null if this record does not have a parent id.The meaning of this string is relative to the mode.getType()
boolean
isForced()
Returns true if the user has hit the "run now" link on the page, forcing a scheduled task to run immediately.boolean
Returns true if the this task is suspended, meaning that the scheduled task will not be executed at its schedule time.void
setFailData
(String failData) void
setForced
(boolean isForced) void
setMode
(ScheduleMode mode) void
void
setOwnerId
(String value) void
setParentId
(Long parentId) Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately.void
setSchedule
(String value) void
setSuspended
(boolean isSuspended) Set to true to suspend this task, meaning that the scheduled task will not be executed at its scheduled time.void
boolean
Methods inherited from class com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecord
getBoolean, getDoubleObj, getIntObj, getLongObj, getString, installDefaultValues
Methods inherited from class simpleorm.dataset.SRecordInstance
allFields, assertNewRow, assertNotNewRow, defineInitialValue, deleteRecord, doQueryRecord, doValidateRecord, equals, findReference, findReference, findReference, findReference, getBigDecimal, getBytes, getDataSet, getDate, getDouble, getEnum, getInitialValue, getInt, getLogger, getLong, getObject, getRawArrayValue, getReferenceNoQuery, getTime, getTimestamp, hashCode, isAttached, isDeleted, isDirty, isDirty, isEmpty, isNewRow, isNotDestroyed, isNull, isReadOnly, isValid, onQueryRecord, onValidateField, onValidateRecord, setBigDecimal, setBoolean, setBytes, setDate, setDirty, setDouble, setEmpty, setEnum, setInt, setLong, setNewRow, setNull, setObject, setObject, setRawArrayValue, setReadOnly, setReference, setString, setTime, setTimestamp, toString, validatePrimaryKeys, wasInCache
-
Field Details
-
META
-
ID
-
NAME
-
Type
-
OWNERID
-
TASKID
-
IS_FORCED
-
IS_SUSPENDED
-
MODE
-
SCHEDULE
-
PARENT_ID
-
FailData
-
AttemptCount
-
-
Constructor Details
-
GatewayTaskRecord
public GatewayTaskRecord()
-
-
Method Details
-
getMeta
Description copied from class:SRecordInstance
This must be defined in every user record's definition to access the SRecord which provides the meta data for this instance. It is normally defined as:-SRecord getMeta() { return meta; };
The actual
meta
variable is thus not Serialized, but it would not be anyway as it is usually static.- Specified by:
getMeta
in classPersistentRecord
-
getId
-
getType
-
getName
-
setName
-
getOwnerId
-
setOwnerId
-
getTaskId
-
setTaskId
-
getMode
-
setMode
-
getSchedule
The meaning of this string is relative to the mode. If mode=single, it is a date. If mode=repeat, it is a chron string. * -
setSchedule
-
getParentId
Returns null if this record does not have a parent id. Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately. Modules can use this field to look up the original id in case they have their own records tied to the original record. -
setParentId
Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately. Modules can use this field to look up the original id in case they have their own records tied to the original record. -
isForced
public boolean isForced()Returns true if the user has hit the "run now" link on the page, forcing a scheduled task to run immediately. -
setForced
public void setForced(boolean isForced) -
isSuspended
public boolean isSuspended()Returns true if the this task is suspended, meaning that the scheduled task will not be executed at its schedule time. -
setSuspended
public void setSuspended(boolean isSuspended) Set to true to suspend this task, meaning that the scheduled task will not be executed at its scheduled time. -
getFailData
-
setFailData
-
taskInErrorState
public boolean taskInErrorState()- Returns:
- true if the task has previously run and failed. Error state means that there is something in the FailData field, indicating which items failed during a previous run.
-