Qorus Integration Engine®
4.0.3.p2_git
|
primary workflow API class More...
Static Public Member Methods | |
static string | generateUniqueKey () |
returns a unique async key for the order for use with QorusAsyncStepBase::submitAsyncKey() More... | |
static | stepError (string err, auto info) |
Raises an error against the current step without affecting the flow of processing. More... | |
static | stepError (string err, auto info, date retry_delay) |
Raises an error against the current step without affecting the flow of processing. More... | |
static | stepError (string err, auto info, int retry_delay) |
Raises an error against the current step without affecting the flow of processing. More... | |
static | stepWarning (string err, auto info) |
Raises a warning against the step. More... | |
static | stepWarning (string err, string fmt) |
Raises a warning against the step. More... | |
static | setRetryDelay (date delay) |
Sets the value of the retry delay for an asynchronous step. More... | |
static | setRetryDelay (int secs) |
Sets the value of the retry delay for an asynchronous step. More... | |
static *hash | getErrorInfo (string err) |
Returns the hash data associated with the error code passed as an argument. More... | |
static | updateDynamicData (hash hash) |
Updates the values of one or more keys in the workflow order data instance’s dynamic data hash. More... | |
static | deleteDynamicDataKey (softlist list) |
Deletes one or more keys from the workflow order data instance’s dynamic data hash. More... | |
static auto | getDynamicData () |
Retrieves the values of one or more keys from the workflow order data instance’s dynamic data hash. More... | |
static auto | getDynamicDataArgs (*softlist< auto > keylist) |
Retrieves the values of one or more keys from the workflow order data instance’s dynamic data hash. More... | |
static auto | getStaticData () |
Retrieves the values of one or more keys from the workflow order data instance’s static data hash. More... | |
static auto | getStaticDataArgs (*softlist< auto > keylist) |
Retrieves the values of one or more keys from the workflow order data instance’s static data hash. More... | |
static | updateTempData (hash hash) |
Updates the values of one or more keys in the workflow order data instance’s temporary data hash. More... | |
static auto | getTempData () |
Retrieves the values of one or more keys from the workflow order data instance’s temporary data hash. More... | |
static auto | getTempDataArgs (*softlist< auto > keylist) |
Retrieves the values of one or more keys from the workflow order data instance’s temporary data hash. More... | |
static | deleteTempDataKey (softlist list) |
Deletes one or more keys from the workflow order data instance’s temporary data hash. More... | |
static | updateSensitiveData (string skey, string svalue, hash hash, *softlist aliases, *hash meta) |
Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data key and value. More... | |
static | updateSensitiveDataFromAlias (string alias, hash hash, *hash meta) |
Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data alias. More... | |
static auto | getSensitiveMetadata (string skey, string svalue) |
Returns the sensitive metadata hash for the given sensitive data key and value if present, otherwise returns an empty hash. More... | |
static hash | getSensitiveMetadataFromAlias (string alias) |
returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of the sensitive metadata hash for the given sensitive data alias corresponding to a sensitive data key and value More... | |
static auto | getSensitiveData (string skey, string svalue) |
Returns the sensitive data for the given sensitive data key and value. More... | |
static auto | getSensitiveDataArgs (string skey, string svalue, *list< auto > keylist) |
Returns the sensitive data for the given sensitive data key and value. More... | |
static hash< auto > | getSensitiveDataFromAlias (string alias) |
returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of one or more keys in the workflow sensitive data hash for the given sensitive data alias corresponding to a sensitive data key and value More... | |
static hash< auto > | getSensitiveDataFromAliasArgs (string alias, *list< auto > keylist) |
returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of one or more keys in the workflow sensitive data hash for the given sensitive data alias corresponding to a sensitive data key and value More... | |
static hash< auto > | getSensitiveDataAliases () |
returns a hash of all sensitive data aliases for the current order or an empty hash if there are none More... | |
static bool | deleteSensitiveData (string skey, string svalue) |
Deletes the sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this method returns. More... | |
static bool | deleteSensitiveDataKey (string skey, string svalue, softlist list) |
Deletes one or more keys from the workflow order data instance’s sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this method returns. More... | |
static hash | getSensitiveDataKeyValues () |
Returns a hash of sensitive data keys and values saved against the order; the sensitive data hashes themselves are not returned, just the information used to index sensitive data against the order. More... | |
static | updateInstanceData (hash hash) |
Updates the values of one or more keys in the workflow execution instance’s instance data hash. More... | |
static | deleteInstanceDataKey (softlist list) |
Deletes a single key or a list of keys from the workflow execution instance’s instance data hash. More... | |
static auto | getInstanceData () |
Retrieves the values of one or more keys from the workflow execution instance’s instance data hash. More... | |
static auto | getInstanceDataArgs (*list< auto > keylist) |
Retrieves the values of one or more keys from the workflow execution instance’s instance data hash. More... | |
static auto | getWorkflowInstanceData (string field) |
Retrieves the value of a single key (system-defined property) from the workflow execution instance object itself. More... | |
static hash | getWorkflowInstanceData () |
Retrieves the values of multiple keys (system-defined properties) from the workflow execution instance object itself. More... | |
static hash | getWorkflowInstanceDataArgs (*list< auto > keylist) |
Retrieves the values of one or more keys (system-defined properties) from the workflow execution instance object itself as a hash. More... | |
static | setOrderKeys (hash h, bool truncate=False) |
This method sets user-defined order keys against an order, so that the workflow order data instance can be quickly searched and retrieved using the key value. More... | |
static | setOrderKey (string key, softlist< softstring > value, bool truncate=False) |
This method sets the values for a sinle user-defined order key against an order, so that the workflow order data instance can be quickly searched and retrieved using the key value. More... | |
static | appendOrderKeys (hash< auto > h, bool truncate=False) |
This method appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value. More... | |
static | appendOrderKeys (string key, softlist< softstring > value, bool truncate=False) |
This method appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value. More... | |
static auto | getOrderKeys () |
This method retrieves the user-defined order key information saved against the workflow order data instance. More... | |
static auto | getOrderKeysArgs (*softlist< auto > keylist) |
This method retrieves the user-defined order key information saved against the workflow order data instance. More... | |
static bool | stepExecuted (string stepname) |
This method returns True if the step passed has been executed and has status OMQ::StatComplete ("C" ) More... | |
static *string | getStepStatus (string stepname) |
Returns the current status of the given step for the current workflow order instance. More... | |
static *hash | getStepInfo () |
This method will return a hash of step information for the current step. More... | |
static hash< auto > | getWorkflowMetadata () |
returns workflow metadata for the currently running workflow as a hash More... | |
static | setBlocked () |
set the current workflow order status to OMQ::StatBlocked, can only be called from the attach function More... | |
static list | getOrderNotes (*int count) |
Get Order Instance Notes. More... | |
static | addOrderNote (string notestr) |
Add new note as described in Order Instance Notes. More... | |
static | setCustomStatus (string stat) |
Sets a user-defined custom status for the current step. More... | |
static | rescheduleOrder (date scheduled) |
reschedules the current workflow order instance for later processing More... | |
static | reprioritizeOrder (int prio) |
changes the order priority for the current workflow order instance 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 *hash | getChildFeedback () |
gets all feedback from all child workflow orders as a hash More... | |
static | setOption (hash hash) |
Changes option values on a workflow. More... | |
static | setOption (string option, auto value) |
Changes a single option value on a workflow. More... | |
static auto | getOption () |
Returns the value of the named workflow option(s) More... | |
static auto | getOptionArgs (*softlist< string > args) |
Returns the value of the named workflow option or options. More... | |
static *softint | parentWfiid () |
Returns the parent workflow order data instance ID from a subworkflow or NOTHING if the current workflow order is not a subworkflow and therefore has no parent. More... | |
static *softint | getWfiid () |
returns the current workflow_instanceid as an integer; returns NOTHING if not called in a workflow order context (ex: onetimeinit function, etc) 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 int | usleep (date arg) |
puts the current thread to sleep for a certain number of microseconds More... | |
static auto | getConfigItemValue (string item, *hash< auto > local_context) |
returns the value of the given step configuration item More... | |
static hash< auto > | getConfigItemHash (*hash< auto > local_context) |
returns a hash of all configuration items for the current step More... | |
Static Public Member Methods inherited from OMQ::UserApi::UserApi | |
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 | 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 params, string status=StatReady) |
creates a workflow order data instance in the database More... | |
static softint | createRemoteOrder (string remote, string name, *string version, hash 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 sdata, *hash opts, *hash ddata, softint priority=DefaultOrderPriority, *hash 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 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 args) |
calls a system RPC API with authentication information (username and password) More... | |
static auto | callNetworkApiArgs (string call, softlist 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 | getSystemInfo () |
returns a hash of system info More... | |
static int | getSessionId () |
returns the current Qorus application session ID 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 | 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 event 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 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 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 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 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 *hash< auto > | getUserContextInfo () |
returns a hash for the current user context More... | |
static auto | getConfigItemValue (string cfg_item, *hash< auto > local_context) |
returns config item value in the current user context More... | |
static hash< auto > | getConfigItemHash (*hash< auto > local_context) |
returns a hash of all configuration items for the current interface More... | |
static auto | getGlobalConfigItemValue (string item, *hash< auto > local_context) |
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) |
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 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 | |
static auto | getHashDotValue (*hash< auto > var_data, string var_name) |
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, string var_name, *hash< auto > local_context, *bool brackets) |
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) |
expands all variables in a templated string 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)) |
updates all output data 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... | |
primary workflow API class
|
static |
|
static |
This method appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value.
The hash provided appends orders keys to the workflow order; existing order keys matching keys given in the hash provided as an argument to this method are updated and any new keys are added.
The data is committed to the database before the method returns.
h | key-value pairs to append to workflow order keys; the keys in this hash must match those defined for the workflow |
truncate | allow key values to be truncated without an error |
APPEND-ORDER-KEYS-ERROR | empty hash passed to wf_append_order_keys() |
INVALID-WORKFLOW-KEY | invalid key for workflow |
SET-ORDER-KEYS-ERROR | an invalid data type (not convertible to a string) was given as a key value |
|
static |
This method appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value.
This method appends order keys to the workflow order; existing order keys matching keys given in the arguments provided are updated and any new keys are added.
The data is committed to the database before the method returns.
key | the workflow order key to append to; this key must match a defined workflow order key |
value | one or more values to append for the given key |
truncate | allow key values to be truncated without an error |
APPEND-ORDER-KEYS-ERROR | empty hash passed to wf_append_order_keys() |
INVALID-WORKFLOW-KEY | invalid key for workflow |
DUPLICATE-KEY-VALUE | an order key was assigned a value more than once |
|
static |
Deletes one or more keys from the workflow order data instance’s dynamic data hash.
Dynamic data is directly linked to the order data the workflow execution instance is processing.
Changes are committed to the database before the method returns.
list | a single key or a list of keys to delete in the workflow order's dynamic data |
|
static |
Deletes a single key or a list of keys from the workflow execution instance’s instance data hash.
list | a single key or a list of strings (keys) to delete in workflow execution instance data |
|
static |
Deletes the sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this method returns.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
|
static |
Deletes one or more keys from the workflow order data instance’s sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this method returns.
Changes are committed to the database before the method returns.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
list | a single key or a list of keys to delete in the workflow order's sensitive data hash for the given sensitive key-value pair |
|
static |
Deletes one or more keys from the workflow order data instance’s temporary data hash.
list | a single key or a a list of strings (keys) to delete in workflow temporary data |
|
static |
returns a unique async key for the order for use with QorusAsyncStepBase::submitAsyncKey()
the generated key uses the workflow_instanceid, stepid, and ind number for the step to generate a unique key. Another alterative would be to call UUID::get()
|
static |
gets feedback from a child workflow order with the given key
the child workflow has to set a value with the given key first with leaveParentFeedback() for any value to be returned with this method call
key | the feedback key name used by the child workflow |
|
static |
gets all feedback from all child workflow orders as a hash
child workflows have to set feedback values with leaveParentFeedback() for any value to be returned with this method call
|
static |
returns a hash of all configuration items for the current step
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
|
static |
returns the value of the given step configuration item
item | the name of the step configuration item; step configuration item values take precedence over values on workflow level. Values on workflow level take precedence over values on global level. If there is no value on the previous levels then the default value is returned. |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see UserApi::getUserContextInfo() method) |
CONFIG-ITEM-ERROR | thrown if the configuration item is not valid |
"$"
characters with a backslash ("\"
) to avoid template substitution
|
static |
Retrieves the values of one or more keys from the workflow order data instance’s dynamic data hash.
Dynamic data is directly linked to the order data the workflow execution instance is processing.
Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested
|
static |
Retrieves the values of one or more keys from the workflow order data instance’s dynamic data hash.
Dynamic data is directly linked to the order data the workflow execution instance is processing.
keylist | for a single string argument, the value of that key is returned, for a list of strings, a hash is returned giving the values of all the keys requested |
Returns the hash data associated with the error code passed as an argument.
err | the error name |
|
static |
Retrieves the values of one or more keys from the workflow execution instance’s instance data hash.
This data is set by the user (by calling wf_update_instance_data()) and is not associated to the order data being processed, but rather directly with the workflow execution instance. In this sense, this data is similar to global variables in a program.
Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested.
|
static |
Retrieves the values of one or more keys from the workflow execution instance’s instance data hash.
This data is set by the user (by calling wf_update_instance_data()) and is not associated to the order data being processed, but rather directly with the workflow execution instance. In this sense, this data is similar to global variables in a program.
Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested.
|
static |
Returns the value of the named workflow option(s)
If the option is not set on the workflow level, 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 option or options.
If the option is not set on the workflow, 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 |
This method retrieves the user-defined order key information saved against the workflow order data instance.
Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested. Pass NOTHING to the method to get a hash of all keys (if any are set).
|
static |
This method retrieves the user-defined order key information saved against the workflow order data instance.
keylist | for a single string argument, te value of that key is returned, for a list of strings, a hash is returned giving the values of all the keys requested. Pass NOTHING to the method to get a hash of all keys (if any are set). |
Get Order Instance Notes.
count | an optional integer to limit the list size |
|
static |
Returns the sensitive data for the given sensitive data key and value.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
... | any sensitive data keys for the given key and value |
|
static |
returns a hash of all sensitive data aliases for the current order or an empty hash if there are none
|
static |
Returns the sensitive data for the given sensitive data key and value.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
keylist | any sensitive data keys for the given key and value |
|
static |
returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of one or more keys in the workflow sensitive data hash for the given sensitive data alias corresponding to a sensitive data key and value
alias | the alias to lookup; if the alias is unknown, an INVALID-ALIAS exception is raised |
... | zero or more string key fields to return |
INVALID-ALIAS | the given alias is unknown |
|
static |
returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of one or more keys in the workflow sensitive data hash for the given sensitive data alias corresponding to a sensitive data key and value
alias | the alias to lookup; if the alias is unknown, an INVALID-ALIAS exception is raised |
keylist | zero or more string key fields to return |
INVALID-ALIAS | the given alias is unknown |
|
static |
Returns a hash of sensitive data keys and values saved against the order; the sensitive data hashes themselves are not returned, just the information used to index sensitive data against the order.
|
static |
Returns the sensitive metadata hash for the given sensitive data key and value if present, otherwise returns an empty hash.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
|
static |
returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of the sensitive metadata hash for the given sensitive data alias corresponding to a sensitive data key and value
alias | the alias to lookup; if the alias is unknown, an INVALID-ALIAS exception is raised |
INVALID-ALIAS | the given alias is unknown |
|
static |
Retrieves the values of one or more keys from the workflow order data instance’s static data hash.
Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested
Workflow order static data corresponds to the deserialized contents of the database field ORDER_INSTANCE.STATICDATA
for the current workflow order data instance.
|
static |
Retrieves the values of one or more keys from the workflow order data instance’s static data hash.
Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested
Workflow order static data corresponds to the deserialized contents of the database field ORDER_INSTANCE.STATICDATA
for the current workflow order data instance.
|
static |
This method will return a hash of step information for the current step.
stepid:
the ID of the stepname:
the name of the steppatch
]: the patch string for the stepdesc
]: the description of the stepversion:
the version of the stepsteptype:
OMQ::ExecNormal, OMQ::ExecSubWorkflow, or OMQ::ExecAsyncarraytype:
either OMQ::ArraySeries or OMQ::ArrayNone for non-array stepsindex:
the element number for array steps (always 0 for non-array steps)array_size
]: the number of elements in the array for array stepsstepstatus
]: the previous step status when called from a workflow execution instance run in OMQ::WM_Recovery moderetries
]: the current retry number when called from a workflow execution instance run in OMQ::WM_Recovery modestep_classid
]: the class ID of the step's class for class-based steps; either this value or stepfunction_instanceid
will be returnedstepfunction_instanceid
]: the function instance ID of the primary step function for function-based stepssfname
]: the name of the primary step function for function-based stepsvalidationfunction_instanceid
]: the function instance ID of the validation function for function-based stepsvfname
]: the name of the validation function (corresponds to validationfunction_instanceid
) for function-based stepsendfunction_instanceid
]: the function instance ID of the asynchronous end function for asynchronous steps for function-based asynchronous stepsefname
]: the name of the end function (corresponds to endfunction_instanceid
) for function-based asynchronous stepsarrayfunction_instanceid
]: the function instance ID of the array function for function-based array stepsafname
]: the name of the array function (corresponds to arrayfunction_instanceid
) for function-based array stepsqueueid
]: the ID of the asynchronous queue for asynchronous steps for function-based asynchronous stepsqueuename
]: the name of the asynchronous queue (corresponds to queueid
) for function-based asynchronous stepsworkflow_event_typeid
]: the event type ID for workflow synchronization event steps for workflow synchronization event stepseventtype
]: the name of the event type (corresponds to workflow_event_typeid
) for workflow synchronization event stepsReturns the current status of the given step for the current workflow order instance.
If the step name does not exist then an exception is thrown
|
static |
Retrieves the values of one or more keys from the workflow order data instance’s temporary data hash.
|
static |
Retrieves the values of one or more keys from the workflow order data instance’s temporary data hash.
|
static |
returns the current workflow_instanceid as an integer; returns NOTHING if not called in a workflow order context (ex: onetimeinit function, etc)
|
static |
Retrieves the value of a single key (system-defined property) from the workflow execution instance object itself.
field | the workflow execution instance key; see Running Workflow Execution Instance Properties for valid keys |
|
static |
Retrieves the values of multiple keys (system-defined properties) from the workflow execution instance object itself.
Pass a list of string keys, in which case a hash is returned giving the values of all the keys requested; see Running Workflow Execution Instance Properties for valid keys; if no arguments are passed, then a hash of all possible keys is returned
GET-WORKFLOW-INSTANCE-DATA-ERROR | invalid arguments to method |
|
static |
Retrieves the values of one or more keys (system-defined properties) from the workflow execution instance object itself as a hash.
keylist | a list of string keys; see Running Workflow Execution Instance Properties for valid keys; if no arguments are passed, then a hash of all possible keys is returned |
GET-WORKFLOW-INSTANCE-DATA-ERROR | invalid arguments to method |
|
static |
returns workflow metadata for the currently running workflow as a hash
|
static |
leaves feedback for a parent workflow
When this call returns, the feedback data has already been committed to the database.
key | the key name for the feedback in the parent workflow |
value | the value of the key |
FEEDBACK-ERROR | the current workflow is not a subworkflow; value is NOTHING or an error occurred accessing the parent workflow order |
SESSION-ERROR | the parent workflow order is being processed by another Qorus session |
STATUS-ERROR | the parent workflow order is already COMPLETE or CANCELED and cannot be updated |
The parent workflow should then call getChildFeedback() to get the feedback data left by the child workflow.
|
static |
|
static |
changes the order priority for the current workflow order instance
prio | must be an integer >= 0 and <= 999 |
|
static |
reschedules the current workflow order instance for later processing
Can only be called in the attach function; calling anywhere else will cause an exception to be raised. Can only be called when the workflow order has status OMQ::StatReady or OMQ::StatScheduled; otherwise an exception will be raised.
scheduled | If the date is ealier than the current time; then this call is ignored |
RESCHEDULE-ERROR | method not called from the attach function; order data does not have OMQ::StatReady or OMQ::StatScheduled status |
|
static |
set the current workflow order status to OMQ::StatBlocked, can only be called from the attach function
Processing of the workflow order will stop after this call; in order to be further processed the workflow order must be unblocked
BLOCK-ERROR | method not called from attach function |
|
static |
Sets a user-defined custom status for the current step.
The custom status is also propagatef to the segment and workflow order data instances. The status is reset when the step is updated subsequently. The value of the custom status is only used for display purposes; it does not affect Qorus’ internal behavior at all.
stat | the custom user-defined status to set for the step |
CUSTOM-STATUS-ERROR | this exception is thrown if this method is called outside of step code |
|
static |
Changes option values on a workflow.
If the workflow has defined workflow options, and at least one 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 |
Changes a single option value on a workflow.
If the workflow has defined workflow options and an invalid option is passed to the method, an exception will be raised.
option | the option to set |
value | the value to set for the option |
WORKFLOW-OPTION-ERROR | invalid option name |
|
static |
This method sets the values for a sinle user-defined order key against an order, so that the workflow order data instance can be quickly searched and retrieved using the key value.
The value provided replaces any order key value on the workflow order
The data is committed to the database before the method returns.
key | the workflow key to set; must be a valid workflow key |
value | one or more values for the workflow key |
truncate | allow key values to be truncated without an error |
INVALID-WORKFLOW-KEY | invalid key for workflow |
DUPLICATE-KEY-VALUE | an order key was assigned a value more than once |
This method sets user-defined order keys against an order, so that the workflow order data instance can be quickly searched and retrieved using the key value.
The hash provided replaces orders keys on the workflow order; existing order keys matching keys given in the hash provided as an argument to this method are replaced and any new keys in the hash are added.
The data is committed to the database before the method returns.
h | key-value pairs to set for order keys; the keys in this hash must match those defined for the workflow |
truncate | allow key values to be truncated without an error |
SET-ORDER-KEYS-ERROR | empty hash passed to wf_set_order_keys() |
INVALID-WORKFLOW-KEY | invalid key for workflow |
DUPLICATE-KEY-VALUE | an order key was assigned a value more than once |
|
static |
Sets the value of the retry delay for an asynchronous step.
Only takes effect when called from an asynchronous step that will receive an OMQ::StatAsyncWaiting ("A"
) status or when called from a normal step after an error has been raised that will cause the step to get a OMQ::StatRetry ("R"
) status. Note that if this method is called before an error is raised, the retry delay setting will be lost.
Otherwise, to affect the retry of a normal step when an error has been raised that will give the step a status of OMQ::StatRetry ("R"
), you can also use the stepError() method with the optional third argument giving the retry delay instead of calling this method after the call to stepError().
delay | the amount of time to wait until a retry is made; overrides any value in the error definition |
|
static |
Sets the value of the retry delay for an asynchronous step.
Only takes effect when called from an asynchronous step that will receive an OMQ::StatAsyncWaiting ("A"
) status or when called from a normal step after an error has been raised that will cause the step to get a OMQ::StatRetry ("R"
) status. Note that if this method is called before an error is raised, the retry delay setting will be lost.
Otherwise, to affect the retry of a normal step when an error has been raised that will give the step a status of OMQ::StatRetry ("R"
), you can also use the stepError() method with the optional third argument giving the retry delay instead of calling this method after the call to stepError().
secs | the amount of time in seconds to wait until a retry is made; overrides any value in the error definition |
|
static |
puts the current thread to sleep for a certain number of seconds
If the workflow 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 |
Raises an error against the current step without affecting the flow of processing.
This method will affect the final status of the step, segment, and workflow, if the severity of the error is OMQ::ES_Major or OMQ::ES_Fatal. If the error raised is not defined, severity OMQ::ES_Major is assumed.
err | the string error code |
info | additional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history |
|
static |
Raises an error against the current step without affecting the flow of processing.
This method will affect the final status of the step, segment, and workflow, if the severity of the error is OMQ::ES_Major or OMQ::ES_Fatal. If the error raised is not defined, severity OMQ::ES_Major is assumed.
err | the string error code |
info | additional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history |
retry_delay | the amount of time to wait until a retry is made; overrides any value in the error definition; this may be either a relative date/time value (in which case the value is added to the current time to arrive at an absolute date/time value), or an absolute date/time value, giving the earliest date/time that the error will be retried |
|
static |
Raises an error against the current step without affecting the flow of processing.
This method will affect the final status of the step, segment, and workflow, if the severity of the error is OMQ::ES_Major or OMQ::ES_Fatal. If the error raised is not defined, severity OMQ::ES_Major is assumed.
err | the string error code |
info | additional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history |
retry_delay | the amount of time in seconds to wait until a retry is made; overrides any value in the error definition |
|
static |
This method returns True if the step passed has been executed and has status OMQ::StatComplete ("C"
)
If the step name does not exist then an exception is thrown
"C"
)
|
static |
Raises a warning against the step.
The information is logged, but does not affect the step’s status.
err | the string error code |
info | additional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history |
Raises a warning against the step.
The information is logged, but does not affect the step’s status.
err | the string error code |
fmt | a format string to format additional arguments |
|
static |
Updates the values of one or more keys in the workflow order data instance’s dynamic data hash.
Dynamic data is directly linked to the order data the workflow execution instance is processing.
Changes are committed to the database before the method returns.
hash | the key-value pairs to update in dynamic data |
|
static |
Updates the values of one or more keys in the workflow execution instance’s instance data hash.
hash | the key-value pairs to update in workflow execution instance data |
|
static |
Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data key and value.
skey | the type of value provided in svalue; must not be longer than 100 bytes long or a SENSITIVE-DATA-ERROR exception is raised |
svalue | the value of the sensitive data key identified by skey; if this string is empty or longer than 100 bytes, a SENSITIVE-DATA-ERROR exception is raised |
hash | the data to create or update against skey; existing keys will be replaced; new keys will be added; if the new hash does not refer to existing keys, then those existing keys remain untouched |
aliases | other values for the sensitive data |
meta | optional sensitve data metadata with the following recommended keys:
|
SENSITIVE-DATA-ERROR | no sensitive key value was provided; sensitive key value too long (100 bytes maximum length in the encoding used by the system schema) |
|
static |
Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data alias.
alias | the alias to use for updating the data; if the alias is unknown, an INVALID-ALIAS exception is raised |
hash | the data to create or update against skey; existing keys will be replaced; new keys will be added; if the new hash does not refer to existing keys, then those existing keys remain untouched |
meta | optional sensitve data metadata with the following recommended keys:
|
INVALID-ALIAS | the alias given is unknown |
|
static |
Updates the values of one or more keys in the workflow order data instance’s temporary data hash.
hash | the key-value pairs to update in workflow temporary data |
|
static |
puts the current thread to sleep for a certain number of microseconds
If the workflow 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 |
puts the current thread to sleep for a certain number of microseconds
If the workflow 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 amount of time in 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 |