Skip to main content

HSMOD.REST.Async.API

class HSMOD.REST.Async.API

API class that contains methods to trigger background jobs and to obtain status of existing jobs.

Method Inventory

Methods

classmethod DeleteJobRecordKey(pKey As %String)
Deletes an instance of HSMOD.REST.Async.JobRecord that is uniquely referenced by pKey. @API.Method
@Argument pKey Unique reference to an instance of HSMOD.REST.Async.JobRecord.
classmethod DeleteOldJobs(pTargetClass As %Dictionary.Classname, pTargetMethod As %Dictionary.Identifier, pAgeInSeconds As %Integer)
Deletes old jobs for a specified target class and method, based on age in seconds.
@API.Method
@Argument pTargetClass Class name originally passed to RunInBackgroundAndReturnJobKey().
@Argument pTargetMethod Method name originally passed to RunInBackgroundAndReturnJobKey().
@Argument pAgeInSeconds Age, in seconds, beyond which we will delete the job on the basis of being expired.
classmethod GetJobRecordFromKey(pKey As %String) as HSMOD.REST.Async.JobRecord
Returns an instance of HSMOD.REST.Async.JobRecord that is uniquely referenced by pKey. Returns a null oref if no object found.
@API.Method
@Argument pKey Unique reference to an instance of HSMOD.REST.Async.JobRecord.
classmethod GetJobRecords(pSearchCriteria As %Library.DynamicObject) as %Library.ListOfObjects
Returns all available instances of HSMOD.REST.Async.JobRecord based on the provided search criteria.
@Argument pSearchCriteria Key-value pairs of search criteria.
classmethod RunInBackgroundAndReturnJobKey(pClassname As %Dictionary.CacheClassname, pMethodName As %Dictionary.CacheIdentifier, pArguments...) as %String
Runs pMethodName from class pClassname in the background. Records job informations in a persistance object (an instance of HSMOD.REST.Async.JobRecord).
Returns the key to use to access the job information.
Job information can be accessed by calling GetJobRecordFromKey(), passing the key in as a parameter.
Throws errors.
@API.Method
@Argument pClassname Class that contains method to run in background.
@Argument pMethodName Method to run in background.
@Argument pArguments... Arguments to pass to method.

Subclasses

FeedbackOpens in a new tab