SYS.DataCheck.Workflow
persistent class SYS.DataCheck.Workflow extends %Library.Persistent
SQL Table Name: SYS_DataCheck.Workflow
Workflow to be performed by running system. See System for overview. An instance of this class is referenced by each Destination object.
The workflow is a numbered list of phases. Each phase is an object of one of the following classes:
PhaseCheck, PhaseRecheckDiscrepancies, PhaseStop, or
PhaseIdle.
Each phase object represents a set of actions that the system will take and includes properties to act as the functional parameters of the phase (as well as internal properties to manage internal state). When the Workflow object is created as part of the creation of a new DataCheck Destination object, it is set up with a default set of phases: 1 - Check, 2 - ReCheckDiscrepancies (with 10 iterations), and 3 - Stop.
The system proceeds through the phases in numerical order and on completion of the last phase, begins the fist phase anew. The Workflow object can be modified at any time while the system is running, and can be used to force the system to move to a new phase, or redefine the list of phases.
If DataCheck stops in the middle of processing (e.g. in the Check or RecheckDiscrepancy phase) there are options upon starting again to restart from phase #1 of the workflow anew rather than resume processing the current phase. The first phase, therefore, should be set up to be the logical beginning of the workflow. The options to restart from phase #1 take three forms: the Timeout property in this object, an argument to the Start method of the Destination object, and interactive dialog for starting in ^DATACHECK.
As an example, the following code snippet changes the workflow back to the default
set of phases and sets the system to immediately go back to the first phase:
set workflow=##class(SYS.DataCheck.Workflow).%OpenId(name)
set sc=workflow.Phases.Clear() quit:$$$ISERR(sc) sc
set p=##class(SYS.DataCheck.PhaseCheck).%New()
set sc=workflow.Phases.Insert(p) quit:$$$ISERR(sc) sc
set p=##class(SYS.DataCheck.PhaseRecheckDiscrepancies).%New()
set p.Iterations=10
set sc=workflow.Phases.Insert(p) quit:$$$ISERR(sc) sc
set p=##class(SYS.DataCheck.PhaseStop).%New()
set sc=workflow.Phases.Insert(p) quit:$$$ISERR(sc) sc
set workflow.NewPhaseNumber=1 ; start at phase 1
set workflow.AbortCurrentPhase=1 ; stop working on the current phase
set sc=workflow.%Save()
quit sc
Property Inventory
Properties
This property is the time, in seconds, within which DataCheck may resume a partially completed workflow phase. If this timeout is exceeded, it will restart from phase number one. A value of zero will always resume, never restart.
Default is five days (432000), on the assumption that a large amount of data is checked by this DataCheck configuration and the check may take a day or more to complete. A smaller value may be desired for configurations that complete a check in a shorter amount of time.
Indexes
Inherited Members
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
Storage
Storage Model: Storage (SYS.DataCheck.Workflow)
^SYS.DataCheck.WorkflowD(ID) |
= | %%CLASSNAME
Phases
NewPhaseNumber
AbortCurrentPhase
Version
Timeout
|