Qorus Integration Engine®  4.0.3.p2_git
OMQ::UserApi Namespace Reference

user API namespace root More...

Namespaces

 Job
 main job API namespace
 
 Service
 Qorus service API namespace.
 
 Workflow
 main workflow API namespace
 

Classes

class  QorusConfigurationItemProvider
 Base class for object providing configuration items. More...
 
class  UserApi
 main common Qorus API class More...
 

Functions

auto _priv_get_list_arg_value (list< auto > var_data, string exp)
 
auto _priv_get_complex_value (*auto var_data, list< hash< DotInfo >> dot_info_list)
 
deprecated public auto getOracleNumber (auto v)
 returns a string suitable for dynamic SQL More...
 
deprecated public auto getSQLNumber (auto v)
 returns a string suitable for dynamic SQL More...
 
deprecated public auto get_sql_number (auto v)
 returns either the value returned or the string "NULL" if the type cannot be converted to a number More...
 
deprecated public string getOracleString (auto v, int size=0)
 returns a string suitable for dynamic SQL More...
 
deprecated public string getSQLString (auto v, int size=0)
 returns a string suitable for dynamic SQL More...
 
deprecated public string get_sql_string (auto v, int size=0)
 returns a singly-quoted string aimed to be directly usable in dynamic SQL queries with single quote (\') characters escaped or returns the string "NULL" if the argument type is not int, float, bool, or string More...
 
deprecated public string fix_quotes (string str)
 doubles single quotes (\') in strings and returns the new string More...
 
deprecated public string fix_quotes (reference str)
 doubles single quotes (\') in strings and returns the new string More...
 
deprecated public string make_select_list (auto list)
 returns a string based on a list, processed for the values in the list to be used in an SQL string with an Oracle DB More...
 
deprecated public string make_select_list2 (auto driver, auto list)
 returns a string based on a list, processed for the values in the list to be used in a dynamic SQL string More...
 
public list< auto > remove_from_list (list< auto > list, auto val)
 uses the select operator to remove all occurences of a value from a list More...
 
public list< auto > remove_from_list (reference list, auto val)
 uses the select operator to remove all occurences of a value from a list More...
 
deprecated public list< auto > remove_from_list_index (list< auto > list, int index)
 remove an element from a list More...
 
deprecated public string oracle_date (date date)
 returns a string from a date suitable for use in a dynamic oracle SQL string More...
 
deprecated public string db_date (string driver, date date)
 returns a string from a date suitable for use in a dynamic SQL string depending on the driver More...
 
deprecated public string create_sql_string ()
 returns a string suitable for use in a dyanamic Oracle SQL query string based on the arguments passed More...
 
deprecated public string create_sql_string2 (auto driver)
 returns a string suitable for use in a dynamic SQL query string (driver-dependent) based on the arguments passed More...
 
public string xml_change_encoding (string xml, string enc)
 returns a string with the XML encoding name changed to that given as an argument More...
 
public string xml_get_encoding (string xml)
 returns the XML encoding name given in the string (not the actual string encoding, which may be different) More...
 
deprecated public bool parseBoolean (auto v)
 
deprecated public string get_exception_string (hash< auto > ex)
 
deprecated public int compareVersion (string lv, string rv)
 
public string serialize_qorus_data (auto d)
 returns a string giving the default serialization of the given data structure for storage in Qorus More...
 
public auto deserialize_qorus_data (string data)
 parses serialized data in either XML-RPC or YAML format and returns the corresponding qore data More...
 
public string get_salted_string (string str, binary salt)
 returns a string that has been x-ored with binary "salt" data
 
public softint next_sequence_value (AbstractDatasource ds, string name)
 returns the next sequence value for the given sequence
 
public string get_ds_desc (hash< auto > h, *int dd_opts)
 returns a datasource description string from a datasource configuration hash More...
 
public list< hash< CallStackInfo > > get_thread_call_stack ()
 allows Qore::get_thread_call_stack() to be called from Qorus interfaces More...
 
public *string restart_transaction (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...
 
*hash< auto > get_user_service_info (string name)
 returns information about the given user service (if it's currently loaded) More...
 
SqlUtil::AbstractTable get_sql_table (string datasource, string table_name)
 get a cached table object (suitable for DML) if present, otherwise it creates one from scratch More...
 
SqlUtil::AbstractTable get_sql_table (AbstractDatasource datasource, string table_name)
 get a cached table object (suitable for DML) if present, otherwise it creates one from scratch More...
 
hash< auto > get_sql_cache_info ()
 get information about cached object More...
 
 clear_sql_table_cache (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...
 
 clear_sql_table_cache (AbstractDatasource datasource, *string table_name)
 clears cached objects for given datasource (for example, if database objects have been updated in the dataserver) More...
 
auto get_value_map (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...
 
list get_value_maps ()
 Gets all value maps valid for the current interface. More...
 
bool post_sla_event_success (string sla, number value)
 posts a successful SLA event for SLA monitoring and performance tracking More...
 
bool post_sla_event_error (string sla, number value, string err, string desc)
 posts an unsuccessful SLA event for SLA monitoring and performance tracking More...
 
 flush_sla_events ()
 flushes all pending SLA events to disk and returns after the data has been committed More...
 
*hash get_system_service_info (string name)
 returns information about the given system service (if it's currently loaded) More...
 
*hash< auto > get_service_info (string type, string name)
 returns information about the given service (if it's currently loaded) More...
 
list< auto > get_running_workflow_list (*string name, *string ver)
 returns a list of hashes giving information about the currently-running workflow execution instances More...
 
hash get_running_workflow_info (softint id)
 returns a hash of the workflow execution instance info if the ID is valid or an empty hash if not More...
 
softstring create_order (string name, *string version, hash params, string status=StatReady)
 creates a workflow order data instance in the database More...
 
softstring create_remote_order (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...
 
hash< auto > exec_synchronous_workflow (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...
 
int post_user_event (string severity, auto info)
 posts an application event of class QE_CLASS_USER More...
 
hash runtime_properties ()
 returns Qorus runtime properties as a hash More...
 
auto call_network_api_args_with_authentication (string user, string pass, string call, softlist args)
 calls a system RPC API with authentication information (username and password) More...
 
auto call_network_api_args (string call, softlist args)
 calls a system RPC API with the argument list to the API method as a top-level argument to this function; the API is called with system permissions (no restrictions) More...
 
auto call_network_api (string call)
 calls a system RPC API and returns the result; the API is called with system permissions (no restrictions) More...
 
auto call_rest_api (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...
 
auto call_rest_api_with_authentication (string user, string pass, string method, string path, *hash body_args)
 calls a system REST API method with authentication information (username and password) and returns the result More...
 
hash get_system_info ()
 returns a hash of system info More...
 
int get_session_id ()
 returns the current Qorus application session ID More...
 
 log (softint lvl, softstring msg)
 Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the log level passed is equal to or lower than value of the system option qorus.verbose. More...
 
*int audit_user_event (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...
 
bool audit_check_event_string (string opt)
 checks if the given audit event (given as a string) is enabled More...
 
bool audit_check_event (softint opt)
 checks if the given audit event (given as an integer code) is enabled More...
 
int audit_get_mask ()
 returns the audit event mask More...
 
int omqsleep (softint arg)
 puts the current thread to sleep for a certain number of seconds More...
 
int omqusleep (softint arg)
 puts the current thread to sleep for a certain number of microseconds More...
 
auto get_qorus_options ()
 returns the value of the given system option or options More...
 
hash get_qorus_option_info ()
 returns a hash giving information about system options More...
 
auto get_qorus_options_args (softlist args)
 returns the value of the given system option or options More...
 
hash get_qorus_option_info_args (softlist args)
 returns a hash giving information about system options More...
 
hash get_active_jobs ()
 Returns information on all active jobs visible to the calling user. More...
 
object get_user_connection (string name, bool connect=True, bool register_dependency=True, *hash< auto > rtopts)
 Returns an object corresponding to a defined user connection. More...
 
deprecated Qore::SQL::Datasource get_datasource_shared (string name, bool register_dependency=True)
 Returns a shared Datasource object with autocommit turned on from the given datasource name. More...
 
Qore::SQL::Datasource get_datasource_dedicated (string name, bool register_dependency=True)
 returns a new, dedicated Datasource object, suitable for transaction management for long-running transactions More...
 
AbstractDatasource get_datasource_pool (string name, bool register_dependency=True)
 returns a DatasourcePool object for the given datasource name More...
 
hash get_datasource_info (string name)
 returns a hash of information for the given datasource, if known, otherwise throws an exception More...
 
QorusSystemAPIHelper get_remote_rpc_connection (string name, bool connect=True, bool register_dependency=True)
 Returns a new QorusSystemAPIHelper object corresponding to a defined Qorus remote connection. More...
 
QorusSystemRestHelper get_remote_rest_connection (string name, bool connect=True, bool register_dependency=True)
 Returns a new QorusSystemRestHelper object corresponding to a defined Qorus remote connection. More...
 
 raise_transient_alert (string alert, string reason, *hash info)
 raises a transient system alert from a workflow, service, or job More...
 
string qorus_get_local_url (*string username, *string password)
 returns a string giving the local system URL More...
 
 set_option (hash< auto > hash)
 Changes option values on a workflow, service, or job. More...
 
auto get_option ()
 Returns the value of the named workflow, service, or job option or options. More...
 
hash< auto > block_order (softint wfiid)
 block the given workflow order data instance More...
 
hash< auto > unblock_order (softint wfiid, *hash< auto > tempdata, *hash< auto > orderkeys)
 unblocks the given workflow order data instance More...
 
hash cancel_order (softint wfiid)
 cancel the given workflow order data instance More...
 
hash< auto > uncancel_order (softint wfiid, *hash< auto > tempdata)
 uncancels the given workflow order data instance More...
 
*hash< auto > get_user_context_info ()
 returns a hash for the current user context More...
 
auto get_global_config_item_value (string item)
 returns the value of the given global configuration item; throws an exception if no such global configuration item exists More...
 
auto get_global_config_item_value_with_default (string item, auto default_value)
 returns the value of the given global configuration item; throws an exception if no such global configuration item exists More...
 
Mapper::Mapper get_mapper (string name, *hash< auto > rtopts)
 returns the given mapper if registered for the current interface More...
 
Qore::AbstractIterator get_mapper_iterator (string name, Qore::AbstractIterator input, *hash rtopts)
 returns an iterator for the named mapper using the iterator argument for input More...
 
bool post_sync_event (string eventtype, string eventkey)
 posts a workflow synchronization event given the event type name and the unique event key More...
 
hash< auto > prop_get ()
 returns a hash of all system properties in all domains More...
 
*hash< auto > prop_get (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...
 
auto prop_get (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...
 
string prop_update (string domain, softstring key, auto value)
 changes (inserts, updates, or deletes) the value of a single system property More...
 
hash< auto > prop_update (hash< auto > h)
 changes (inserts, updates, or deletes) the value of one or more system properties according to a hash argument More...
 
deprecated any getOption ()
 
deprecated setOption (hash hash)
 
*hash getSystemServiceInfo (string name)
 
*hash getUserServiceInfo (string name)
 
list getRunningWorkflowList ()
 
hash getRunningWorkflowInfo (softint id)
 
softstring createOrder (string name, *string version, hash params, string status=StatReady)
 
hash runtimeProperties ()
 
hash execSynchronousWorkflow (string name, *string version, hash sdata, *hash opts, *hash ddata, softint priority=DefaultOrderPriority, *hash orderkeys, *softstring external_order_instanceid, *softint parent_workflow_instanceid)
 
any callNetworkAPIArgsWithAuthentication (string user, string pass, string call, softlist args)
 
any callNetworkAPIArgs (string call, softlist args)
 
any callNetworkAPI (string call, softlist args)
 
hash getSystemInfo ()
 
int getSessionID ()
 

Variables

const DD_WITH_PASSWORD = 1 << 0
 includes the password in the return value More...
 
const DD_SHORT = 1 << 1
 does not include character encoding and options in the return value
 

Detailed Description

Function Documentation

◆ _priv_get_complex_value()

auto OMQ::UserApi::_priv_get_complex_value ( *auto  var_data,
list< hash< DotInfo >>  dot_info_list 
)
Parameters
var_datacan be a list or a string
dot_info_lista list of dot or array offsets

◆ _priv_get_list_arg_value()

auto OMQ::UserApi::_priv_get_list_arg_value ( list< auto >  var_data,
string  exp 
)
Parameters
var_datathe list source
expthe offset expression; respects dot notation
Returns
the value referenced or NOTHING if not present
Exceptions
LIST-VALUE-ERRORcannot parse list value expression
Since
Qorus 4.0.3

◆ audit_check_event()

bool OMQ::UserApi::audit_check_event ( softint  opt)

checks if the given audit event (given as an integer code) is enabled

Parameters
optthe audit event code to check; see Audit Event Codes for possible values
Returns
True if the event is audited, False if not
Since
Qorus 2.6.2
See also
UserApi::auditCheckEvent()

◆ audit_check_event_string()

bool OMQ::UserApi::audit_check_event_string ( string  opt)

checks if the given audit event (given as a string) is enabled

Parameters
optthe audit event code to check; see Audit Event Strings for possible values
Returns
True if the event is audited, False if not
Exceptions
AUDIT-EVENT-ERRORthe given audit event string does not exist
Since
Qorus 2.6.2
See also
UserApi::auditCheckEventString()

◆ audit_get_mask()

int OMQ::UserApi::audit_get_mask ( )

returns the audit event mask

Returns
the audit event mask
Since
Qorus 2.6.2
See also
UserApi::auditGetMask()

◆ audit_user_event()

*int OMQ::UserApi::audit_user_event ( 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

Parameters
user_eventthe user event code string
info1optional informational string for the AUDIT_EVENTS.INFO1 field
info2optional informational string for the AUDIT_EVENTS.INFO2 field
Returns
NOTHING if user event auditing is not enabled (see system option qorus.audit), or the integer audit event id
Note
nothing will be written to the 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
Since
Qorus 2.6.2
See also
UserApi::auditUserEvent()

◆ block_order()

hash<auto> OMQ::UserApi::block_order ( softint  wfiid)

block the given workflow order data instance

Parameters
wfiidthe workflow order instance ID to block
Returns
a hash with the following key:
  • workflow_status: the status of the workflow order

An exception will be thrown if the status is OMQ::StatInProgress

Exceptions
BLOCK-WORKFLOW-ERRORinvalid status, foreign session id, missing original status, uncancel operation already in progress
Since
Qorus 3.0.4.p2
See also
UserApi::blockOrder()

◆ call_network_api()

auto OMQ::UserApi::call_network_api ( string  call)

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_network_api("omq.system.exec-synchronous-existing", ("workflow_instanceid": wfiid));
Parameters
callthe full RPC API method name (ex: "omq.system.exec-synchronous-exiting"); see Network System API for a full list
Returns
the return value of the method
Exceptions
UNKNOWN-API-CALLinvalid API method
INVALID-INTERNAL-API-CALLAPI may not be called internally (ex: omq.system.shutdown-wait())
Since
Qorus 2.6.3.p43 restrictions on calling certain API methods (including service methods) were removed
Note
prior to Qorus 3.0.2 this function was known as callNetworkAPI(), and is still imported with this old camel-case name for backwards compatibility
See also

◆ call_network_api_args()

auto OMQ::UserApi::call_network_api_args ( string  call,
softlist  args 
)

calls a system RPC API with the argument list to the API method as a top-level argument to this function; the API is called with system permissions (no restrictions)

Parameters
callthe full RPC API method name (ex: "omq.system.exec-synchronous-exiting"); see Network System API for a full list
argsany arguments to the method; if multiple argument should be passed to the method, use a list of arguments here
Returns
the return value of the method
Exceptions
UNKNOWN-API-CALLinvalid API method
INVALID-INTERNAL-API-CALLAPI may not be called internally (ex: omq.system.shutdown-wait())
Since
Qorus 2.6.3.p43 restrictions on calling certain API methods (including service methods) were removed
Note
prior to Qorus 3.0.2 this function was known as callNetworkAPIArgs(), and is still imported with this old camel-case name for backwards compatibility
See also

◆ call_network_api_args_with_authentication()

auto OMQ::UserApi::call_network_api_args_with_authentication ( string  user,
string  pass,
string  call,
softlist  args 
)

calls a system RPC API with authentication information (username and password)

Parameters
userthe username to use for the call
passthe password to use for the call
callthe full RPC API method name (ex: "omq.system.exec-synchronous-exiting"); see Network System API for a full list
argsany arguments to the method; if multiple argument should be passed to the method, use a list of arguments here
Returns
the return value of the method
See also
call_network_api_args()
call_network_api()
Exceptions
UNKNOWN-API-CALLinvalid API method
INVALID-INTERNAL-API-CALLAPI may not be called internally (ex: omq.system.shutdown-wait())
Since
Qorus 2.6.3.p43 restrictions on calling certain API methods (including service methods) were removed
Note
prior to Qorus 3.0.2 this function was known as callNetworkAPIArgsWithAuthentication(), and is still imported with this old camel-case name for backwards compatibility
See also

◆ call_rest_api()

auto OMQ::UserApi::call_rest_api ( 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)

Example:
int pid = call_rest_api("GET", "system/pid");
Parameters
methodthe HTTP method name in all caps
paththe 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_argsthe arguments to the call
Returns
the return value of the method
Note
to use a specific REST API version, make sure path begins with "/api"
Since
Qorus 3.1.1
See also

◆ call_rest_api_with_authentication()

auto OMQ::UserApi::call_rest_api_with_authentication ( string  user,
string  pass,
string  method,
string  path,
*hash  body_args 
)

calls a system REST API method with authentication information (username and password) and returns the result

Example:
int pid = call_rest_api_with_authentication(user, pass, "PUT", "system?action=shutdown");
Parameters
userthe username to use for the call
passthe password to use for the call
methodthe HTTP method name in all caps
paththe 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_argsthe arguments to the call
Returns
the return value of the method
Note
to use a specific REST API version, make sure path begins with "/api"
Since
Qorus 3.1.1
See also

◆ callNetworkAPI()

any OMQ::UserApi::callNetworkAPI ( string  call,
softlist  args 
)

◆ callNetworkAPIArgs()

any OMQ::UserApi::callNetworkAPIArgs ( string  call,
softlist  args 
)

◆ callNetworkAPIArgsWithAuthentication()

any OMQ::UserApi::callNetworkAPIArgsWithAuthentication ( string  user,
string  pass,
string  call,
softlist  args 
)

◆ cancel_order()

hash OMQ::UserApi::cancel_order ( softint  wfiid)

cancel the given workflow order data instance

Parameters
wfiidthe workflow order instance ID to cancel
Returns
a hash with the following key:
  • workflow_status: the status of the workflow order

An exception will be thrown if the status is OMQ::StatInProgress

Exceptions
CANCEL-WORKFLOW-ERRORinvalid status, foreign session id, missing original status, uncancel operation already in progress
Since
Qorus 3.0.4.p2
See also
UserApi::cancelOrder()

◆ clear_sql_table_cache() [1/2]

OMQ::UserApi::clear_sql_table_cache ( 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)

Parameters
datasourcethe name of a Qorus datasource
table_namean optional table name to clear; if not present, then all objects in the given datasource are cleared
Example:
Since
Qorus 3.1.0
See also

◆ clear_sql_table_cache() [2/2]

OMQ::UserApi::clear_sql_table_cache ( AbstractDatasource  datasource,
*string  table_name 
)

clears cached objects for given datasource (for example, if database objects have been updated in the dataserver)

Parameters
datasourcea 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_namean optional table name to clear; if not present, then all objects in the given datasource are cleared
Example:
clear_sql_table_cache(datasource_pool);
Exceptions
INVALID-DATASOURCEthis exception is thrown if the datasource argument cannot be matched to a known Qorus datasource
Since
Qorus 3.1.0
See also

◆ compareVersion()

deprecated public int OMQ::UserApi::compareVersion ( string  lv,
string  rv 
)

◆ create_order()

softstring OMQ::UserApi::create_order ( string  name,
*string  version,
hash  params,
string  status = StatReady 
)

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
Parameters
namethe name of the workflow
versionthe 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
paramsThe hash passed must have at either a staticdata key or an external_order_instanceid key, valid keys:
  • dynamicdata: (optional hash) the initial dynamic data for the order
  • external_order_instanceid: (optional/required string) the external order instance ID for the workflow data; one of staticdata or external_order_instanceid must be provided
  • global_unique_key: (optional hash) a hash giving one or more unique order keys for the order (across all workflows regardless of workflowid, name, or version); keys are order key names and values are the string key values; if this key already exists for any order in the system, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • orderkeys: (optional hash) a hash of order keys for the order
  • parent_workflow_instanceid: (optional int) a loosely-coupled workflow that will be marked as the parent of this workflow; if this key is not set, and this function is called from workflow code (even indirectly, by calling a service method that calls this function 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
  • priority: the order priority (optional int, default DefaultOrderPriority) from 0 - 999; priority 0 is the highest; 999 is the lowest
  • scheduled: (optional date) the earliest date and time the order can be processed; if this date is given as a future date/time value and a StatReady status is given, then the initial status of the workflow order data instance will be automatically changed to StatScheduled instead of StatReady
  • sensitive_data: (optional hash) a hash of sensitive data information for the workflow; this key can only be used when submitting the data over a secure (encrypted) connection; the keys are sensitive data key types, values are hashes keyed by sensitive data values, and the hash values have the following keys:
    • aliases: (optional list of strings) zero or more string aliases for the sensitive data
    • data: (required hash) the sensitive data hash itself
    • meta: (optional hash) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
      • PURPOSE: free-form information about the purpose of the sensitive data
      • CATEGORIES: free-form information about the categories of sensitive data
      • RECIPIENTS: free-form information about the recipients or recipient catories of sensitive data
      • STORAGE: free-form information about the storage time or rules for sensitive data
  • staticdata: (optional/required hash) the initial static data for the order; one of staticdata or external_order_instanceid must be provided
  • tempdata: (optional hash) the initial temporary data for the order
  • workflow_specific_unique_key: (optional hash) a hash giving one or more unique order keys for the particular workflowid (which matches a unique name and workflow version); keys are order key names and values are the string key values; if any of the keys given already exists for an order with the target workflowid, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • workflow_unique_key: (optional hash) a hash giving one or more unique order keys for the particular workflow by name only (across all workflows with the same name regardless of version); keys are order key names and values are the string key values; if this key already exists for a workflow order with the same name, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
statuscreate the workflow order data instance with this status; may be either:
  • StatReady which is the default value
  • StatBlocked meaning: do not process the order, wait for unblocking later
Returns
the workflow instance ID created (returned as a string)
Exceptions
SUBMIT-ORDER-ERRORinvalid status value
ORDER-DATA-ERRORmissing either external_order_instanceid or staticdata, unknown workflow; invalid keys or sensitive data format
DUPLICATE-ORDER-KEYthe given unique key already exists in the defined scope
WORKFLOW-KEY-ERRORinvalid workflow key given
Note
  • Prior to Qorus 3.0.2 this function was known as createOrder(), and is still imported with this old camel-case name for backwards compatibility
  • In the params argument above, either the staticdata or external_order_instanceid values must be provided; staticdata may be omitted if external_order_instanceid is provided and vice-versa
  • The global_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.
Since
  • Qorus 3.0.4.p2 implemented support for the tempdata key in the params argument
  • Qorus 3.1.1 implemented support for the following keys in the params argument:
    • global_unique_key
    • sensitive_data
    • workflow_specific_unique_key
    • workflow_unique_key
See also

◆ create_remote_order()

softstring OMQ::UserApi::create_remote_order ( 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

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
Parameters
remotethe name of the remote Qorus connection
namethe name of the workflow
versionthe 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
paramsThe hash passed must have at either a staticdata key or an external_order_instanceid key, valid keys:
  • dynamicdata: (optional hash) the initial dynamic data for the order
  • external_order_instanceid: (optional/required string) the external order instance ID for the workflow data; one of staticdata or external_order_instanceid must be provided
  • global_unique_key: (optional hash) a hash giving one or more unique order keys for the order (across all workflows regardless of workflowid, name, or version); keys are order key names and values are the string key values; if this key already exists for any order in the system, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • orderkeys: (optional hash) a hash of order keys for the order
  • parent_workflow_instanceid: (optional int) a loosely-coupled workflow that will be marked as the parent of this workflow; if this key is not set, and this function is called from workflow code (even indirectly, by calling a service method that calls this function 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
  • priority: the order priority (optional int, default DefaultOrderPriority) from 0 - 999; priority 0 is the highest; 999 is the lowest
  • scheduled: (optional date) the earliest date and time the order can be processed; if this date is given as a future date/time value and a StatReady status is given, then the initial status of the workflow order data instance will be automatically changed to StatScheduled instead of StatReady
  • sensitive_data: (optional hash) a hash of sensitive data information for the workflow; this key can only be used when submitting the data over a secure (encrypted) connection; the keys are sensitive data key types, values are hashes keyed by sensitive data values, and the hash values have the following keys:
    • aliases: (optional list of strings) zero or more string aliases for the sensitive data
    • data: (required hash) the sensitive data hash itself
    • meta: (optional hash) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
      • PURPOSE: free-form information about the purpose of the sensitive data
      • CATEGORIES: free-form information about the categories of sensitive data
      • RECIPIENTS: free-form information about the recipients or recipient catories of sensitive data
      • STORAGE: free-form information about the storage time or rules for sensitive data
  • staticdata: (optional/required hash) the initial static data for the order; one of staticdata or external_order_instanceid must be provided
  • tempdata: (optional hash) the initial temporary data for the order
  • workflow_specific_unique_key: (optional hash) a hash giving one or more unique order keys for the particular workflowid (which matches a unique name and workflow version); keys are order key names and values are the string key values; if any of the keys given already exists for an order with the target workflowid, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • workflow_unique_key: (optional hash) a hash giving one or more unique order keys for the particular workflow by name only (across all workflows with the same name regardless of version); keys are order key names and values are the string key values; if this key already exists for a workflow order with the same name, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
statuscreate the workflow order data instance with this status; may be either:
  • StatReady which is the default value
  • StatBlocked meaning: do not process the order, wait for unblocking later
register_dependencyif True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again
Returns
the workflow instance ID created (returned as a string)
Exceptions
GET-REMOTE-ERRORThe given connection is not known
SUBMIT-ORDER-ERRORinvalid status value
WORKFLOW-ERRORunknown or invalid workflow
ORDER-DATA-ERRORmissing either external_order_instanceid or staticdata, invalid keys or sensitive data format
DUPLICATE-ORDER-KEYthe given unique key already exists in the defined scope
WORKFLOW-KEY-ERRORinvalid workflow key given
Note
  • In the params argument above, either the staticdata or external_order_instanceid values must be provided; staticdata may be omitted if external_order_instanceid is provided and vice-versa
  • The global_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.
Since
Qorus 3.1.1
See also

◆ create_sql_string()

deprecated public string OMQ::UserApi::create_sql_string ( )

returns a string suitable for use in a dyanamic Oracle SQL query string based on the arguments passed

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead
Note
Oracle-specific; deprecated function create_sql_string2() replaced this function

◆ create_sql_string2()

deprecated public string OMQ::UserApi::create_sql_string2 ( auto  driver)

returns a string suitable for use in a dynamic SQL query string (driver-dependent) based on the arguments passed

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead

◆ createOrder()

softstring OMQ::UserApi::createOrder ( string  name,
*string  version,
hash  params,
string  status = StatReady 
)

◆ db_date()

deprecated public string OMQ::UserApi::db_date ( string  driver,
date  date 
)

returns a string from a date suitable for use in a dynamic SQL string depending on the driver

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead

◆ deserialize_qorus_data()

public auto OMQ::UserApi::deserialize_qorus_data ( string  data)

parses serialized data in either XML-RPC or YAML format and returns the corresponding qore data

auto-detects XML-RPC or YAML decoding

Parameters
datathe string data to deserialize
Returns
the Qore data represented by the string arugment

◆ exec_synchronous_workflow()

hash<auto> OMQ::UserApi::exec_synchronous_workflow ( 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

Parameters
namethe workflow name
versionthe workflow version (if NOTHING then the latest version of the workflow will be used)
sdatathe static data hash for the workflow order
optsthe options for the synchronous workflow execution instance
ddatathe optional initial dynamic data hash for the workflow order
prioritythe order priority for the order
orderkeysoptional order keys for the order
external_order_instanceidthe optional external order instanceid for the order
parent_workflow_instanceidan optional loosely-coupled workflow order ID that will be marked as the parent of this order; if this key is not set, and this function is called from workflow code (even indirectly, by calling a service method that calls this function 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
Returns
a hash of workflow order information with the following keys:
Since
Qorus 2.6.3.p28 the version parameter may be NOTHING, meaning take the latest version
Note
prior to Qorus 3.0.2 this function was known as execSynchronousWorkflow(), and is still imported with this old camel-case name for backwards compatibility
See also
UserApi::execSynchronousWorkflow()

◆ execSynchronousWorkflow()

hash OMQ::UserApi::execSynchronousWorkflow ( string  name,
*string  version,
hash  sdata,
*hash  opts,
*hash  ddata,
softint  priority = DefaultOrderPriority,
*hash  orderkeys,
*softstring  external_order_instanceid,
*softint  parent_workflow_instanceid 
)

◆ fix_quotes() [1/2]

deprecated public string OMQ::UserApi::fix_quotes ( string  str)

doubles single quotes (\') in strings and returns the new string

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead

◆ fix_quotes() [2/2]

deprecated public string OMQ::UserApi::fix_quotes ( reference  str)

doubles single quotes (\') in strings and returns the new string

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead

◆ flush_sla_events()

OMQ::UserApi::flush_sla_events ( )

flushes all pending SLA events to disk and returns after the data has been committed

Example:
Since
Qorus 3.1.1
See also
UserApi::flushSlaEvents()

◆ get_active_jobs()

hash OMQ::UserApi::get_active_jobs ( )

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.

Returns
a hash is keyed by job name; the hash values are job information hashes with the following keys:
  • jobid: the metadata jobid of the job type
  • name: the job name
  • version: the job version
  • description: the job description
  • trigger: a string describing the timer/trigger for the job
  • [job_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 job
  • [expiry_date]: the expiry date of the job, if any; if this date is present, then the job will not run automatically after this date
  • single_instance: True if the job can only be run in a single Qorus instance, False if no such restriction is enabled
  • [next]: the next trigger date/time; this key is only included if the job is active
  • active: this value is always True because this API only returns information about active jobs
Since
Qorus 2.8.1.p4
See also
UserApi::getActiveJobs()

◆ get_datasource_dedicated()

Qore::SQL::Datasource OMQ::UserApi::get_datasource_dedicated ( string  name,
bool  register_dependency = True 
)

returns a new, dedicated Datasource object, suitable for transaction management for long-running transactions

Parameters
namethe name of the datasource
register_dependencyif True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again
Returns
a new, dedicated Datasource object, suitable for transaction management for long-running transactions
Exceptions
DATASOURCE-ERRORThe given connection is not known or is a system datasource
Since
Qorus 3.0
See also

◆ get_datasource_info()

hash OMQ::UserApi::get_datasource_info ( string  name)

returns a hash of information for the given datasource, if known, otherwise throws an exception

Parameters
namethe name of the datasource
Returns
a hash of information for the given datasource, if known, otherwise throws an exception; the following keys are returned in the hash:
  • name (string): the name of the datasource connection (corresponding to the argument name)
  • type (string): datasource constant
  • url (string): a connection string
  • url_hash (hash): parsed connection string and options
    • type (string): driver name
    • user (string): the username for the datasource connection, if any
    • pass (string): the password for the datasource connection, if any
    • charset (string): the DB-specific character encoding for the datasource connection
    • db (string): The database name of the datasource connection
    • options (hash): an optional hash of options for the DBI driver for this datasource connection; also "min" and "max" for the DatasourcePool minimum and maximum options
  • locked (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 not
  • desc (string): a string description of the datasource
  • monitor (bool): a flag indicating if the datasource is monitored or not
  • status (string): "OK" if the datasource is up or an error string if the datasource is down; set by monitoring
  • last_check (date/time): the date and time of the last monitoring check
  • shared_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 ID
    • serviceid: for services, gives the service ID
    • jobid: for jobs, gives the job ID
    • name: the name of the workflow, service, or job
    • version: the version of the workflow, service, or job
    • desc: a string description of the object
Exceptions
DATASOURCE-ERRORunknown datasource
Since
Qorus 3.0
See also
UserApi::getDatasourceInfo()

◆ get_datasource_pool()

AbstractDatasource OMQ::UserApi::get_datasource_pool ( string  name,
bool  register_dependency = True 
)

returns a DatasourcePool object for the given datasource name

Parameters
namethe name of the datasource
register_dependencyif True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again
Returns
a DatasourcePool object
Exceptions
DATASOURCE-ERRORunknown or system datasource
Since
Qorus 3.0
See also

◆ get_datasource_shared()

deprecated Qore::SQL::Datasource OMQ::UserApi::get_datasource_shared ( string  name,
bool  register_dependency = True 
)

Returns a shared Datasource object with autocommit turned on from the given datasource name.

Parameters
namethe name of the datasource
register_dependencyif True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again
Returns
a shared Datasource object with autocommit turned on
Exceptions
DATASOURCE-ERRORThe given connection is not known or is a system datasource
Since
Qorus 3.0
See also
Deprecated:
use get_datasource_pool() instead; the concept of datasources with auto-commit enabled is deprecated in Qorus

◆ get_ds_desc()

public string OMQ::UserApi::get_ds_desc ( hash< auto >  h,
*int  dd_opts 
)

returns a datasource description string from a datasource configuration hash

Parameters
ha datasource configuration hash as returned by AbstractDatasource::getConfigHash()
dd_optsa bitfield of datasource description options; see Datasource Description Options for more information
Since
Qorus 4.0.0

◆ get_exception_string()

deprecated public string OMQ::UserApi::get_exception_string ( hash< auto >  ex)

◆ get_global_config_item_value()

auto OMQ::UserApi::get_global_config_item_value ( string  item)

returns the value of the given global configuration item; throws an exception if no such global configuration item exists

Parameters
itemthe name of the global configuration item to retrieve
Returns
the value of the given global configuration item
Exceptions
CONFIG-ITEM-ERRORthrown if the configuration item is not valid
Note
the value is always substituted with UserApi::expandTemplatedValue(); make sure and escape any "$" characters with a backslash ("\") to avoid template substitution
Since
Qorus 4.0.3
See also
get_global_config_item_value_with_default()

◆ get_global_config_item_value_with_default()

auto OMQ::UserApi::get_global_config_item_value_with_default ( string  item,
auto  default_value 
)

returns the value of the given global configuration item; throws an exception if no such global configuration item exists

Parameters
itemthe name of the global configuration item to retrieve
default_valuethe value to be returned if the value is not set
Returns
the value of the given global configuration item or default_value, if no value is set at the global level for the given configuration item
Note
Since
Qorus 4.0.3
See also
get_global_config_item_value()

◆ get_mapper()

Mapper::Mapper OMQ::UserApi::get_mapper ( string  name,
*hash< auto >  rtopts 
)

returns the given mapper if registered for the current interface

Example:
Mapper m = get_mapper("my_mapper");
Parameters
namethe name of the mapper
rtoptsany runtime options accepted by the mapper
Exceptions
MAPPER-ERRORthe given mapper is unknown or not registered to the current interface
Since
Qorus 3.1.0
See also

◆ get_mapper_iterator()

Qore::AbstractIterator OMQ::UserApi::get_mapper_iterator ( string  name,
Qore::AbstractIterator  input,
*hash  rtopts 
)

returns an iterator for the named mapper using the iterator argument for input

Example:
AbstractIterator i = get_mapper_iterator("my_mapper", input);
Parameters
namethe name of the mapper
inputan 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)
rtoptsany runtime options accepted by the mapper
Returns
the AbstractIterator object corresponding to the arguments; the Qore::AbstractIterator::getValue() method will return a hash of the current input mapped to the output data structure
Exceptions
MAPPER-ERRORunknown mapper or not registered to the current interface
Since
Qorus 3.1.0
See also

◆ get_option()

auto OMQ::UserApi::get_option ( )

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.

Returns
the value requested directly if only one argument is passed, otherwise a hash of option keys and values; note that if called from a workflow and no arguments are passed to the function all workflow-level options are returned as a hash
Note
  • when called from workflow code, invalid options do not cause an errors to be raised; the associated key values in the hash returned will be NOTHING
  • prior to Qorus 3.0.2 this function was known as getOption(), and is still imported with this old camel-case name for backwards compatibility
See also
UserApi::getOption()

◆ get_qorus_option_info()

hash OMQ::UserApi::get_qorus_option_info ( )

returns a hash giving information about system options

Since
Qorus 2.8.1.p3
See also
UserApi::getQorusOptionInfoArgs()

◆ get_qorus_option_info_args()

hash OMQ::UserApi::get_qorus_option_info_args ( softlist  args)

returns a hash giving information about system options

Since
Qorus 2.8.1.p3
See also
UserApi::getQorusOptionInfoArgs()

◆ get_qorus_options()

auto OMQ::UserApi::get_qorus_options ( )

returns the value of the given system option or options

Since
Qorus 2.8.1.p3
See also
UserApi::getQorusOptions()

◆ get_qorus_options_args()

auto OMQ::UserApi::get_qorus_options_args ( softlist  args)

returns the value of the given system option or options

Since
Qorus 2.8.1.p3
See also
UserApi::getQorusOptionsArgs()

◆ get_remote_rest_connection()

QorusSystemRestHelper OMQ::UserApi::get_remote_rest_connection ( string  name,
bool  connect = True,
bool  register_dependency = True 
)

Returns a new QorusSystemRestHelper object corresponding to a defined Qorus remote connection.

Parameters
namethe name of the remote connection
connectif False an unconnected object will be returned, otherwise the object is already connected
register_dependencyif True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again
Returns
a new QorusSystemRestHelper object
Exceptions
GET-REMOTE-ERRORThe given connection is not known
Since
Qorus 3.0
See also
UserApi::getRemoteRestConnection()

◆ get_remote_rpc_connection()

QorusSystemAPIHelper OMQ::UserApi::get_remote_rpc_connection ( string  name,
bool  connect = True,
bool  register_dependency = True 
)

Returns a new QorusSystemAPIHelper object corresponding to a defined Qorus remote connection.

Parameters
namethe name of the remote connection
connectif False an unconnected object will be returned, otherwise the object is already connected
register_dependencyif True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again
Returns
a new QorusSystemAPIHelper object
Exceptions
GET-REMOTE-ERRORThe given connection is not known
Since
Qorus 3.0
See also
UserApi::getRemoteRpcConnection()

◆ get_running_workflow_info()

hash OMQ::UserApi::get_running_workflow_info ( softint  id)

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

Parameters
idworkflow execution instance id
Returns
a hash of the workflow execution instance info if the ID is valid or an empty hash if not; if valid, the hash will have the following keys:
  • name: the name of the workflow
  • version: version of the workflow
  • workflowid: the workflowid of the workflow
  • executionID: the workflow execution instance id (same as the argument)
  • mode: WM_Normal or WM_Recovery
  • sync: True if the execution instance is synchronous, False if not
  • status: WISInitializing, WISRunning, WISWaiting, WISStopping
  • iterations: number of segment iterations performed so far
  • totalSegments: number of segments executed
  • errors: total number of errors encountered
  • warnings: total number of warnings raised
  • starttime: date/time the execution instance was started
  • options: options set on the workflow execution instance
  • logfile: log file name
  • remote: True if the workflow is running as a remote qwf process, False if not
Note
prior to Qorus 3.0.2 this function was known as getRunningWorkflowInfo(), and is still imported with this old camel-case name for backwards compatibility
Since
  • Qorus 3.1.0 added the sync attribute and deprecated the OMQ::WM_Synchronous mode value
  • Qorus 4.0 added the remote attribute
See also

◆ get_running_workflow_list()

list<auto> OMQ::UserApi::get_running_workflow_list ( *string  name,
*string  ver 
)

returns a list of hashes giving information about the currently-running workflow execution instances

Parameters
nameoptional workflow name for filtering the result list
veroptional workflow version for filtering the result list (only used if name also passed)
Returns
a list of hashes giving information about the currently-running workflow execution instances; if no matching workflow execution instances are running, then an empty list is returned; otherwise each list element is a hash with the following keys:
  • executionID: the workflow execution instance id
  • name: the name of the workflow
  • version: version of the workflow
  • workflowid: the workflowid of the workflow
  • mode: WM_Normal or WM_Recovery
  • sync: True if the execution instance is synchronous, False if not
  • status: WISInitializing, WISRunning, WISWaiting, WISStopping
  • iterations: number of segment iterations performed so far
  • totalSegments: number of segments executed
  • errors: total number of errors encountered
  • warnings: total number of warnings raised
  • starttime: date/time the execution instance was started
  • options: options set on the workflow execution instance
  • logfile: log file name
  • remote: True if the workflow is running as a remote qwf process, False if not
Note
prior to Qorus 3.0.2 this function was known as getRunningWorkflowList(), and is still imported with this old camel-case name for backwards compatibility
Since
  • Qorus 3.1.0 added the sync attribute and deprecated the OMQ::WM_Synchronous mode value
  • Qorus 4.0 added the remote attribute
See also
UserApi::getRunningWorkflowList()

◆ get_service_info()

*hash<auto> OMQ::UserApi::get_service_info ( string  type,
string  name 
)

returns information about the given service (if it's currently loaded)

to get information about services whether they are loaded or not, call:

system/metadata/lookupserviceinfo/<type>/<name>
Parameters
typethe type of service (either "system" or "user"; case is ignored)
namethe name of the system service to query
Returns
a hash of service information or NOTHING if the service is not loaded; the hash will have the following structure:
  • type: either "system" or "user" corresponding to the argument
  • name: the name of the service
  • version: version of the service
  • patch: the patch string for the service
  • desc: description of the service
  • author: the author of the service
  • serviceid: service ID
  • parse_options: parse options for the service
  • status: SSRunning or SSLoaded
  • log: path to the service log file
  • active_calls: number of active service calls and persistent connection handlers currently in progress
  • waiting_threads: number of threads waiting on the service (for a service reset or unload action)
  • threads: number of running threads in the service
  • autostart: True of False if the autostart flag is set
  • manual_autostart: True of False the autostart value has been manually set
  • loaded: date/time the service was loaded
  • methods: list of hashes for each method with name and desc keys
  • resources: list of service resources
  • resource_files: list of service file resources
  • options: service options
  • groups: interface groups that the service belongs to
  • alerts: any alerts raised against the service
Since
Qorus 4.0 added the active_calls and waiting_threads keys
See also
UserApi::getServiceInfo()

◆ get_session_id()

int OMQ::UserApi::get_session_id ( )

returns the current Qorus application session ID

Returns
the current Qorus application session ID
Note
prior to Qorus 3.0.2 this function was known as getSessionID(), and is still imported with this old camel-case name for backwards compatibility
See also

◆ get_sql_cache_info()

hash<auto> OMQ::UserApi::get_sql_cache_info ( )

get information about cached object

Returns
hash the whole sql cache

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:

  • count - how many times it was used
  • created - datetime of the first call (when the cache was created)
  • object - stored object that is cached
Example:
hash<auto> cache = get_sql_cache_info();
hash<auto> cache_for_my_datasource = cache.my_datasource;
hash<auto> table_cache_for_my_datasource = cache_for_my_datasource.tables;
bool is_mytable_cached = exists table_cache_for_my_datasource.my_table;
date date_when_mytable_was_cached = table_cache_for_my_datasource.my_table.created;
Since
Qorus 3.1.0
See also

◆ get_sql_number()

deprecated public auto OMQ::UserApi::get_sql_number ( auto  v)

returns either the value returned or the string "NULL" if the type cannot be converted to a number

this function is designed to be used to directly put values in an SQL query that should be of NUMBER/NUMERIC/DECIMAL type

Parameters
vthe value to use a number in an SQL query
Returns
the value passed if the value is one of the following types: int, float, bool, string, or the string "NULL" if not
Deprecated:
the use of dynamic SQL is discouraged; use bind by value instead

◆ get_sql_string()

deprecated public string OMQ::UserApi::get_sql_string ( auto  v,
int  size = 0 
)

returns a singly-quoted string aimed to be directly usable in dynamic SQL queries with single quote (\') characters escaped or returns the string "NULL" if the argument type is not int, float, bool, or string

this function is designed to be used to directly put values in an SQL query that should be of VARCHAR/CHAR type

Parameters
vvalue to return as a string that can be directly used in an SQL query
sizeif non-zero, give the maximum size in characters of the string
Returns
a singly-quoted string aimed to be directly usable in SQL queries with single quote (\') characters escaped or returns the string "NULL" if the argument type is not int, float, bool, or string
Deprecated:
use of dynamic SQL is discouraged; use bind by value instead

◆ get_sql_table() [1/2]

SqlUtil::AbstractTable OMQ::UserApi::get_sql_table ( string  datasource,
string  table_name 
)

get a cached table object (suitable for DML) if present, otherwise it creates one from scratch

Parameters
datasourcea Qorus datasource name
table_namethe 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
Returns
an SqlUtil::AbstractTable object corresponding to the parameters
Exceptions
INVALID-DATASOURCEthis exception is thrown if the datasource argument cannot be matched to a known datasource
Note
  • other exceptions can be thrown when acquiring the table, for example if the given table is not accessible or if there are technical errors communicating with the database server, etc
  • you need to call clear_sql_table_cache() any time the table structure has changed
Example:
SqlUtil::AbstractTable t = get_sql_table("pgsql:user/password@db", "my_table");
Since
Qorus 3.1.0
See also

◆ get_sql_table() [2/2]

SqlUtil::AbstractTable OMQ::UserApi::get_sql_table ( AbstractDatasource  datasource,
string  table_name 
)

get a cached table object (suitable for DML) if present, otherwise it creates one from scratch

Parameters
datasourcea 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_namethe 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
Returns
an SqlUtil::AbstractTable object corresponding to the parameters
Exceptions
INVALID-DATASOURCEthis exception is thrown if the datasource argument cannot be matched to a known Qorus datasource
Note
  • INVALID-DATASOURCE exceptions can be thrown with a valid Qorus datasource if the given datasource has been reset since it was acquired
  • other exceptions can be thrown when acquiring the table, for example if the given table is not accessible or if there are technical errors communicating with the database server, etc
  • you need to call clear_sql_table_cache() any time the table structure has changed
Example:
SqlUtil::AbstractTable t = get_sql_table(datasource_pool, "my_table");
Since
Qorus 3.1.0
See also

◆ get_system_info()

hash OMQ::UserApi::get_system_info ( )

returns a hash of system info

Returns
a hash of system info with the following keys:
  • instance-key: value of the system option by the same name
  • session-id: the session ID for the current Qorus application session
  • omq-version: the version string for the Qorus server
  • omq-version-code: a numeric code of the Qorus server version, where
    major = (x / 10000), minor = (x / 100) % 100, sub = x % 100
    this value is suitable for comparisons (ex: for Qorus 2.6.0, omq-version-code = 20600)
  • qore-version: the version string for the qore build used
  • datamodel-version: the datamodel version required by this version of Qorus
  • omq-schema: the datasource string for the system schema (without the password)
  • omquser-schema: the datasource string for the user schema (without the password)
  • starttime: the date and time when the instance was started
  • hostname: the hostname of the machine where the Qorus server is running
  • pid: the PID of the Qorus server process
  • threads: number of threads currently active
  • schema-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 file
Note
prior to Qorus 3.0.2 this function was known as getSystemInfo(), and is still imported with this old camel-case name for backwards compatibility
Since
Qorus 2.6.0 added omq-version-code
See also
UserApi::getSystemInfo()

◆ get_system_service_info()

*hash OMQ::UserApi::get_system_service_info ( string  name)

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:

system/metadata/lookupserviceinfo/systen/<name>
Parameters
namethe name of the system service to query
Returns
a hash of user information or NOTHING if the service is not loaded; the hash will have the following structure:
  • type: "system"
  • name: the name of the service
  • version: version of the service
  • desc: description of the service
  • serviceid: service ID
  • status: SSRunning or SSLoaded
  • threads: number of running threads in the service
  • autostart: True of False if the autostart flag is set
  • loaded: date/time the service was loaded
  • methods: list of hashes for each method with name and desc keys
Note
prior to Qorus 3.0.2 this function was known as getSystemServiceInfo(), and is still imported with this old camel-case name for backwards compatibility
See also
UserApi::getSystemServiceInfo()

◆ get_user_connection()

object OMQ::UserApi::get_user_connection ( string  name,
bool  connect = True,
bool  register_dependency = True,
*hash< auto >  rtopts 
)

Returns an object corresponding to a defined user connection.

Parameters
namethe name of the connection
connectif False an unconnected object will be returned, otherwise the object is already connected
register_dependencyif True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again
rtoptsany runtime options accepted by the connection
Returns
the object representing the connection
Exceptions
CONNECTION-ERRORThe given connection is not known
Since
Qorus 3.0
See also
UserApi::getUserConnection()

◆ get_user_context_info()

*hash<auto> OMQ::UserApi::get_user_context_info ( )

returns a hash for the current user context

Example:
*hash<auto> h = get_user_context_info();
Returns
a hash describing the current user context or NOTHING if called outside a workflow, service, or job; hash keys are as follows:
  • when called in a service:
    • "type": "service"
    • "servicetype": the type of service ("user" or "system")
    • "name": the name of the service
    • "version": the version of the service
    • "id": the service id
  • when called in a job:
    • "type": "job"
    • "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
  • when called in a workflow:
    • "type": "workflow"
    • "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)
Since
Qorus 3.1.0
See also
UserApi::getUserContextInfo()

◆ get_user_service_info()

*hash<auto> OMQ::UserApi::get_user_service_info ( string  name)

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 REST API:

system/metadata/lookupserviceinfo/user/<name>
Parameters
namethe name of the user service to query
Returns
a hash of user information or NOTHING if the service is not loaded; the hash will have the following structure:
  • type: "user"
  • name: the name of the service
  • version: version of the service
  • desc: description of the service
  • serviceid: service ID
  • status: SSRunning or SSLoaded
  • threads: number of running threads in the service
  • autostart: True of False if the autostart flag is set
  • loaded: date/time the service was loaded
  • methods: list of hashes for each method with name and desc keys
Note
prior to Qorus 3.0.2 this function was known as getUserServiceInfo(), and is still imported with this old camel-case name for backwards compatibility
See also
UserApi::getUserServiceInfo()

◆ get_value_map()

auto OMQ::UserApi::get_value_map ( 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.

Parameters
mapnamename of the value map
keya key name
Returns
the value assigned to the key
Exceptions
VALUE-MAP-ERRORthe given value map is unknown or not registered to the current interface
Since
Qorus 3.1.0
See also

◆ get_value_maps()

list OMQ::UserApi::get_value_maps ( )

Gets all value maps valid for the current interface.

Returns
a list of hashes describing available value maps; keys are value map names; values are hashes with the following keys:
  • "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
Since
Qorus 3.1.0
See also

◆ getOption()

deprecated any OMQ::UserApi::getOption ( )

◆ getOracleNumber()

deprecated public auto OMQ::UserApi::getOracleNumber ( auto  v)

returns a string suitable for dynamic SQL

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead; this function was deprecated by get_sql_number()

◆ getOracleString()

deprecated public string OMQ::UserApi::getOracleString ( auto  v,
int  size = 0 
)

returns a string suitable for dynamic SQL

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead; this function was deprecated by get_sql_string()

◆ getRunningWorkflowInfo()

hash OMQ::UserApi::getRunningWorkflowInfo ( softint  id)

◆ getRunningWorkflowList()

list OMQ::UserApi::getRunningWorkflowList ( )

◆ getSessionID()

int OMQ::UserApi::getSessionID ( )

◆ getSQLNumber()

deprecated public auto OMQ::UserApi::getSQLNumber ( auto  v)

returns a string suitable for dynamic SQL

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead; this function was deprecated by get_sql_number()

◆ getSQLString()

deprecated public string OMQ::UserApi::getSQLString ( auto  v,
int  size = 0 
)

returns a string suitable for dynamic SQL

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead; this function was deprecated by get_sql_string()

◆ getSystemInfo()

hash OMQ::UserApi::getSystemInfo ( )

◆ getSystemServiceInfo()

*hash OMQ::UserApi::getSystemServiceInfo ( string  name)

◆ getUserServiceInfo()

*hash OMQ::UserApi::getUserServiceInfo ( string  name)

◆ log()

OMQ::UserApi::log ( softint  lvl,
softstring  msg 
)

Writes the information passed to the workflow, service, job, or system log file depending on the calling context if the log level passed is equal to or lower than value of the system option qorus.verbose.

Parameters
lvlif this value is lower than or equal to the value of the Qorus system qorus.verbose option, the message logged in the appropriate log file, otherwise the message is ignored. See Log Levels for valid values
msgthe format string for a vsprintf() call with the remaining arguments
See also
UserApi::log()

◆ make_select_list()

deprecated public string OMQ::UserApi::make_select_list ( auto  list)

returns a string based on a list, processed for the values in the list to be used in an SQL string with an Oracle DB

Deprecated:
Oracle-specific; use make_select_list2() instead
Note
use of dynamic SQL is discouraged; use bind by value instead

◆ make_select_list2()

deprecated public string OMQ::UserApi::make_select_list2 ( auto  driver,
auto  list 
)

returns a string based on a list, processed for the values in the list to be used in a dynamic SQL string

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead

◆ omqsleep()

int OMQ::UserApi::omqsleep ( softint  arg)

puts the current thread to sleep for a certain number of seconds

This function is available in the job, workflow, and service API in the same form. If the job, workflow execution instance, or service is stopping, this function returns immediately with a return value of -1; otherwise the current thread is put to sleep for the full time period requested. If this function (or omqusleep()) is called again after -1 is returned, then a "STOP-ERROR" exception is thrown.

Parameters
argthe number of seconds to sleep
Returns
0 if current thread was put to sleep for the full time period; -1 if the sleep was interrupted because the current object is being stopped
Exceptions
STOP-ERRORthe current object is stopping and this function already returned -1 as a warning
See also
UserApi::omqsleep()

◆ omqusleep()

int OMQ::UserApi::omqusleep ( softint  arg)

puts the current thread to sleep for a certain number of microseconds

This function is available in the job, workflow, and service API in the same form. If the job, workflow execution instance, or service is stopping, this function returns immediately with a return value of -1; otherwise the current thread is put to sleep for the full time period requested. If this function (or omqsleep()) is called again after -1 is returned, then a "STOP-ERROR" exception is thrown.

Parameters
argthe number of microseconds to sleep (1 microsecond = 1/1000000 of a second)
Returns
0 if current thread was put to sleep for the full time period; -1 if the sleep was interrupted because the current object is being stopped
Exceptions
STOP-ERRORthe current object is stopping and this function already returned -1 as a warning
See also
UserApi::omqusleep()

◆ oracle_date()

deprecated public string OMQ::UserApi::oracle_date ( date  date)

returns a string from a date suitable for use in a dynamic oracle SQL string

Deprecated:
use of dynamic SQL is discouraged; use bind by value instead

◆ parseBoolean()

deprecated public bool OMQ::UserApi::parseBoolean ( auto  v)

◆ post_sla_event_error()

bool OMQ::UserApi::post_sla_event_error ( string  sla,
number  value,
string  err,
string  desc 
)

posts an unsuccessful SLA event for SLA monitoring and performance tracking

Example:
post_sla_event_error(sla, value, ex.err, ex.desc);
Parameters
slathe SLA name
valuethe SLA performance value
errthe error code for the SLA event error
descthe error description for the SLA event error
Returns
True if the event was posted, False if not (because the SLA does not exist)
Since
Qorus 3.1.1
See also
UserApi::postSlaEventError()

◆ post_sla_event_success()

bool OMQ::UserApi::post_sla_event_success ( string  sla,
number  value 
)

posts a successful SLA event for SLA monitoring and performance tracking

Example:
Parameters
slathe SLA name
valuethe SLA performance value
Returns
True if the event was posted, False if not (because the SLA does not exist)
Since
Qorus 3.1.1
See also
UserApi::postSlaEventSuccess()

◆ post_sync_event()

bool OMQ::UserApi::post_sync_event ( string  eventtype,
string  eventkey 
)

posts a workflow synchronization event given the event type name and the unique event key

Example:
post_sync_event(type, key);
Parameters
eventtypethe event type name
eventkeythe event key in the event type queue to post
Returns
True if the event was posted for the first time, False if the event had already been posted beforehand
Exceptions
UNKNOWN-EVENTunknown event type name
Since
Qorus 3.1.0
See also

◆ post_user_event()

int OMQ::UserApi::post_user_event ( string  severity,
auto  info 
)

posts an application event of class QE_CLASS_USER

Parameters
severitysee Error Severity Codes for possible values
infothe user-defined information for the event
Exceptions
POST-USER-EVENT-ERRORinvalid severity value
See also
UserApi::postUserEvent()

◆ prop_get() [1/3]

hash<auto> OMQ::UserApi::prop_get ( )

returns a hash of all system properties in all domains

Example:
hash<auto> h = prop_get();
Returns
a hash of all system properties in all domains; the top-level keys are domain keys which have as values hashes with all key-value pairs set in the domain
Since
Qorus 3.1.0
See also

◆ prop_get() [2/3]

*hash<auto> OMQ::UserApi::prop_get ( string  domain)

returns a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist

Example:
*hash<auto> h = prop_get(domain);
Returns
a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist
Since
Qorus 3.1.0
See also

◆ prop_get() [3/3]

auto OMQ::UserApi::prop_get ( 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

Example:
auto val = prop_get(domain, key);
Returns
the value of the given system property key in the given domain
Since
Qorus 3.1.0
See also

◆ prop_update() [1/2]

string OMQ::UserApi::prop_update ( string  domain,
softstring  key,
auto  value 
)

changes (inserts, updates, or deletes) the value of a single system property

Example:
prop_update(domain, key, val);

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.

Parameters
domainthe domain of the property to set
keythe key to set
valuethe value to set in the property domain; if no value is passed here, and the property exists, it will be deleted
Returns
the action code, "INSERT", "UPDATE", "DELETE", "IGNORED" (if a non-existent key should be deleted)
Exceptions
PARAMETER-ERRORif the domain or key arguments are empty strings
PROP-ERRORserialized value exceeds 240 characters (column limit)
UPDATE-ERRORchanges attempted in the "omq" domain
Since
Qorus 3.1.0
See also

◆ prop_update() [2/2]

hash<auto> OMQ::UserApi::prop_update ( hash< auto >  h)

changes (inserts, updates, or deletes) the value of one or more system properties according to a hash argument

Example:

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.

Parameters
hin the format domain.key.value for updating, inserting, or deleting
Returns
a hash of action codes as keys, with the values of each key being the number of actions of that type executed
Exceptions
PROP-ERRORserialized value exceeds 240 characters (column limit)
UPDATE-ERRORchanges attempted in the "omq" domain
Since
Qorus 3.1.0
See also

◆ qorus_get_local_url()

string OMQ::UserApi::qorus_get_local_url ( *string  username,
*string  password 
)

returns a string giving the local system URL

Parameters
usernamean optional username for the new connection
passwordan optional password for the new connection
Returns
a string giving the local system URL
Note
the username and password arguments are only used if both are given
Since
Qorus 3.0.2
See also
UserApi::qorusGetLocalUrl()

◆ raise_transient_alert()

OMQ::UserApi::raise_transient_alert ( string  alert,
string  reason,
*hash  info 
)

raises a transient system alert from a workflow, service, or job

Parameters
alertthe name of the alert (ex: "DATA-SIZE-EXCEEDED")
reasonthe reason or verbose description of the alert
infooptional key / value details for the alert
Since
Qorus 3.0
See also
UserApi::raiseTransientAlert()

◆ remove_from_list() [1/2]

public list<auto> OMQ::UserApi::remove_from_list ( list< auto >  list,
auto  val 
)

uses the select operator to remove all occurences of a value from a list

Note
O(n) performance

◆ remove_from_list() [2/2]

public list<auto> OMQ::UserApi::remove_from_list ( reference  list,
auto  val 
)

uses the select operator to remove all occurences of a value from a list

Note
O(n) performance

◆ remove_from_list_index()

deprecated public list<auto> OMQ::UserApi::remove_from_list_index ( list< auto >  list,
int  index 
)

remove an element from a list

Deprecated:
use the Qore splice operator instead which is faster and standard qore functionality

◆ restart_transaction()

public *string OMQ::UserApi::restart_transaction ( 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

Parameters
driverthe 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
exthe exception hash
Returns
a string error message if any exception in the chain passed was caused by a recoverable DB error, otherwise returns NOTHING
Exceptions
UNSUPPORTED-DRIVERonly "oracle", "pgsql", and "mysql" are currently supported
Since
Qorus 3.1.1.p1

◆ runtime_properties()

hash OMQ::UserApi::runtime_properties ( )

returns Qorus runtime properties as a hash

Returns
Qorus runtime properties as a hash; if no properties are set, returns an empty hash
Note
prior to Qorus 3.0.2 this function was known as runtimeProperties(), and is still imported with this old camel-case name for backwards compatibility
See also
OMQ::UserApi::UserApi::runtimeProperties()

◆ runtimeProperties()

hash OMQ::UserApi::runtimeProperties ( )

◆ serialize_qorus_data()

public string OMQ::UserApi::serialize_qorus_data ( auto  d)

returns a string giving the default serialization of the given data structure for storage in Qorus

the default serialization is currently YAML

Parameters
dthe data to serialize
Returns
a YAML string representing the given data structure for storage in Qorus

◆ set_option()

OMQ::UserApi::set_option ( hash< auto >  hash)

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 function, an exception will be raised; however all other valid options in the hash will be set before the exception is raised

Parameters
hasha hash of option-value pairs
Exceptions
WORKFLOW-OPTION-ERRORinvalid option name
Note
prior to Qorus 3.0.2 this function was known as setOption(), and is still imported with this old camel-case name for backwards compatibility
See also
UserApi::setOption()

◆ setOption()

deprecated OMQ::UserApi::setOption ( hash  hash)

◆ unblock_order()

hash<auto> OMQ::UserApi::unblock_order ( softint  wfiid,
*hash< auto >  tempdata,
*hash< auto >  orderkeys 
)

unblocks the given workflow order data instance

Parameters
wfiidthe workflow order instance ID to unblock
tempdataoptional workflow order tempdata to pass to the workflow order (will only be used if the order is immediately cached as a part of the unblock_order() call)
orderkeysoptional workflow order data keys
Returns
a hash with the following key:
  • workflow_status: the status of the workflow order
Exceptions
BLOCK-WORKFLOW-ERRORinvalid status, foreign session id, missing original status, uncancel operation already in progress
Since
  • Qorus 3.0.4.p2
  • Qorus 3.1.0 added support for the orderkeys parameter
See also
UserApi::unblockOrder()

◆ uncancel_order()

hash<auto> OMQ::UserApi::uncancel_order ( softint  wfiid,
*hash< auto >  tempdata 
)

uncancels the given workflow order data instance

Parameters
wfiidthe workflow order instance ID to uncancel
tempdatatemporary data to provide when uncanceling the order
Returns
a hash with the following key:
  • workflow_status: the status of the workflow order
Exceptions
CANCEL-WORKFLOW-ERRORinvalid status, foreign session id, missing original status, uncancel operation already in progress
Since
Qorus 3.0.4.p2
See also
UserApi::uncancelOrder()

◆ xml_change_encoding()

public string OMQ::UserApi::xml_change_encoding ( string  xml,
string  enc 
)

returns a string with the XML encoding name changed to that given as an argument

does not change the actual encoding of the string (which may be different)

◆ xml_get_encoding()

public string OMQ::UserApi::xml_get_encoding ( string  xml)

returns the XML encoding name given in the string (not the actual string encoding, which may be different)

Exceptions
XML-NO-HEADERthe XML string did not contain an XML header
XML-INVALID-HEADERthe XML string contained an invalid XML header