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 SummaryNested classes/interfaces inherited from class simpleorm.dataset.SRecordInstanceSRecordInstance.BrokenOptimisticLockException
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final IntFieldstatic final StringFieldstatic final IdentityFieldstatic final BooleanFieldstatic final BooleanFieldstatic final RecordMeta<GatewayTaskRecord>static final EnumField<ScheduleMode>static final StringFieldstatic final StringFieldstatic final LongFieldstatic final StringFieldstatic final StringFieldstatic final StringFieldFields inherited from class com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecordDEFAULT_VALUE, FORM_META_KEY, INDEXED, UNIQUE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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()booleanisForced()Returns true if the user has hit the "run now" link on the page, forcing a scheduled task to run immediately.booleanReturns true if the this task is suspended, meaning that the scheduled task will not be executed at its schedule time.voidsetFailData(String failData) voidsetForced(boolean isForced) voidsetMode(ScheduleMode mode) voidvoidsetOwnerId(String value) voidsetParentId(Long parentId) Use when a GatewayTaskRecord is duplicated, and the duplicate is executed immediately.voidsetSchedule(String value) voidsetSuspended(boolean isSuspended) Set to true to suspend this task, meaning that the scheduled task will not be executed at its scheduled time.voidbooleanMethods inherited from class com.inductiveautomation.ignition.gateway.localdb.persistence.PersistentRecordgetBoolean, getDoubleObj, getIntObj, getLongObj, getString, installDefaultValuesMethods inherited from class simpleorm.dataset.SRecordInstanceallFields, 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- 
GatewayTaskRecordpublic GatewayTaskRecord()
 
- 
- 
Method Details- 
getMetaDescription copied from class:SRecordInstanceThis 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 metavariable is thus not Serialized, but it would not be anyway as it is usually static.- Specified by:
- getMetain class- PersistentRecord
 
- 
getId
- 
getType
- 
getName
- 
setName
- 
getOwnerId
- 
setOwnerId
- 
getTaskId
- 
setTaskId
- 
getMode
- 
setMode
- 
getScheduleThe 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
- 
getParentIdReturns 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.
- 
setParentIdUse 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.
- 
isForcedpublic boolean isForced()Returns true if the user has hit the "run now" link on the page, forcing a scheduled task to run immediately.
- 
setForcedpublic void setForced(boolean isForced) 
- 
isSuspendedpublic boolean isSuspended()Returns true if the this task is suspended, meaning that the scheduled task will not be executed at its schedule time.
- 
setSuspendedpublic 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
- 
taskInErrorStatepublic 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.
 
 
-