Qorus Integration Engine® Enterprise Edition 6.0.25_prod
|
main common Qorus API class More...
Static Public Member Methods | |
static *hash< auto > | getUserServiceInfo (string name) |
returns information about the given user service (if it's currently loaded) More... | |
static SqlUtil::AbstractTable | getSqlTable (string datasource, string table_name, bool register_dependency=True) |
get a cached table object (suitable for DML) if present, otherwise it creates one from scratch More... | |
static SqlUtil::AbstractTable | getSqlTable (AbstractDatasource datasource, string table_name, bool register_dependency=True) |
get a cached table object (suitable for DML) if present, otherwise it creates one from scratch More... | |
static hash< auto > | getSqlCacheInfo () |
get information about cached object More... | |
static | clearSqlTableCache (string datasource, *string table_name) |
clears all objects for given datasource from the cache (for example, if database objects have been updated in the dataserver) More... | |
static | clearSqlTableCache (AbstractDatasource datasource, *string table_name) |
clears cached objects for given datasource (for example, if database objects have been updated in the dataserver) More... | |
static auto | getValueMap (string mapname, string key) |
Gets a lookup value from the value map by a key; the value map must be registered to the current interface. More... | |
static list< auto > | getValueMaps () |
Gets all value maps valid for the current interface. More... | |
static bool | postSlaEventSuccess (string sla, number value) |
posts a successful SLA event for SLA monitoring and performance tracking More... | |
static bool | postSlaEventError (string sla, number value, string err, string desc) |
posts an unsuccessful SLA event for SLA monitoring and performance tracking More... | |
static | flushSlaEvents () |
flushes all pending SLA events to disk and returns after the data has been committed More... | |
static *hash< auto > | getSystemServiceInfo (string name) |
returns information about the given system service (if it's currently loaded) More... | |
static *hash< auto > | getServiceInfo (string type, string name) |
returns information about the given service (if it's currently loaded) More... | |
static list | getRunningWorkflowList (*string name, *string ver) |
returns a list of hashes giving information about the currently-running workflow execution instances More... | |
static hash | getRunningWorkflowInfo (softint id) |
returns a hash of the workflow execution instance info if the ID is valid or an empty hash if not More... | |
static softint | createOrder (string name, *string version, hash< auto > params, string status=StatReady) |
creates a workflow order data instance in the database More... | |
static softint | createRemoteOrder (string remote, string name, *string version, hash< auto > params, string status=StatReady, bool register_dependency=True) |
creates a workflow order data instance in a remote Qorus instance More... | |
static hash< auto > | execSynchronousWorkflow (string name, *string version, hash< auto > sdata, *hash< auto > opts, *hash< auto > ddata, softint priority=DefaultOrderPriority, *hash< auto > orderkeys, *softstring external_order_instanceid, *softint parent_workflow_instanceid) |
executes a workflow order synchronously and returns the final status and order ID in a hash More... | |
static int | postUserEvent (string severity, auto info) |
posts an application event of class OMQ::QE_CLASS_USER More... | |
static hash | runtimeProperties () |
returns Qorus runtime properties as a hash More... | |
static auto | callNetworkApiArgsWithAuthentication (string user, string pass, string call, softlist< auto > args) |
calls a system RPC API with authentication information (username and password) More... | |
static auto | callNetworkApiArgs (string call, *softlist< auto > args) |
calls a system RPC API with the argument list to the API method as a top-level argument to this method; the API is called with system permissions (no restrictions) More... | |
static auto | callNetworkApi (string call) |
calls a system RPC API and returns the result; the API is called with system permissions (no restrictions) More... | |
static auto | callRestApi (string method, string path, *hash< auto > body_args) |
calls a system REST API method and returns the result; the API is called with system permissions (no restrictions) More... | |
static auto | callRestApiWithAuthentication (string user, string pass, string method, string path, *hash< auto > body_args) |
calls a system REST API method with authentication information (username and password) and returns the result More... | |
static hash< auto > | getSystemInfo () |
returns a hash of system info More... | |
static int | getSessionId () |
returns the current Qorus application session ID More... | |
static | startCapturingObjectsFromJava () |
Starts capturing Qore objects created from Java APIs in the current interface's object cache. More... | |
static | stopCapturingObjectsFromJava () |
Stops capturing Qore objects created from Java APIs in the current interface's object cache. More... | |
static | startCapturingObjectsFromPython () |
Starts capturing Qore objects created from Python APIs in the current interface's object cache. More... | |
static | stopCapturingObjectsFromPython () |
Stops capturing Qore objects created from Python APIs in the current interface's object cache. More... | |
static | saveObjectInObjectCache (object obj) |
Saves the object in the object cache. More... | |
static bool | clearObjectFromObjectCache (object obj) |
Removes the object from the object cache. More... | |
static *date | checkObjectCache (object obj) |
Returns the date/time the object was cached or NOTHING if the object is not in the cache. More... | |
static int | getObjectCacheSize () |
Returns the number of objects in the cache. More... | |
static int | clearObjectCache () |
Clears the entire the object cache. More... | |
static int | clearObjectCache (date cutoff) |
Clears the entire the object cache for all objects cached before the given date/time. More... | |
static list< hash< CallStackInfo > > | getThreadCallStack () |
Allows the current thread's call stack to be retrieved in Qorus. More... | |
static | logFatal (softstring msg) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logError (softstring msg) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logWarn (softstring msg) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logInfo (softstring msg) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logDebug (softstring msg) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logTrace (softstring msg) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logArgsFatal (softstring msg, *softlist< auto > args) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logWithLevel (Logger::LoggerLevel level, string msg) |
Writes to the current interface log file with the given log level. More... | |
static | logWithLevel (int level, string msg) |
Writes to the current interface log file with the given log level. More... | |
static | logWithLevelArgs (Logger::LoggerLevel level, string msg, *softlist< auto > args) |
Writes to the current interface log file with the given log level. More... | |
static | logWithLevelArgs (int level, string msg, *softlist< auto > args) |
Writes to the current interface log file with the given log level. More... | |
static | logArgsError (softstring msg, *softlist< auto > args) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logArgsWarn (softstring msg, *softlist< auto > args) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logArgsInfo (softstring msg, *softlist< auto > args) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logArgsDebug (softstring msg, *softlist< auto > args) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static | logArgsTrace (softstring msg, *softlist< auto > args) |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower. More... | |
static *int | auditUserEvent (string user_event, *string info1, *string info2) |
creates a user audit event (with audit code AE_USER_EVENT) against the workflow, service, or job instance More... | |
static bool | auditCheckEventString (string opt) |
checks if the given audit event (given as a string) is enabled More... | |
static bool | auditCheckEvent (softint opt) |
checks if the given audit event (given as an integer code) is enabled More... | |
static int | auditGetMask () |
returns the audit event mask More... | |
static bool | isKubernetes () |
returns True when Qorus is running under Kubernetes More... | |
static int | usleep (date arg) |
puts the current thread to sleep for a certain number of microseconds More... | |
static int | sleep (softint arg) |
puts the current thread to sleep for a certain number of seconds More... | |
static int | usleep (softint arg) |
puts the current thread to sleep for a certain number of microseconds More... | |
static hash< auto > | getQorusOptions () |
returns the value of the given system option or options More... | |
static hash< auto > | getQorusOptionInfo () |
returns a hash giving information about system options More... | |
static hash< auto > | getQorusOptionInfoArgs (*list< auto > args) |
returns a hash giving information about system options More... | |
static auto | getQorusOptionsArgs (softlist< auto > args) |
returns the value of the given system option or options More... | |
static hash< auto > | getActiveJobs () |
Returns information on all active jobs visible to the calling user. More... | |
static object | getUserConnection (string name, bool connect=True, bool register_dependency=True, *hash< auto > rtopts) |
Returns an object corresponding to a defined user connection. More... | |
static hash< auto > | getUserConnectionTags (string name) |
Returns any tags set on the given user connection. More... | |
static Qore::SQL::Datasource | getDatasourceDedicated (string name, bool register_dependency=True) |
returns a new, dedicated Datasource object, suitable for transaction management for long-running transactions More... | |
static AbstractDatasource | getDatasourcePool (string name, bool register_dependency=True) |
returns a DatasourcePool object for the given datasource name More... | |
static hash< auto > | getDatasourceInfo (string name) |
returns a hash of information for the given datasource, if known, otherwise throws an exception More... | |
static QorusSystemAPIHelper | getRemoteRpcConnection (string name, bool connect=True, bool register_dependency=True) |
Returns a new QorusSystemAPIHelper object corresponding to a defined Qorus remote connection. More... | |
static QorusSystemRestHelper | getRemoteRestConnection (string name, bool connect=True, bool register_dependency=True) |
Returns a new QorusSystemRestHelper object corresponding to a defined Qorus remote connection. More... | |
static | raiseTransientAlert (string alert, string reason, *hash< auto > info) |
raises a transient system alert from a workflow, service, or job More... | |
static string | qorusGetLocalUrl (*string username, *string password) |
returns a string giving the local system URL More... | |
static | setOption (hash< auto > hash) |
Changes option values on a workflow, service, or job. More... | |
static auto | getOption () |
Returns the value of the named workflow, service, or job option or options. More... | |
static auto | getOptionArgs (*softlist< string > args) |
Returns the value of the named workflow, service, or job option or options. More... | |
static hash< auto > | blockOrder (softint wfiid) |
block the given workflow order data instance More... | |
static hash< auto > | unblockOrder (softint wfiid, *hash< auto > tempdata, *hash< auto > orderkeys) |
unblocks the given workflow order data instance More... | |
static hash< auto > | cancelOrder (softint wfiid) |
cancel the given workflow order data instance More... | |
static hash< auto > | uncancelOrder (softint wfiid, *hash< auto > tempdata) |
uncancels the given workflow order data instance More... | |
static | updateDynamicOrderData (softint wfiid, hash< auto > new_data) |
updates the given workflow order instance's dynamic data hash atomically More... | |
static | updateDynamicOrderDataPath (softint wfiid, string path, auto value) |
updates the given workflow order instance's dynamic data hash atomically More... | |
static *hash< auto > | getUserContextInfo () |
returns a hash for the current user context More... | |
static *string | getContextUserName () |
returns the current username for any external user-initiated call or NOTHING if executing in a system context More... | |
static auto | getConfigItemValue (string cfg_item, *hash< auto > local_context, bool expand_complex_values=True) |
returns config item value in the current user context More... | |
static auto | getInterfaceConfigItemValue (string cfg_item, *hash< auto > local_context, bool expand_complex_values=True) |
returns config item value in the current interface context More... | |
static hash< auto > | getConfigItemHash (*hash< auto > local_context) |
returns a hash of all configuration items for the current interface More... | |
static hash< auto > | getInterfaceConfigItemHash (*hash< auto > local_context) |
Returns a hash of all configuration items for the current context as a combination of local and global configuration items. More... | |
static auto | getGlobalConfigItemValue (string item, *hash< auto > local_context, bool expand_complex_values=True) |
returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item More... | |
static auto | getGlobalConfigItemValueWithDefault (string item, auto default_value, *hash< auto > local_context, bool expand_complex_values=True) |
returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item More... | |
static AbstractDataProvider | getDataProvider (hash< auto > h, *hash< auto > ctx) |
Returns a data provider corresponding to the hash description. More... | |
static AbstractDataProvider | getDataProvider (string path) |
returns the data provider given by a path string More... | |
static AbstractDataProvider | getDataProvider (string type, string name, *string path, *hash< auto > opts, *hash< auto > ctxt, *bool handle_template_args) |
returns the data provider given by a path string More... | |
static AbstractDataProviderType | getQorusType (string type_path) |
Returns a data provider type from a direct type path. More... | |
static AbstractDataProviderType | getTypeFromPath (string path) |
returns a data provider type identified by a path string More... | |
static Mapper::Mapper | getMapper (string name, *hash< auto > rtopts) |
returns the given mapper if registered for the current interface More... | |
static Qore::AbstractIterator | getMapperIterator (string name, Qore::AbstractIterator input, *hash< auto > rtopts) |
returns an iterator for the named mapper using the iterator argument for input More... | |
static bool | postSyncEvent (string eventtype, string eventkey) |
posts a workflow synchronization event given the event type name and the unique event key More... | |
static hash< auto > | propGet () |
returns a hash of all system properties in all domains More... | |
static *hash< auto > | propGet (string domain) |
returns a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist More... | |
static auto | propGet (string domain, string key) |
returns the value of the given system property key in the given domain or NOTHING if the system property does not exist More... | |
static string | propUpdate (string domain, softstring key, auto value) |
changes (inserts, updates, or deletes) the value of a single system property More... | |
static hash< auto > | propUpdate (hash< auto > h) |
changes (inserts, updates, or deletes) the value of one or more system properties according to a hash argument More... | |
static softint | getNextSequenceValue (AbstractDatasource ds, string name) |
returns the next sequence value for the given datasource and sequence More... | |
static softint | getNextSequenceValue (string ds, string name) |
returns the next sequence value for the given datasource and sequence More... | |
static string | serializeQorusData (auto d) |
returns a string giving the default serialization of the given data structure for storage in Qorus More... | |
static string | serializeQorusDataWithNothing (auto d) |
returns a string giving the default serialization of the given data structure for storage in Qorus More... | |
static auto | deserializeQorusData (string data) |
parses serialized data in either XML-RPC or YAML format and returns the corresponding qore data More... | |
static auto | deserializeQorusData (null data) |
deserializing a NULL value from the DB returns no value | |
static *string | restartTransaction (string driver, hash< auto > ex) |
returns a string error message if any exception in the chain passed was caused by a recoverable DB error, otherwise returns NOTHING More... | |
static bool | isInternalSystemDebuggingEnabled () |
returns True if internal system debugging is enabled More... | |
static auto | getHashDotValue (*hash< auto > var_data, string var_name, *reference< bool > missing_input) |
returns the value of the given key from the given hash, respects dot notation in the key name More... | |
static auto | expandOneVariable (string str, string var_context, auto template_arg, *hash< auto > local_context, *bool brackets, bool expand_complex_values=True, *reference< bool > missing_input) |
expands one variable in a templated string More... | |
static bool | isSingleTemplatedString (auto value) |
checks if the given value is a templated string with only one expandable variable More... | |
static auto | expandTemplatedValue (auto value, *hash< auto > local_context, bool expand_complex_values=True, *reference< bool > missing_input, *string template_context) |
expands all variables in a templated string More... | |
static softlist< auto > | expandComplexValue (list< auto > val, *hash< auto > local_context, *string template_context) |
expands all variables in a list with templated values More... | |
static hash< auto > | expandComplexValue (hash< auto > val, *hash< auto > local_context, *string template_context) |
expands all variables in a hash with templated values More... | |
static hash< BbVariable > | bbParseExactlyOneVariable (string str) |
parses one template variable and returns a hash with its parts More... | |
static auto | getInputData (string field_name, *hash< auto > local_context, *hash< auto > input_data_cfg) |
returns specified input data field's value More... | |
static hash< auto > | getInputData (*hash< auto > input_data_cfg, *hash< auto > local_context) |
returns all input data More... | |
static *hash< auto > | updateHashDotValue (*hash< auto > var_data, string var_name, auto value) |
updates the given hash with a key in dot notation with the given value More... | |
static | updateOutputData (string field_name, auto output_data, *hash< auto > output_data_cfg) |
updates specified output data field's value More... | |
static | updateOutputData (hash< auto > all_output_data, hash< auto > output_data_cfg=UserApi::getConfigItemValue(BB_OUTPUT_DATA_CFG_KEY, NOTHING, False)) |
updates all output data More... | |
static | writeOutputData (*hash< auto > output_data) |
Writes output data using a concise format. More... | |
static string | getTextFileFromLocation (string location) |
returns string data for the given file location More... | |
static binary | getBinaryFileFromLocation (string location) |
returns binary data for the given file location More... | |
static Qore::StreamReader | getStreamReaderFromLocation (string location) |
Returns a string stream for the file's data at the given location. More... | |
static Qore::InputStream | getBinaryStreamFromLocation (string location) |
Returns an input stream for file data at the given location. More... | |
static | writeFileToLocation (string location, data contents) |
Writes data to a file at the given location. More... | |
static FileLocationHandler::OutputStreamWrapper | getOutputStreamForLocation (string location) |
Returns an output stream for writing data to the given location. More... | |
static auto | executeFsm (string fsm_name, auto arg) |
Executes the given Finite State Machine and returns the final output. More... | |
static | registerFsmAsObserver (string fsm_name, DataProvider::Observable observable, string event_id) |
Registers the given Finite State Machine with the given object as an Observer. More... | |
static string | generateTokenForUser (string username, timeout expiry=DefaultTokenExpirationPeriod) |
Generates an access token for the given user with the given expiration time. More... | |
static string | generateTokenForUser (string username, int expiry_seconds) |
Generates an access token for the given user with the given expiration time. More... | |
static bool | invalidateToken (string token) |
Invalidates the given token. More... | |
static | refreshToken (string token, *int expiry_seconds) |
Refreshes the given token. More... | |
static | refreshToken (string token, timeout expiry_seconds) |
Refreshes the given token. More... | |
static *hash< TokenInfo > | getTokenInfo (string token, *bool refresh_token) |
Returns information for the given token. More... | |
static *hash< QorusUserInfo > | getCurrentUserInfo () |
Returns information for the current user. More... | |
static hash< QorusUserInfo > | getUserInfo (string username) |
Returns information for the given user. More... | |
static public hash< auto > | bindSubworkflow (hash< auto > wf, hash< auto > order) |
This method binds a workflow to a subworkflow step. More... | |
static public hash< auto > | skipSubworkflow () |
This method skips binding a workflow to a subworkflow step. More... | |
static public | submitAsyncKey (string key) |
Binds the given key to the asynchronous step. More... | |
static public | skipAsyncStep () |
This method will skip the execution of an asynchronous step. More... | |
static public | bindEvent (string eventkey) |
binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent) More... | |
static public | bindEventUnposted (string eventkey) |
binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent) only if the event has not yet been posted; if the event has already been posted, then an ALREADY-POSTED exception is raised More... | |
static public | skipEvent () |
skips a workflow synchronization event step More... | |
static | leaveParentFeedback (string key, auto value) |
leaves feedback for a parent workflow More... | |
static auto | getChildFeedback (string key) |
gets feedback from a child workflow order with the given key More... | |
static bool | isWorkflowContext () |
Returns True if the code is executing in an immediate workflow context, False if not. More... | |
static bool | isServiceContext () |
Returns True if the code is executing in an immediate service context, False if not. More... | |
static bool | isJobContext () |
Returns True if the code is executing in an immediate job context, False if not. More... | |
Static Private Member Methods | |
static QorusProgram | DynamicLogic (False, CommonParseOptions|PO_NO_INHERIT_USER_CLASSES|PO_NO_INHERIT_USER_FUNC_VARIANTS|PO_NO_INHERIT_GLOBAL_VARS|PO_NO_INHERIT_USER_CONSTANTS|PO_NO_INHERIT_USER_HASHDECLS|PO_NEW_STYLE|PO_STRICT_ARGS|PO_REQUIRE_TYPES, QorusServerDefines) |
Program for dynamic logic. | |
Private Attributes | |
const | DataProviderRootValues |
data provider root path values | |
const | DataTypeRootValues |
data type root path values | |
const | DataProviderPathTypeValues |
data type path provider type values | |
main common Qorus API class
|
static |
checks if the given audit event (given as an integer code) is enabled
opt | the audit event code to check; see Audit Event Codes for possible values |
|
static |
checks if the given audit event (given as a string) is enabled
opt | the audit event code to check; see Audit Event Strings for possible values |
AUDIT-EVENT-ERROR | the given audit event string does not exist |
|
static |
returns the audit event mask
|
static |
creates a user audit event (with audit code AE_USER_EVENT) against the workflow, service, or job instance
user_event | the user event code string |
info1 | optional informational string for the AUDIT_EVENTS.INFO1 field |
info2 | optional informational string for the AUDIT_EVENTS.INFO2 field |
AUDIT_EVENTS
table if the qorus.audit system option does not include the "user-events"
(AO_USER_EVENTS) option; in case this is not set, the call will have no effect
|
static |
parses one template variable and returns a hash with its parts
str | templated string to be parsed (has to contain exactly one variable and nothing more); see Config Item / Building Block Template Substitution Strings for more information on this parameter |
FORMAT-ERROR | if the templated string doesn't have correct format |
|
static |
binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent)
This call is a wrapper for QorusEventStepBase::bindEvent(); please see that method for documentation
EVENT-STEP-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent) only if the event has not yet been posted; if the event has already been posted, then an ALREADY-POSTED exception is raised
This call is a wrapper for QorusEventStepBase::bindEventUnposted(); please see that method for documentation
EVENT-STEP-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
This method binds a workflow to a subworkflow step.
This call is a wrapper for QorusSubworkflowStepBase::bindSubworkflow(); please see that method for documentation
SUBWORKFLOW-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
block the given workflow order data instance
wfiid | the workflow order instance ID to block |
workflow_status:
the status of the workflow orderAn exception will be thrown if the status is OMQ::StatInProgress
BLOCK-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |
|
static |
calls a system RPC API and returns the result; the API is called with system permissions (no restrictions)
include any arguments after the method name, ex:
call | the full RPC API method name (ex: "omq.system.exec-synchronous-exiting" ); see Network System API for a full list |
UNKNOWN-API-CALL | invalid API method |
INVALID-INTERNAL-API-CALL | API may not be called internally (ex: omq.system.shutdown-wait()) |
|
static |
calls a system RPC API with the argument list to the API method as a top-level argument to this method; the API is called with system permissions (no restrictions)
call | the full RPC API method name (ex: "omq.system.exec-synchronous-exiting" ); see Network System API for a full list |
args | any arguments to the method; if multiple argument should be passed to the method, use a list of arguments here |
UNKNOWN-API-CALL | invalid API method |
INVALID-INTERNAL-API-CALL | API may not be called internally (ex: omq.system.shutdown-wait()) |
|
static |
calls a system RPC API with authentication information (username and password)
user | the username to use for the call |
pass | the password to use for the call |
call | the full RPC API method name (ex: "omq.system.exec-synchronous-exiting" ); see Network System API for a full list |
args | any arguments to the method; if multiple argument should be passed to the method, use a list of arguments here |
UNKNOWN-API-CALL | invalid API method |
INVALID-INTERNAL-API-CALL | API may not be called internally (ex: omq.system.shutdown-wait()) |
|
static |
calls a system REST API method and returns the result; the API is called with system permissions (no restrictions)
method | the HTTP method name in all caps |
path | the URI path without the leading "api" ; if it does not begin with "latest" or "v#" (for a REST API version), then "/latest/" is prepended ot the path, meaning that the latest version of the REST API will be used |
body_args | the arguments to the call |
path
begins with "/api"
|
static |
calls a system REST API method with authentication information (username and password) and returns the result
user | the username to use for the call |
pass | the password to use for the call |
method | the HTTP method name in all caps |
path | the URI path without the leading "api" ; if it does not begin with "latest" or "v#" (for a REST API version), then "/latest/" is prepended ot the path, meaning that the latest version of the REST API will be used |
body_args | the arguments to the call |
path
begins with "/api"
|
static |
cancel the given workflow order data instance
wfiid | the workflow order instance ID to cancel |
workflow_status:
the status of the workflow orderAn exception will be thrown if the status is OMQ::StatInProgress
CANCEL-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |
|
static |
Returns the date/time the object was cached or NOTHING if the object is not in the cache.
obj | the object to check |
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
Clears the entire the object cache.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
Clears the entire the object cache for all objects cached before the given date/time.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
|
static |
clears cached objects for given datasource (for example, if database objects have been updated in the dataserver)
datasource | a DatasourcePool object for a Qorus datasource; note that if the Qore::SQL::DatasourcePool object cannot be matched back to a known Qorus datasource, an INVALID-DATASOURCE exception will be thrown |
table_name | an optional table name to clear; if not present, then all objects in the given datasource are cleared |
INVALID-DATASOURCE | this exception is thrown if the datasource argument cannot be matched to a known Qorus datasource |
|
static |
clears all objects for given datasource from the cache (for example, if database objects have been updated in the dataserver)
datasource | the name of a Qorus datasource |
table_name | an optional table name to clear; if not present, then all objects in the given datasource are cleared |
See
|
static |
creates a workflow order data instance in the database
Creates a workflow order data instance of the specified type with the data passed.
To ensure that a given workflow order is only created once for a given unique key value, make sure your workflow defines order keys, and use one of the following options to guarantee uniqueness of the order:
global_unique_key
workflow_specific_unique_key
workflow_unique_key
name | the name of the workflow |
version | the version of the workflow; if this parameter is not passed, then the latest version of the workflow (determined by the latest created date for the workflow_instance entry) will be used |
params | The hash passed must have at either a staticdata key or an external_order_instanceid key, valid keys:
|
status | create the workflow order data instance with this status; may be either:
|
SUBMIT-ORDER-ERROR | invalid status value |
ORDER-DATA-ERROR | missing either external_order_instanceid or staticdata , unknown workflow; invalid keys or sensitive data format |
DUPLICATE-ORDER-KEY | the given unique key already exists in the defined scope, also sets arg with a workflow_instance_ids key with a list of all conflicting workflow instance IDs |
WORKFLOW-KEY-ERROR | invalid workflow key given |
staticdata
or external_order_instanceid
values must be provided; staticdata
may be omitted if external_order_instanceid
is provided and vice-versaglobal_unique_key
, workflow_specific_unique_key
, and workflow_unique_key
options can be used to ensure that given workflow order data is only created once; note that any archiving schema is also searched when checking for duplicate keys. These options may be combined, but it's recommended to use no more than one key for uniqueness.
|
static |
creates a workflow order data instance in a remote Qorus instance
Creates a workflow order data instance of the specified type with the data passed in the specified remote Qorus instance.
To ensure that a given workflow order is only created once for a given unique key value, make sure your workflow defines order keys, and use one of the following options to guarantee uniqueness of the order:
global_unique_key
workflow_specific_unique_key
workflow_unique_key
remote | the name of the remote Qorus connection |
name | the name of the workflow |
version | the version of the workflow; if this parameter is not passed, then the latest version of the workflow (determined by the latest created date for the workflow_instance entry) will be used |
params | The hash passed must have at either a staticdata key or an external_order_instanceid key, valid keys:
|
status | create the workflow order data instance with this status; may be either:
|
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
GET-REMOTE-ERROR | The given connection is not known |
SUBMIT-ORDER-ERROR | invalid status value |
WORKFLOW-ERROR | unknown or invalid workflow |
ORDER-DATA-ERROR | missing either external_order_instanceid or staticdata , invalid keys or sensitive data format |
DUPLICATE-ORDER-KEY | the given unique key already exists in the defined scope, also sets arg with a workflow_instance_ids key with a list of all conflicting workflow instance IDs |
WORKFLOW-KEY-ERROR | invalid workflow key given |
staticdata
or external_order_instanceid
values must be provided; staticdata
may be omitted if external_order_instanceid
is provided and vice-versaglobal_unique_key
, workflow_specific_unique_key
, and workflow_unique_key
options can be used to ensure that given workflow order data is only created once; note that any archiving schema is also searched when checking for duplicate keys. These options may be combined, but it's recommended to use no more than one key for uniqueness.
|
static |
parses serialized data in either XML-RPC or YAML format and returns the corresponding qore data
auto-detects XML-RPC or YAML decoding
data | the string data to deserialize |
|
static |
executes a workflow order synchronously and returns the final status and order ID in a hash
name | the workflow name |
version | the workflow version (if NOTHING then the latest version of the workflow will be used) |
sdata | the static data hash for the workflow order |
opts | the options for the synchronous workflow execution instance |
ddata | the optional initial dynamic data hash for the workflow order |
priority | the order priority for the order |
orderkeys | optional order keys for the order |
external_order_instanceid | the optional external order instanceid for the order |
parent_workflow_instanceid | an optional loosely-coupled workflow order ID that will be marked as the parent of this order; if this key is not set, and this method is called from workflow code (even indirectly, by calling a service method that calls this method in the same thread as the call from workflow code), the new order will be loosely-coupled with the calling workflow order as the parent; to keep this from happening, set the value of this key to False |
workflow_instanceid
(int): the workflow order instance IDstatus
(string): the order status commit to the database (for possible values, see OMQ::StatusDescriptions)dynamicdata
(*hash): the order's dynamic data hash, if anyerror
(string)]: the last error for the order, if anydescription
(string)]: the last error description for the order, if anyinfo
(*hash)]: the last error info hash for the order, if any
|
static |
Executes the given Finite State Machine and returns the final output.
fsm_name | the name of the Finite State Machine to execute; must be a valid Finite State Machine for the current interface context |
arg | any optional input argument for the Finite State Machine |
FSM-NOT-FOUND | The given Finite State Machine is not valid for the current interface context |
|
static |
expands all variables in a hash with templated values
val | the value to expand |
local_context | local context supplied by the caller (plus user context info is added - see UserApi::getUserContextInfo() method) |
template_context | optional template context |
VALUE-ERROR | if the key in a hash is not resolved to a type convertible to a string |
|
static |
expands all variables in a list with templated values
val | the value to expand |
local_context | local context supplied by the caller (plus user context info is added - see UserApi::getUserContextInfo() method) |
template_context | optional template context |
VALUE-ERROR | if the key in a hash is not resolved to a type convertible to a string |
|
static |
expands one variable in a templated string
str | templated string to be expanded; see Config Item / Building Block Template Substitution Strings for more information on this parameter |
var_context | context of the variable to be expanded (e.g. local, static, dynamic, keys,...) |
template_arg | the template argument for the given context |
local_context | local context supplied by the caller (plus user context info is added - see UserApi::getUserContextInfo() method) |
brackets | if True then the variable was given in curly brackets; currently ignored |
expand_complex_values | if True then lists and hashes will have their values expanded recursively |
missing_input | an optional reference that returns True if the input key was missing in case of a NOTHING return value |
LIST-VALUE-ERROR | cannot parse list value expression |
REST-EXPRESSION-ERROR | cannot parse REST expression and argument |
UNSUPPORTED-CONTEXT-ERROR | if an unknown context variable is specified to be expanded |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
|
static |
expands all variables in a templated string
value | templated string to be expanded; see Config Item / Building Block Template Substitution Strings for more information on this parameter |
local_context | local context supplied by the caller (plus user context info is added - see UserApi::getUserContextInfo() method) |
expand_complex_values | if True then lists and hashes will have their values expanded recursively |
missing_input | an optional reference that returns True if the input key was missing in case of a NOTHING return value |
template_context | optional template context |
LIST-VALUE-ERROR | cannot parse list value expression |
REST-EXPRESSION-ERROR | cannot parse REST expression and argument |
UNSUPPORTED-CONTEXT-ERROR | if an unknown context variable is specified to be expanded |
FORMAT-ERROR | if the templated string doesn't have correct format (e.g. unescaped dollar sign that does not represent a variable) |
VALUE-ERROR | if the resolved values cannot be combined for the return value. or if the key in a hash is not resolved to a type convertible to a string |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
|
static |
flushes all pending SLA events to disk and returns after the data has been committed
|
static |
Generates an access token for the given user with the given expiration time.
username | the user to generate the token for |
expiry_seconds | the expiration time of the token |
|
static |
Generates an access token for the given user with the given expiration time.
username | the user to generate the token for |
expiry | the expiration time of the token with a resolution of one second |
|
static |
Returns information on all active jobs visible to the calling user.
If any active jobs are not accessible to the calling user, then they are filtered from the hash returned.
jobid:
the metadata jobid of the job typename:
the job nameversion:
the job versiondescription:
the job descriptiontrigger:
a string describing the timer/trigger for the jobjob_instanceid
]: the id of the job instance (will only have a value if the job is currently executing)last_executed
]: the last executed date/time of the job (NOTHING if not yet executed)last_executed_job_instanceid
]: the last executed instance id of the jobexpiry_date
]: the expiry date of the job, if any; if this date is present, then the job will not run automatically after this datenext
]: the next trigger date/time; this key is only included if the job is activeactive:
this value is always True because this API only returns information about active jobs
|
static |
returns binary data for the given file location
location | the location of the file data (ex: "resource://service-name:path/to/resource" ); see File Locations for more information about this parameter |
LOCATION-ERROR | the location string cannot be parsed; unknown location scheme; invalid location option |
http(s)
locations
|
static |
Returns an input stream for file data at the given location.
location | the location of the file data |
|
static |
gets feedback from a child workflow order with the given key
This call is a wrapper for WorkflowApi::getChildFeedback(); please see that method for documentation
FEEDBACK-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
returns a hash of all configuration items for the current interface
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see UserApi::getUserContextInfo() method) |
"$"
characters with a backslash ("\") to avoid template substitution
- In a @ref data_pipeline_processors "pipeline
processor" or a
@ref fsm_data_processing "finite state machine connector", this method will return config item information
from the @ref data_pipelines "data pipeline" or @ref finite_state_machines "finite state machine" only;
config item information from the interface is not accessible; use @ref getInterfaceConfigItemHash() to get
configuration information from the interface from within a @ref data_pipelines "data pipeline" or
@ref finite_state_machines "finite state machine"
|
static |
returns config item value in the current user context
cfg_item | name of the config item |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see UserApi::getUserContextInfo() method) |
expand_complex_values | if True then lists and hashes will have their values expanded recursively |
CONFIG-ITEM-ERROR | thrown if the configuration item is not valid in the current context |
"$"
characters with a backslash ("\") to avoid template substitution
- In a @ref data_pipeline_processors "pipeline
processor" or a
@ref fsm_data_processing "finite state machine connector", this method will return config item information
from the @ref data_pipelines "data pipeline" or @ref finite_state_machines "finite state machine" only;
config item information from the interface is not accessible; use @ref getInterfaceConfigItemHash() to get
configuration information from the interface from within a @ref data_pipelines "data pipeline" or
@ref finite_state_machines "finite state machine"
|
static |
|
static |
Returns information for the current user.
|
static |
Returns a data provider corresponding to the hash description.
h | a description of the data provider with keys as follows:
|
ctxt | any local context to use when processing opts with expandTemplatedValue(); if not present, defaults to getUserContextInfo() |
|
static |
returns the data provider given by a path string
path | the path to the dataprovider; the first element must be one of the following:
|
DATA-PROVIDER-ERROR | the given data provider path is unknown or invalid |
|
static |
returns the data provider given by a path string
type | must be one of the following:
|
name | the name of the type |
path | an optional data provider path to the data provider |
opts | any optional data provider factory creation options; invalid options are ignored; these options, if present, are also processed with expandTemplatedValue() using ctxt as the local context value |
ctxt | any local context to use when processing opts with expandTemplatedValue() |
handle_template_args | callers can use True here in non-runtime contexts so that any template arguments can be separated and data provider factories can try to create objects without runtime values |
DATA-PROVIDER-ERROR | a data provider could not be created from the arguments |
|
static |
returns a new, dedicated Datasource object, suitable for transaction management for long-running transactions
name | the name of the datasource |
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
DATASOURCE-ERROR | The given connection is not known or is a system datasource |
|
static |
returns a hash of information for the given datasource, if known, otherwise throws an exception
name | the name of the datasource |
name
(string): the name of the datasource connection (corresponding to the argument name)type
(string): datasource
constanturl
(string): a connection stringurl_hash
(hash): parsed connection string and optionstype
(string): driver nameuser
(string): the username for the datasource connection, if anypass
(string): the password for the datasource connection, if anycharset
(string): the DB-specific character encoding for the datasource connectiondb
(string): The database name of the datasource connectionoptions
(hash): an optional hash of options for the DBI driver for this datasource connection; also "min"
and "max"
for the DatasourcePool minimum and maximum optionslocked
(bool): a flag indicating if the datasource is locked or not (the system datasource "omq"
is locked)up
(bool): a flag indicating if monitoring has discovered if the datasource is up or notdesc
(string): a string description of the datasourcemonitor
(bool): a flag indicating if the datasource is monitored or notstatus
(string): "OK"
if the datasource is up or an error string if the datasource is down; set by monitoringlast_check
(date/time): the date and time of the last monitoring checkshared_pool
(string): a string giving the pool state (only present if a pool has been initialized on the datasource)deps
(list): a list of hashes giving interface objects that depend on the connection; each entry is a hash with the following keys:type:
"WORKFLOW"
, "SERVICE"
, or "JOB"
workflowid:
for workflows, gives the workflow IDserviceid:
for services, gives the service IDjobid:
for jobs, gives the job IDname:
the name of the workflow, service, or jobversion:
the version of the workflow, service, or jobdesc:
a string description of the objectDATASOURCE-ERROR | unknown datasource |
|
static |
returns a DatasourcePool object for the given datasource name
name | the name of the datasource |
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
DATASOURCE-ERROR | unknown or system datasource |
|
static |
returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item
item | the name of the configuration item to retrieve the value |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see UserApi::getUserContextInfo() method) |
expand_complex_values | if True then lists and hashes will have their values expanded recursively |
CONFIG-ITEM-ERROR | thrown if the configuration item is not valid |
"$"
characters with a backslash ("\"
) to avoid template substitution
|
static |
returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item
item | the name of the configuration item to retrieve the value |
default_value | the value to be returned if the value is not set |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see UserApi::getUserContextInfo() method) |
expand_complex_values | if True then lists and hashes will have their values expanded recursively |
"$"
characters with a backslash ("\"
) to avoid template substitution
|
static |
returns the value of the given key from the given hash, respects dot notation in the key name
var_data | the hash to search |
var_name | the key value to use; respects dot notation |
missing_input | an optional reference that returns True if the input key was missing in case of a NOTHING return value |
|
static |
returns all input data
local_context | the caller can supply its "$local:" context for template variables (plus user context info is added - see UserApi::getUserContextInfo()); hash values are subject to recursive template variable expansion |
input_data_cfg | input data configuration; if not provided, the default location for the input data config is retrieved from configuration item "input_data" |
LIST-VALUE-ERROR | cannot parse list value expression |
REST-EXPRESSION-ERROR | cannot parse REST expression and argument |
UNSUPPORTED-CONTEXT-ERROR | if an unknown or invalid context variable is specified to be expanded |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
|
static |
returns specified input data field's value
field_name | name of the field that should be returned; identifies a key in input_data_cfg |
local_context | the caller can supply its "$local:" context for template variables (plus user context info is added - see UserApi::getUserContextInfo()); hash values are subject to recursive template variable expansion |
input_data_cfg | input data configuration; if not provided, the default location for the input data config is retrieved from current configuration item "input_data" ; field_name must be present in this hash; string values of the key referenced with field_name in this hash are subject to recursive template variable expansion, and the resulting value is returned; non-string values are returned as-is |
LIST-VALUE-ERROR | cannot parse list value expression |
REST-EXPRESSION-ERROR | cannot parse REST expression and argument |
UNSUPPORTED-CONTEXT-ERROR | if an unknown context variable is specified to be expanded |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
INVALID-ARGUMENT | if the field_name is not present in input data |
|
static |
Returns a hash of all configuration items for the current context as a combination of local and global configuration items.
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see UserApi::getUserContextInfo() method) |
"$"
characters with a backslash ("\") to avoid template substitution
- In a @ref data_pipeline_processors "pipeline
processor" or a
@ref fsm_data_processing "finite state machine connector", this method will return config item information
from the @ref data_pipelines "data pipeline" or @ref finite_state_machines "finite state machine" only;
config item information from the interface is not accessible; use @ref getInterfaceConfigItemHash() to get
configuration information from the interface from within a @ref data_pipelines "data pipeline" or
@ref finite_state_machines "finite state machine"
|
static |
returns config item value in the current interface context
cfg_item | name of the config item |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see UserApi::getUserContextInfo() method) |
expand_complex_values | if True then lists and hashes will have their values expanded recursively |
CONFIG-ITEM-ERROR | thrown if the configuration item is not valid in the current context |
"$"
characters with a backslash ("\") to avoid template substitution
- In a @ref data_pipeline_processors "pipeline
processor" or a
@ref fsm_data_processing "finite state machine connector", this function will return config item information
from the interface; config item information from the @ref data_pipelines "data pipeline" and
@ref finite_state_machines "finite state machine" is not accessible; use @ref getConfigItemValue() to get
configuration information from @ref data_pipelines "data pipelines" and
@ref finite_state_machines "finite state machines"
|
static |
returns the given mapper if registered for the current interface
name | the name of the mapper |
rtopts | any runtime options accepted by the mapper |
MAPPER-ERROR | the given mapper is unknown or not registered to the current interface |
|
static |
returns an iterator for the named mapper using the iterator argument for input
name | the name of the mapper |
input | an iterator providing the input for the mapper for the iterator returned; the input iterator must iterate hashes (as returned by the Qore::AbstractIterator::getValue() method) |
rtopts | any runtime options accepted by the mapper |
MAPPER-ERROR | unknown mapper or not registered to the current interface |
|
static |
returns the next sequence value for the given datasource and sequence
ds | the datasource to retrieve the sequence from |
name | the name of the sequence |
|
static |
returns the next sequence value for the given datasource and sequence
ds | the datasource name to retrieve the sequence from; a pool corresponding to the datasource will be used to retrieve the sequence |
name | the name of the sequence |
|
static |
Returns the number of objects in the cache.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
Returns the value of the named workflow, service, or job option or options.
If the option is not set on the workflow, service, or job level (depending on the calling context) and it is a valid system option, then the value of the system option will be returned.
|
static |
Returns the value of the named workflow, service, or job option or options.
If the option is not set on the workflow, service, or job level (depending on the calling context) and it is a valid system option, then the value of the system option will be returned.
args | the list of options to return |
|
static |
Returns an output stream for writing data to the given location.
location | the location of the file to write |
|
static |
returns a hash giving information about system options
|
static |
returns a hash giving information about system options
|
static |
returns the value of the given system option or options
... | zero or more options |
|
static |
returns the value of the given system option or options
|
static |
Returns a data provider type from a direct type path.
type_path | the direct path to the type as would be used with DataProvider::getTypeEx() |
DATA-TYPE-ERROR | the given type is unknown |
|
static |
Returns a new QorusSystemRestHelper object corresponding to a defined Qorus remote connection.
name | the name of the remote connection |
connect | if False an unconnected object will be returned, otherwise the object is already connected |
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
GET-REMOTE-ERROR | The given connection is not known |
|
static |
Returns a new QorusSystemAPIHelper object corresponding to a defined Qorus remote connection.
name | the name of the remote connection |
connect | if False an unconnected object will be returned, otherwise the object is already connected |
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
GET-REMOTE-ERROR | The given connection is not known |
|
static |
returns a hash of the workflow execution instance info if the ID is valid or an empty hash if not
returns an empty hash if the workflow execution ID is not currently valid
id | workflow execution instance id |
name:
the name of the workflowversion:
version of the workflowworkflowid:
the workflowid of the workflowexecutionID:
the workflow execution instance id (same as the argument)mode:
OMQ::WM_Normal or OMQ::WM_Recoverysync:
True if the execution instance is synchronous, False if notstatus:
OMQ::WISInitializing, OMQ::WISRunning, OMQ::WISWaiting, OMQ::WISStoppingiterations:
number of segment iterations performed so fartotalSegments:
number of segments executederrors:
total number of errors encounteredwarnings:
total number of warnings raisedstarttime:
date/time the execution instance was startedoptions:
options set on the workflow execution instancelogfile:
log file nameremote:
True if the workflow is running as a remote qwf process, False if not
|
static |
returns a list of hashes giving information about the currently-running workflow execution instances
name | optional workflow name for filtering the result list |
ver | optional workflow version for filtering the result list (only used if name also passed) |
executionID:
the workflow execution instance idname:
the name of the workflowversion:
version of the workflowworkflowid:
the workflowid of the workflowmode:
OMQ::WM_Normal or OMQ::WM_Recoverysync:
True if the execution instance is synchronous, False if notstatus:
OMQ::WISInitializing, OMQ::WISRunning, OMQ::WISWaiting, OMQ::WISStoppingiterations:
number of segment iterations performed so fartotalSegments:
number of segments executederrors:
total number of errors encounteredwarnings:
total number of warnings raisedstarttime:
date/time the execution instance was startedoptions:
options set on the workflow execution instancelogfile:
log file nameremote:
True if the workflow is running as a remote qwf process, False if not
|
static |
returns information about the given service (if it's currently loaded)
to get information about services whether they are loaded or not, call:
type | the type of service (either "system" or "user" ; case is ignored) |
name | the name of the system service to query |
type:
either "system"
or "user"
corresponding to the argumentname:
the name of the serviceversion:
version of the servicepatch:
the patch string for the servicedesc:
description of the serviceauthor:
the author of the serviceserviceid:
service IDparse_options:
parse options for the servicestatus:
OMQ::SSRunning or OMQ::SSLoadedlog:
path to the service log fileactive_calls:
number of active service calls and persistent connection handlers currently in progresswaiting_threads:
number of threads waiting on the service (for a service reset or unload action)threads:
number of running threads in the serviceautostart:
True or False if the autostart flag is setmanual_autostart:
True or False the autostart value has been manually setloaded:
date/time the service was loadedmethods:
list of hashes for each method with name
and desc
keysresources:
list of service resourcesresource_files:
list of service file resourcesoptions:
service optionsgroups:
interface groups that the service belongs toalerts:
any alerts raised against the service
|
static |
returns the current Qorus application session ID
|
static |
get information about cached object
Resulting hash (keys are datasource names) of hashes (keys are cache types) of hashes (keys are names of individual cached objects) provides the information about given cached objects as a value. This information has the form of hash with the following keys:
|
static |
get a cached table object (suitable for DML) if present, otherwise it creates one from scratch
datasource | a DatasourcePool object for a Qorus datasource; note that if the Qore::SQL::DatasourcePool object cannot be matched back to a known Qorus datasource, an INVALID-DATASOURCE exception will be thrown |
table_name | the name of the table to be acquired; the handling of this parameter is identical to that in SqlUtil::Table::constructor(); names are converted to lower-case before performing the lookup and storage in the cache to ensure that the cache is based on case-insensitive lookups |
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
INVALID-DATASOURCE | this exception is thrown if the datasource argument cannot be matched to a known Qorus datasource |
INVALID-DATASOURCE
exceptions can be thrown with a valid Qorus datasource if the given datasource has been reset since it was acquired
|
static |
get a cached table object (suitable for DML) if present, otherwise it creates one from scratch
datasource | a Qorus datasource name |
table_name | the name of the table to be acquired; the handling of this parameter is identical to that in SqlUtil::Table::constructor(); names are converted to lower-case before performing the lookup and storage in the cache to ensure that the cache is based on case-insensitive lookups |
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
INVALID-DATASOURCE | this exception is thrown if the datasource argument cannot be matched to a known datasource |
|
static |
Returns a string stream for the file's data at the given location.
location | the location of the file data |
|
static |
returns a hash of system info
instance-key
: value of the system option by the same namesession-id
: the session ID for the current Qorus application sessionomq-version
: the version string for the Qorus serveromq-version-code
: a numeric code of the Qorus server version, where omq-version-code
= 50100)qore-version
: the version string for the qore build useddatamodel-version
: the datamodel version required by this version of Qorusomq-schema
: the datasource string for the system schema (without the password)omq-driver
: the DB driver name for the system schemaomquser-schema
: the datasource string for the user schema (without the password)starttime:
the date and time when the instance was startedhostname:
the hostname of the machine where the Qorus server is runningpid:
the PID of the Qorus server processthreads:
number of threads currently activeschema-properties
: a hash of schema properties with the following keys:omq-schema-version
omq-schema-compatibility
omq-load-schema-compatibility
logfile:
the path for the system log fileedition:
Enterprise
for Qorus Integration Engine(R) Enterprise Editiontz_region:
the server's time zone region nametz_utc_offset:
the UTC offset in seconds east of UTC; negative numbers indicate west of UTCedition
, tz_region, and tz_utc_offset keys
|
static |
returns information about the given system service (if it's currently loaded)
to get information about system services whether they are loaded or not, call:
name | the name of the system service to query |
type:
"system"
name:
the name of the serviceversion:
version of the servicedesc:
description of the serviceserviceid:
service IDstatus:
OMQ::SSRunning or OMQ::SSLoadedthreads:
number of running threads in the serviceautostart:
True or False if the autostart flag is setloaded:
date/time the service was loadedmethods:
list of hashes for each method with name
and desc
keys
|
static |
returns string data for the given file location
location | the location of the file data (ex: "resource://service-name:path/to/ressource" ); see File Locations for more information about this parameter |
LOCATION-ERROR | the location string cannot be parsed; unknown location scheme; invalid location option |
http(s)
locations
|
static |
Allows the current thread's call stack to be retrieved in Qorus.
Qore function ref Qore::get_thread_call_stack() is prohibited from use in Qorus interfaces due to sandboxing restrictions
|
static |
Returns information for the given token.
token | the access token to check |
refresh_token | if True then the token's validity period is refreshed |
|
static |
returns a data provider type identified by a path string
path | the path to the type (which will be normalized; any leading "/" character(s) will be stripped); the first element must be one of the following:
|
DATA-TYPE-ERROR | the given type is unknown |
|
static |
Returns an object corresponding to a defined user connection.
name | the name of the connection |
connect | if False an unconnected object will be returned, otherwise the object is already connected |
register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
rtopts | any runtime options accepted by the connection |
CONNECTION-ERROR | The given connection is not known |
|
static |
Returns any tags set on the given user connection.
name | the name of the connection |
CONNECTION-ERROR | The given connection is not known |
|
static |
returns a hash for the current user context
Key | Value |
type |
|
servicetype | the type of service ( |
name | the name of the service |
version | the version of the service |
id | the service id |
context_user | the current username context, if any |
Key | Value |
type |
|
name | the name of the job |
version | the version of the job |
id | the job id |
job_instanceid | the job_instanceid of the current job instance |
context_user | the current username context, if any |
Key | Value |
type |
|
name | the name of the workflow |
version | the version of the workflow |
id | the workflow id |
workflow_instanceid | the workflow_instanceid of the current workflow instance (if available) |
stepname | the name of the current step (if available) |
stepversion | the version of the current step (if available) |
stepid | the id of the current step (if available) |
ind | the name of the current step index (if available) |
execid | the execution ID of the current workflow execution instance (if available) |
context_user | the current username context, if any |
Key | Value |
input | any input data for the current finite state machine state |
|
static |
Returns information for the given user.
username | the user to query |
USER-ERROR | the user is not loaded |
|
static |
returns information about the given user service (if it's currently loaded)
to get information about user services whether they are loaded or not, call:
name | the name of the user service to query |
type:
"user"
name:
the name of the serviceversion:
version of the servicedesc:
description of the serviceserviceid:
service IDstatus:
OMQ::SSRunning or OMQ::SSLoadedthreads:
number of running threads in the serviceautostart:
True or False if the autostart flag is setloaded:
date/time the service was loadedmethods:
list of hashes for each method with name
and desc
keys
|
static |
Gets a lookup value from the value map by a key; the value map must be registered to the current interface.
mapname | name of the value map |
key | a key name |
VALUE-MAP-ERROR | the given value map is unknown or not registered to the current interface |
|
static |
Gets all value maps valid for the current interface.
"id"
: the internal ID of the value map"name"
: the name of the value map"description"
: a string describing the value map"author"
: the author tag"throws_exception"
: a tag that controls the behavior when an unknown mapping is referenced (Value Map Error Handling and Missing Data)"valuetype"
: the type of values in the map"created"
: the created time stamp"modified"
: the last modified time stamp
|
static |
Invalidates the given token.
token | the token to invalidated |
|
static |
returns True if internal system debugging is enabled
|
static |
|
static |
returns True when Qorus is running under Kubernetes
|
static |
|
static |
|
static |
|
static |
leaves feedback for a parent workflow
This call is a wrapper for WorkflowApi::leaveParentFeedback(); please see that method for documentation
FEEDBACK-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
args | the arguments for the format string msg |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
args | the arguments for the format string msg |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
args | the arguments for the format string msg |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
args | the arguments for the format string msg |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
args | the arguments for the format string msg |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
args | the arguments for the format string msg |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
|
static |
Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the interface logger level is equal or lower.
msg | the format string for a vsprintf() call with the remaining arguments |
|
static |
Writes to the current interface log file with the given log level.
level | log levels as defined by Logger::LoggerLevel |
msg | the format string for the log message, arguments follow |
|
static |
Writes to the current interface log file with the given log level.
level | log levels as defined by Logger::LoggerLevel |
msg | the format string for the log message, arguments follow |
|
static |
Writes to the current interface log file with the given log level.
level | log levels as defined by Logger::LoggerLevel |
msg | the format string for the log message |
args | optional argument to format specifiers in msg |
|
static |
Writes to the current interface log file with the given log level.
level | log levels as defined by Logger::LoggerLevel |
msg | the format string for the log message |
args | optional argument to format specifiers in msg |
|
static |
posts an unsuccessful SLA event for SLA monitoring and performance tracking
sla | the SLA name |
value | the SLA performance value |
err | the error code for the SLA event error |
desc | the error description for the SLA event error |
|
static |
posts a successful SLA event for SLA monitoring and performance tracking
sla | the SLA name |
value | the SLA performance value |
|
static |
posts a workflow synchronization event given the event type name and the unique event key
eventtype | the event type name |
eventkey | the event key in the event type queue to post |
UNKNOWN-EVENT | unknown event type name |
|
static |
posts an application event of class OMQ::QE_CLASS_USER
severity | see Error Severity Codes for possible values |
info | the user-defined information for the event |
POST-USER-EVENT-ERROR | invalid severity value |
|
static |
returns a hash of all system properties in all domains
|
static |
|
static |
returns the value of the given system property key in the given domain or NOTHING if the system property does not exist
|
static |
changes (inserts, updates, or deletes) the value of one or more system properties according to a hash argument
Updates the values of the properties in the domain corresponding to the top level keys of the hash passed and the keys corresponding to the second-level keys in the hash according to the rules for prop_update(domain, key, value) method.
The method returns a hash with "INSERT"
, "UPDATE"
, "DELETE"
and "IGNORED"
keys having integer values corresponding to the number of operations performed (deleting a non-existent key or domain causes a "IGNORED"
value to be returned).
All changes are made atomically in a single transaction.
h | in the format domain.key.value for updating, inserting, or deleting |
PROP-ERROR | serialized value exceeds 240 characters (column limit) |
UPDATE-ERROR | changes attempted in the "omq" domain |
|
static |
changes (inserts, updates, or deletes) the value of a single system property
Updates the value of the property in the domain passed. If the property does not exist, then it is created. If the value is NOTHING
(i.e. if no value is supplied) then the property will be deleted. Changes are committed to the database and the internal cache before the method call returns. No changes may be made in the system "omq"
domain.
domain | the domain of the property to set |
key | the key to set |
value | the value to set in the property domain; if no value is passed here, and the property exists, it will be deleted |
"INSERT"
, "UPDATE"
, "DELETE"
, "IGNORED"
(if a non-existent key should be deleted)PARAMETER-ERROR | if the domain or key arguments are empty strings |
PROP-ERROR | serialized value exceeds 240 characters (column limit) |
UPDATE-ERROR | changes attempted in the "omq" domain |
|
static |
returns a string giving the local system URL
username | an optional username for the new connection |
password | an optional password for the new connection |
|
static |
raises a transient system alert from a workflow, service, or job
alert | the name of the alert (ex: "DATA-SIZE-EXCEEDED" ) |
reason | the reason or verbose description of the alert |
info | optional key / value details for the alert |
|
static |
Refreshes the given token.
token | the access token to refreshed |
expiry_seconds | the new refresh interval; if not given then the original interval is used |
INVALID-TOKEN | thrown if the token was already invalid |
|
static |
Refreshes the given token.
token | the access token to refreshed |
expiry_seconds | the new refresh interval in seconds |
INVALID-TOKEN | thrown if the token was already invalid |
|
static |
Registers the given Finite State Machine with the given object as an Observer.
fsm_name | the name of the Finite State Machine to register with observable |
observable | the event source object |
event_id | the event ID to register with observable |
FSM-NOT-FOUND | The given Finite State Machine is not valid for the current interface context |
|
static |
returns a string error message if any exception in the chain passed was caused by a recoverable DB error, otherwise returns NOTHING
driver | the database driver name, which must be a driver supported by the Qorus system schema, currently one of "oracle" , "pgsql" , or "mysql" , otherwise an UNSUPPORTED-DRIVER exception is thrown |
ex | the exception hash |
UNSUPPORTED-DRIVER | only "oracle" , "pgsql" , and "mysql" are currently supported |
|
static |
returns Qorus runtime properties as a hash
|
static |
Saves the object in the object cache.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
returns a string giving the default serialization of the given data structure for storage in Qorus
the default serialization is currently YAML of Qore intermediate serialized data
d | the data to serialize |
|
static |
returns a string giving the default serialization of the given data structure for storage in Qorus
the default serialization is currently YAML of Qore intermediate serialized data
d | the data to serialize |
|
static |
Changes option values on a workflow, service, or job.
if called from workflow code, and the workflow has defined workflow options and an invalid option is passed to the method, an exception will be raised; however all other valid options in the hash will be set before the exception is raised
hash | a hash of option-value pairs |
WORKFLOW-OPTION-ERROR | invalid option name |
|
static |
This method will skip the execution of an asynchronous step.
This call is a wrapper for QorusAsyncStepBase::skipAsyncStep(); please see that method for documentation
ASYNC-STEP-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
skips a workflow synchronization event step
This call is a wrapper for QorusEventStepBase::skipEvent(); please see that method for documentation
EVENT-STEP-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
This method skips binding a workflow to a subworkflow step.
This call is a wrapper for QorusSubworkflowStepBase::skipSubworkflow(); please see that method for documentation
SUBWORKFLOW-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
puts the current thread to sleep for a certain number of seconds
If the job, workflow execution instance, or service is stopping, this method returns immediately with a return value of -1; otherwise the current thread is put to sleep for the full time period requested. If this method (or usleep()) is called again after -1 is returned, then a "STOP-ERROR"
exception is thrown.
arg | the number of seconds to sleep |
STOP-ERROR | the current object is stopping and this method already returned -1 as a warning |
|
static |
Starts capturing Qore objects created from Java APIs in the current interface's object cache.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
Starts capturing Qore objects created from Python APIs in the current interface's object cache.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
Stops capturing Qore objects created from Java APIs in the current interface's object cache.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
Stops capturing Qore objects created from Python APIs in the current interface's object cache.
NO-INTERFACE | thrown if there is no interface context; this API is only valid when called in a workflow, service, or job context |
|
static |
Binds the given key to the asynchronous step.
This call is a wrapper for QorusAsyncStepBase::submitAsyncKey(); please see that method for documentation
ASYNC-STEP-ERROR | in addition to exception thrown by the above function, this error is raised if this method is called when not in a workflow context |
|
static |
unblocks the given workflow order data instance
wfiid | the workflow order instance ID to unblock |
tempdata | optional workflow order tempdata to pass to the workflow order (will only be used if the order is immediately cached as a part of the unblockOrder() call) |
orderkeys | optional workflow order data keys |
workflow_status:
the status of the workflow orderBLOCK-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |
|
static |
uncancels the given workflow order data instance
wfiid | the workflow order instance ID to uncancel |
tempdata | temporary data to provide when uncanceling the order |
workflow_status:
the status of the workflow orderCANCEL-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |
|
static |
updates the given workflow order instance's dynamic data hash atomically
The given hash is merged to the order's dynamic data hash
wfiid | the workflow order instance ID to update |
new_data | the hash data to merge with the given order's dynamic data hash |
UPDATE-WORKFLOW-ERROR | foreign session id error |
|
static |
updates the given workflow order instance's dynamic data hash atomically
The given value is written to the path provided in the workflow order instance's dynamic data hash
wfiid | the workflow order instance ID to update |
path | the dotted path to the value to update |
value | the value to update in the location provided by path |
UPDATE-WORKFLOW-ERROR | foreign session id error |
|
static |
updates the given hash with a key in dot notation with the given value
var_data | the hash to update |
var_name | the key name to update in dot notation |
value | the value to set |
|
static |
updates all output data
all_output_data | a hash giving output data; keys in this hash must match a corresponding key in output_data_cfg which will provide the location for writing the value, values in this hash will be written to the locations provided in output_data_cfg |
output_data_cfg | a hash of values giving output data locations; if not provided, the default location for the output data config is retrieved from configuration item "output_data" ; all keys in this hash (other than "*" ) must also be present in all_output_data; string values of referenced keys in this hash provide the location to write the values of the all_output_data hash; these values are not subject to template variable expansion; note special key "*" which indicates that the entire all_output_data hash should be written to the output location; note that this value also accepts hash paths such as "key1.key2.key3" ; if a key contains a "." character, you must escape it with backslashes (ex: "key\.with\.dots" ); additionally, this method will throw an exception if any element in the hash does not resolve to a value; to ignore the situation when data is missing, append a "?" to the key name; ex: "key1.optional_key?.final_key" or "key2.key3.final_key?" ; in this case missing data is ignored and no exception is thrown. |
For a list of supported output fields for output_data_cfg values; see template strings listed in Config Item / Building Block Template Substitution Strings marked as writable (W
)
UNSUPPORTED-CONTEXT-ERROR | if output data configuration specifies an unsupported context |
OUTPUT-CONFIG-ERROR | field_name (without a "?" appended to the name) is not present in all_output_data |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
SET-ORDER-KEYS-ERROR | missing value for order key |
INVALID-WORKFLOW-KEY | workflow key not valid for the current workflow |
DUPLICATE-KEY-VALUE | duplicate value provided for order key |
"*"
in output_data_cfg, indicating that the entire output hash (all_output_data) should be written to the output location provided as the value to this keyall_output_data
to suppress the OUTPUT-CONFIG-ERROR
exception in case of missing data
|
static |
updates specified output data field's value
field_name | name of the field that should be updated; identifies a key in output_data_cfg that provides the location for writing the output data |
output_data | the value to write in the location determined by the field_name key in output_data_cfg |
output_data_cfg | a hash of values giving output data locations; if not provided, the default location for the output data config is retrieved from configuration item "output_data" ; field_name must be present in this hash; string values of the key referenced with field_name in this hash provide the location to write output_data and are not subject to template variable expansion |
UNSUPPORTED-CONTEXT-ERROR | if output data configuration specifies an unsupported context |
OUTPUT-CONFIG-ERROR | field_name is not present in output_data_cfg |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
SET-ORDER-KEYS-ERROR | missing value for order key |
INVALID-WORKFLOW-KEY | workflow key not valid for the current workflow |
DUPLICATE-KEY-VALUE | duplicate value provided for order key |
|
static |
puts the current thread to sleep for a certain number of microseconds
If the job, workflow execution instance, or service is stopping, this method returns immediately with a return value of -1; otherwise the current thread is put to sleep for the full time period requested. If this method (or sleep()) is called again after -1 is returned, then a "STOP-ERROR"
exception is thrown.
arg | the number of microseconds to sleep (1 microsecond = 1/1000000 of a second) |
STOP-ERROR | the current object is stopping and this method already returned -1 as a warning |
|
static |
puts the current thread to sleep for a certain number of microseconds
If the job, workflow execution instance, or service is stopping, this method returns immediately with a return value of -1; otherwise the current thread is put to sleep for the full time period requested. If this method (or sleep()) is called again after -1 is returned, then a "STOP-ERROR"
exception is thrown.
arg | the number of microseconds to sleep (1 microsecond = 1/1000000 of a second) |
STOP-ERROR | the current object is stopping and this method already returned -1 as a warning |
|
static |
Writes data to a file at the given location.
location | the location of the file data |
contents | the file contents to write to the location |
|
static |
Writes output data using a concise format.
output_data | a hash of output data; keys are template strings to be resolved to values; values are locations to write the data to; no value or an empty hash means the call is ignored |
"input"
key in this hash is set to any current input data when running in a finite state machine