HS.HC.Util.Installer.Upgrade.BackgroundItem
persistent class HS.HC.Util.Installer.Upgrade.BackgroundItem extends %Library.Persistent
SQL Table Name: HS_HC_Util_Installer_Upgrade.BackgroundItem
Persistent class stored specifically in HSSYS. Allows classmethods to be run in the background during normal system operation. Useful for long-running conversions/re-indexing etc that can run while system is up. For upgrade steps simply using the AddItem() api method can be sufficient as the queued BackgroundItem will be run from the OnSystemStartup() code that gets called immediately after upgrade steps are finished. For ClassMethods that are intended to be called as BackgroundItems ensure their first and only argument is like 'ClassMethod SomeConversion(ByRef pBackgroundItem As HS.HC.Util.Installer.Upgrade.BackgroundItem)' This pattern is intended to allow the method invoked by the BackgroundItem to make use of it's 'State' property to keep track of where it is, in case it needs to be resumed after interruption and you want it to pick up where it left off.Property Inventory
Method Inventory
Parameters
parameter DOMAIN = HS;
Properties
property ClassName as %String [ Required ];
Property methods: ClassNameDisplayToLogical(), ClassNameGet(), ClassNameGetStored(), ClassNameIsValid(), ClassNameLogicalToDisplay(), ClassNameLogicalToOdbc(), ClassNameNormalize(), ClassNameSet()
property MethodName as %String [ Required ];
Property methods: MethodNameDisplayToLogical(), MethodNameGet(), MethodNameGetStored(), MethodNameIsValid(), MethodNameLogicalToDisplay(), MethodNameLogicalToOdbc(), MethodNameNormalize(), MethodNameSet()
property Namespace as %String [ Required ];
Property methods: NamespaceDisplayToLogical(), NamespaceGet(), NamespaceGetStored(), NamespaceIsValid(), NamespaceLogicalToDisplay(), NamespaceLogicalToOdbc(), NamespaceNormalize(), NamespaceSet()
property Started as %Boolean [ InitialExpression = 0 ];
Property methods: StartedDisplayToLogical(), StartedGet(), StartedGetStored(), StartedIsValid(), StartedLogicalToDisplay(), StartedNormalize(), StartedSet()
property State as %DynamicObject;
Property methods: StateGet(), StateGetObject(), StateGetObjectId(), StateGetStored(), StateGetSwizzled(), StateIsValid(), StateNewObject(), StateSet(), StateSetObject(), StateSetObjectId(), StateUnSwizzle()
Methods
classmethod AddItem(pNamespace As %String, pClass As %String, pMethod As %String, ByRef pAdded As %Boolean = 0, pState As %DynamicObject = {{}}) as HS.HC.Util.Installer.Upgrade.BackgroundItem
@API Method to add a Background Job item
Attempts to get a lock on the object and returns it to the caller if successful
Added BackgroundItems() will be run next system startup via RunAll() in FIFO order
final classmethod IsLIB(pClassName As %String, pNamespace As %String, ByRef pStatus As %Status) as %Boolean
Checks if pClassName is defined in a HealthShare library database
@API Method to remove a Background Job item
classmethod RunAll()
@API Iterates over all Background Job items in the table and runs them in FIFO order.
Indexes
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (ItemIndex on Namespace,ClassName,MethodName) [Unique];
Index methods: ItemIndexCheck(), ItemIndexCheckUnique(), ItemIndexDelete(), ItemIndexExists(), ItemIndexOpen(), ItemIndexSQLCheckUnique(), ItemIndexSQLExists(), ItemIndexSQLFindPKeyByConstraint(), ItemIndexSQLFindRowIDByConstraint()
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()
- %InitExtentData()
- %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 (HS.HC.Util.Installer.Upgrade.BackgroundItem)
^["HSSYS"]HS.Upgrade.BackgroundItemD(ID) |
= | %%CLASSNAME
Namespace
ClassName
MethodName
Started
|
Storage Model: Storage (HS.HC.Util.Installer.Upgrade.BackgroundItem)
^["HSSYS"]HS.Upgrade.BackgroundItemD(ID,"State") |
= | State |