Qorus Integration Engine
3.0.4.p7
|
user API namespace root More...
Namespaces | |
Job | |
Qorus job API namespace. | |
Service | |
Qorus service API namespace. | |
Workflow | |
Qorus workflow API namespace. | |
Functions | |
public deprecated any | getOracleNumber (any $v) |
public deprecated any | getSQLNumber (any $v) |
public any | get_sql_number (any $v) |
returns either the value returned or the string "NULL" if the type cannot be converted to a number More... | |
public deprecated string | getOracleString (any $v, int $size=0) |
public deprecated string | getSQLString (any $v, int $size=0) |
public string | get_sql_string (any $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... | |
public string | fix_quotes (string $str) |
doubles single quotes (\') in strings and returns the new string More... | |
public string | fix_quotes (reference $str) |
doubles single quotes (\') in strings and returns the new string More... | |
public string | make_select_list (any $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... | |
public string | make_select_list2 (any $driver, any $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 | remove_from_list (list $list, any $val) |
uses the select operator to remove all occurences of a value from a list More... | |
public list | remove_from_list (reference $list, any $val) |
uses the select operator to remove all occurences of a value from a list More... | |
public deprecated list | remove_from_list_index (list $list, int $index) |
DEPRECATED: remove an element from a list. More... | |
public string | oracle_date (date $date) |
returns a string from a date suitable for use in a dynamic oracle SQL string More... | |
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... | |
public string | create_sql_string () |
DEPRECATED: returns a string suitable for use in a dyanamic Oracle SQL query string based on the arguments passed. More... | |
public string | create_sql_string2 (any $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) | |
public deprecated bool | parseBoolean (any $v) |
public string | getExceptionString (hash $ex) |
public int | compareVersion (string $lv, string $rv) |
by Util::compare_version() | |
public string | serialize_qorus_data (any $d) |
returns a string giving the default serialization of the given data structure for storage in Qorus More... | |
public any | 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 (Datasource $ds, string $name) |
returns the next sequence value for the given sequence | |
public softint | next_sequence_value (DatasourcePool $ds, string $name) |
returns the next sequence value for the given sequence | |
*hash | get_user_service_info (string $name) |
returns information about the given user service (if it's currently loaded) More... | |
*hash | get_system_service_info (string $name) |
returns information about the given system service (if it's currently loaded) More... | |
*hash | get_service_info (string $type, string $name) |
returns information about the given service (if it's currently loaded) More... | |
list | 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... | |
hash | exec_synchronous_workflow (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... | |
int | post_user_event (string $severity, any $info) |
posts an application event of class QE_CLASS_USER More... | |
hash | runtime_properties () |
returns Qorus runtime properties as a hash More... | |
any | call_network_api_args_with_authentication (string $user, string $pass, string $call, softlist $args) |
calls a system API with authentication information (username and password) More... | |
any | call_network_api_args (string $call, softlist $args) |
calls a system API with the argument list to the API method as a top-level argument to this function More... | |
any | call_network_api (string $call) |
calls a system API 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) | |
Saves 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 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... | |
any | 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... | |
any | 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 $rtopts) |
Returns an object corresponding to a defined user connection. More... | |
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... | |
Qore::SQL::DatasourcePool | 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 datasource 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 <-> 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 <-> Qorus remote REST 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 $hash) | |
Changes option values on a workflow, service, or job. More... | |
any | get_option () |
Returns the value of the named workflow, service, or job option or options. More... | |
block_order (softint $wfiid) | |
block the given workflow order data instance More... | |
unblock_order (softint $wfiid, *hash $tempdata) | |
unblocks the given workflow order data instance More... | |
cancel_order (softint $wfiid) | |
cancel the given workflow order data instance More... | |
uncancel_order (softint $wfiid, *hash $tempdata) | |
uncancels the given workflow order data instance 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 () |
user API namespace root
bool OMQ::UserApi::audit_check_event | ( | softint | $opt | ) |
checks if the given audit event (given as an integer code) is enabled
$opt | the audit event code to check; see Audit Event Codes for possible values |
bool OMQ::UserApi::audit_check_event_string | ( | string | $opt | ) |
checks if the given audit event (given as a string) is enabled
$opt | the audit event code to check; see Audit Event Strings for possible values |
AUDIT-EVENT-ERROR | the given audit event string does not exist |
int OMQ::UserApi::audit_get_mask | ( | ) |
returns the audit event mask
creates a user audit event (with audit event code AE_USER_EVENT) against the workflow, service, or job instance
$user_event | the user event code string |
$info1 | optional informational string for the AUDIT_EVENTS.INFO1 field |
$info2 | optional informational string for the AUDIT_EVENTS.INFO2 field |
AUDIT_EVENTS
table if the audit system option does not include the "user-events"
(AO_USER_EVENTS) option; in case this is not set, the call will have no effectOMQ::UserApi::block_order | ( | softint | $wfiid | ) |
block the given workflow order data instance
$wfiid | the workflow order instance ID to block |
workflow_status:
the status of the workflow orderAn exception will be thrown if the status is OMQ::StatInProgress
BLOCK-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |
any OMQ::UserApi::call_network_api | ( | string | $call | ) |
calls a system API and returns the result
include any arguments after the method name, ex:
$call | the full api method name (ex: "omq.system.exec-synchronous-exiting" ); see Network System API for a full list |
UNKNOWN-API-CALL | invalid API method |
INVALID-INTERNAL-API-CALL | API may not be called internally (ex: omq.system.shutdown-wait()) |
any OMQ::UserApi::call_network_api_args | ( | string | $call, |
softlist | $args | ||
) |
calls a system API with the argument list to the API method as a top-level argument to this function
$call | the full api method name (ex: "omq.system.exec-synchronous-exiting" ); see Network System API for a full list |
$args | any arguments to the method; if multiple argument should be passed to the method, use a list of arguments here |
UNKNOWN-API-CALL | invalid API method |
INVALID-INTERNAL-API-CALL | API may not be called internally (ex: omq.system.shutdown-wait()) |
any OMQ::UserApi::call_network_api_args_with_authentication | ( | string | $user, |
string | $pass, | ||
string | $call, | ||
softlist | $args | ||
) |
calls a system API with authentication information (username and password)
$user | the username to use for the call |
$pass | the password to use for the call |
$call | the full api method name (ex: "omq.system.exec-synchronous-exiting" ); see Network System API for a full list |
$args | any arguments to the method; if multiple argument should be passed to the method, use a list of arguments here |
UNKNOWN-API-CALL | invalid API method |
INVALID-INTERNAL-API-CALL | API may not be called internally (ex: omq.system.shutdown-wait()) |
any OMQ::UserApi::callNetworkAPI | ( | string | $call, |
softlist | $args | ||
) |
any OMQ::UserApi::callNetworkAPIArgs | ( | string | $call, |
softlist | $args | ||
) |
OMQ::UserApi::cancel_order | ( | softint | $wfiid | ) |
cancel the given workflow order data instance
$wfiid | the workflow order instance ID to cancel |
workflow_status:
the status of the workflow orderAn exception will be thrown if the status is OMQ::StatInProgress
CANCEL-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |
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
$name | the name of the workflow |
$version | the version of the workflow; if this parameter is not passed, then the latest version of the workflow (determined by the latest created date for the workflow_instance entry) will be used |
$params | The hash passed must have at either a staticdata key or an external_order_instanceid key, valid keys:
|
$status | create the workflow order data instance with this status; may be either:
|
SUBMIT-DATA-ERROR | unknown workflow, invalid status |
public string OMQ::UserApi::create_sql_string | ( | ) |
DEPRECATED: returns a string suitable for use in a dyanamic Oracle SQL query string based on the arguments passed.
public string OMQ::UserApi::create_sql_string2 | ( | any | $driver | ) |
returns a string suitable for use in a dynamic SQL query string (driver-dependent) based on the arguments passed
returns a string from a date suitable for use in a dynamic SQL string depending on the driver
public any 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
$data | the string data to deserialize |
hash OMQ::UserApi::exec_synchronous_workflow | ( | 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
$name | the workflow name |
$version | the workflow version (if NOTHING then the latest version of the workflow will be used) |
$sdata | the static data hash for the workflow order |
$opts | the options for the synchronous workflow execution instance |
$ddata | the optional initial dynamic data hash for the workflow order |
$priority | the order priority for the order |
$orderkeys | optional order keys for the order |
$external_order_instanceid | the optional external order instanceid for the order |
$parent_workflow_instanceid | an optional loosely-coupled workflow order ID that will be marked as the parent of this order; if this key is not set, and this 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 |
workflow_instanceid:
the workflow order instance IDstatus
the order status commit to the database (for possible values, see Workflow, Segment, and Step Status Descriptions)doubles single quotes (\') in strings and returns the new string
public string OMQ::UserApi::fix_quotes | ( | reference | $str | ) |
doubles single quotes (\') in strings and returns the new string
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.
jobid:
the metadata jobid of the job typename:
the job nameversion:
the job versiondescription:
the job descriptiontrigger:
a string describing the timer/trigger for the jobjob_instanceid
]: the id of the job instance (will only have a value if the job is currently executing)last_executed
]: the last executed date/time of the job (NOTHING if not yet executed)expiry_date
]: the expiry date of the job, if any; if this date is present, then the job will not run automatically after this datesingle_instance:
True if the job can only be run in a single Qorus instance, False if no such restriction is enablednext
]: the next trigger date/time; this key is only included if the job is activeactive:
this value is always True
because this API only returns information about active jobsQore::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
$name | the name of the datasource |
$register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
DATASOURCE-ERROR | The given connection is not known or is a system datasource |
returns a hash of datasource information for the given datasource, if known, otherwise throws an exception
$name | the name of the datasource |
name
(string): the name of the connectiontype
(string): the DBI driver providing the DB connectionuser
(string): the username for the connection, if anypass
(string): the password for the connection, if anycharset
(string): the DB-specific character encoding for the connectiondb
(string): The database name of the connectionoptions
(hash): an optional hash of options for the DBI driver for this connection; also "min"
and "max"
for the DatasourcePool minimum and maximum optionslocked
(bool): a flag indicating if the datasource is locked or not (the system datasource "omq"
is locked)up
(bool): a flag indicating if monitoring has discovered if the datasource is up or notdesc
(string): a string description of the datasource without the passworddesc_pwd
(string): a string description of the datasource with the password (can be passed to the Datasource and DatasourcePool constructor, for example)monitor
(bool): a flag indicating if the datasource is monitored or notstatus
(string): "OK"
if the datasource is up or an error string if the datasource is down; set by monitoringlast_check
(date/time): the date and time of the last monitoring checkshared_pool
(string): a string giving the pool state (only present if a pool has been initialized on the datasource)deps
(list): a list of hashes giving interface objects that depend on the connection; each entry is a hash with the following keys:type:
"WORKFLOW"
, "SERVICE"
, or "JOB"
workflowid:
for workflows, gives the workflow IDserviceid:
for services, gives the service IDjobid:
for jobs, gives the job IDname:
the name of the workflow, service, or jobversion:
the version of the workflow, service, or jobdesc:
a string description of the objectDATASOURCE-ERROR | unknown datasource |
Qore::SQL::DatasourcePool OMQ::UserApi::get_datasource_pool | ( | string | $name, |
bool | $register_dependency = True |
||
) |
returns a DatasourcePool object for the given datasource name
$name | the name of the datasource |
$register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
DATASOURCE-ERROR | unknown or system datasource |
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.
$name | the name of the datasource |
$register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
DATASOURCE-ERROR | The given connection is not known or is a system datasource |
any 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.
hash OMQ::UserApi::get_qorus_option_info | ( | ) |
returns a hash giving information about system options
hash OMQ::UserApi::get_qorus_option_info_args | ( | softlist | $args | ) |
returns a hash giving information about system options
any OMQ::UserApi::get_qorus_options | ( | ) |
returns the value of the given system option or options
any OMQ::UserApi::get_qorus_options_args | ( | softlist | $args | ) |
returns the value of the given system option or options
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 <-> Qorus remote REST connection.
$name | the name of the connection |
$connect | if False an unconnected object will be returned, otherwise the object is already connected |
$register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
GET-REMOTE-ERROR | The given connection is not known |
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 <-> Qorus remote connection.
$name | the name of the connection |
$connect | if False an unconnected object will be returned, otherwise the object is already connected |
$register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
GET-REMOTE-ERROR | The given connection is not known |
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
$id | workflow execution instance id |
name:
the name of the workflowversion:
version of the workflowworkflowid:
the workflowid of the workflowexecutionID:
the workflow execution instance id (same as the argument)mode:
WM_Normal, WM_Recovery, WM_Synchronousstatus:
WISInitializing, WISRunning, WISWaiting, WISStoppingiterations:
number of segment iterations performed so fartotalSegments:
number of segments executederrors:
total number of errors encounteredwarnings:
total number of warnings raisedstarttime:
date/time the execution instance was startedoptions:
options set on the workflow execution instancelogfile:
log file namereturns a list of hashes giving information about the currently-running workflow execution instances
$name | optional workflow name for filtering the result list |
$ver | optional workflow version for filtering the result list (only used if name also passed) |
executionID:
the workflow execution instance idname:
the name of the workflowversion:
version of the workflowworkflowid:
the workflowid of the workflowmode:
WM_Normal, WM_Recovery, WM_Synchronousstatus:
WISInitializing, WISRunning, WISWaiting, WISStoppingiterations:
number of segment iterations performed so fartotalSegments:
number of segments executederrors:
total number of errors encounteredwarnings:
total number of warnings raisedstarttime:
date/time the execution instance was startedoptions:
options set on the workflow execution instancelogfile:
log file namereturns information about the given service (if it's currently loaded)
to get information about services whether they are loaded or not, call:
$type | the type of service (either "system" or "user" ; case is ignored) |
$name | the name of the system service to query |
type:
either "system"
or "user"
corresponding to the argumentname:
the name of the serviceversion:
version of the servicedesc:
description of the serviceserviceid:
service IDstatus:
SSRunning or SSLoadedthreads:
number of running threads in the serviceautostart:
True
of False
if the autostart flag is setloaded:
date/time the service was loadedmethods:
list of hashes for each method with name
and desc
keys int OMQ::UserApi::get_session_id | ( | ) |
returns the current Qorus application session ID
public any OMQ::UserApi::get_sql_number | ( | any | $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
$v | the value to use a number in an SQL query |
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
$v | value to return as a string that can be directly used in an SQL query |
$size | if non-zero, give the maximum size in characters of the string |
hash OMQ::UserApi::get_system_info | ( | ) |
returns a hash of system info
instance-key
: value of the system option by the same namesession-id
: the session ID for the current Qorus application sessionomq-version
: the version string for the Qorus serveromq-version-code
: a numeric code of the Qorus server version, whereomq-version-code
= 20600)qore-version
: the version string for the qore build useddatamodel-version
: the datamodel version required by this version of Qorusomq-schema
: the datasource string for the system schema (without the password)omquser-schema
: the datasource string for the user schema (without the password)starttime:
the date and time when the instance was startedhostname:
the hostname of the machine where the Qorus server is runningpid:
the PID of the Qorus server processthreads:
number of threads currently activeschema-properties
: a hash of schema properties with the following keys:omq-schema-version
omq-schema-compatibility
omq-load-schema-compatibility
logfile:
the path for the system log fileomq-version-code
returns information about the given system service (if it's currently loaded)
to get information about system services whether they are loaded or not, call:
$name | the name of the system service to query |
type:
"system"
name:
the name of the serviceversion:
version of the servicedesc:
description of the serviceserviceid:
service IDstatus:
SSRunning or SSLoadedthreads:
number of running threads in the serviceautostart:
True
of False
if the autostart flag is setloaded:
date/time the service was loadedmethods:
list of hashes for each method with name
and desc
keysobject OMQ::UserApi::get_user_connection | ( | string | $name, |
bool | $connect = True , |
||
bool | $register_dependency = True , |
||
*hash | $rtopts | ||
) |
Returns an object corresponding to a defined user connection.
$name | the name of the connection |
$connect | if False an unconnected object will be returned, otherwise the object is already connected |
$register_dependency | if True (the default) then if the connection is monitored as down, the calling interface will be temporarily disabled until the connection is up again |
$rtopts | any runtime options accepted by the connection |
CONNECTION-ERROR | The given connection is not known |
returns information about the given user service (if it's currently loaded)
to get information about user services whether they are loaded or not, call:
$name | the name of the user service to query |
type:
"user"
name:
the name of the serviceversion:
version of the servicedesc:
description of the serviceserviceid:
service IDstatus:
SSRunning or SSLoadedthreads:
number of running threads in the serviceautostart:
True
of False
if the autostart flag is setloaded:
date/time the service was loadedmethods:
list of hashes for each method with name
and desc
keysdeprecated any OMQ::UserApi::getOption | ( | ) |
public deprecated any OMQ::UserApi::getOracleNumber | ( | any | $v | ) |
hash OMQ::UserApi::getRunningWorkflowInfo | ( | softint | $id | ) |
list OMQ::UserApi::getRunningWorkflowList | ( | ) |
int OMQ::UserApi::getSessionID | ( | ) |
public deprecated any OMQ::UserApi::getSQLNumber | ( | any | $v | ) |
hash OMQ::UserApi::getSystemInfo | ( | ) |
OMQ::UserApi::log | ( | softint | $lvl, |
softstring | $msg | ||
) |
Saves 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 verbose.
$lvl | if this value is lower than or equal to the value of the Qorus system verbose option, the message logged in the appropriate log file, otherwise the message is ignored. See Log Levels for valid values |
$msg | the format string for a vsprintf() call with the remaining arguments |
public string OMQ::UserApi::make_select_list | ( | any | $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
public string OMQ::UserApi::make_select_list2 | ( | any | $driver, |
any | $list | ||
) |
returns a string based on a list, processed for the values in the list to be used in a dynamic SQL string
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.
$arg | the number of seconds to sleep |
STOP-ERROR | the current object is stopping and this function already returned -1 as a warning |
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.
$arg | the number of microseconds to sleep (1 microsecond = 1/1000000 of a second) |
STOP-ERROR | the current object is stopping and this function already returned -1 as a warning |
returns a string from a date suitable for use in a dynamic oracle SQL string
public deprecated bool OMQ::UserApi::parseBoolean | ( | any | $v | ) |
posts an application event of class QE_CLASS_USER
$severity | see Error Severity Codes for possible values |
$info | the user-defined information for the event |
POST-USER-EVENT-ERROR | invalid severity value |
returns a string giving the local system URL
$username | an optional username for the new connection |
$password | an optional password for the new connection |
raises a transient system alert from a workflow, service, or job
alert | the name of the alert (ex: "DATA-SIZE-EXCEEDED" ) |
reason | the reason or verbose description of the alert |
info | optional key / value details for the alert |
uses the select operator to remove all occurences of a value from a list
public list OMQ::UserApi::remove_from_list | ( | reference | $list, |
any | $val | ||
) |
uses the select operator to remove all occurences of a value from a list
DEPRECATED: remove an element from a list.
hash OMQ::UserApi::runtime_properties | ( | ) |
returns Qorus runtime properties as a hash
hash OMQ::UserApi::runtimeProperties | ( | ) |
public string OMQ::UserApi::serialize_qorus_data | ( | any | $d | ) |
returns a string giving the default serialization of the given data structure for storage in Qorus
the default serialization is currently YAML
$d | the data to serialize |
OMQ::UserApi::set_option | ( | hash | $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
$hash | a hash of option-value pairs |
WORKFLOW-OPTION-ERROR | invalid option name |
deprecated OMQ::UserApi::setOption | ( | hash | $hash | ) |
OMQ::UserApi::unblock_order | ( | softint | $wfiid, |
*hash | $tempdata | ||
) |
unblocks the given workflow order data instance
$wfiid | the workflow order instance ID to unblock |
workflow_status:
the status of the workflow orderBLOCK-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |
OMQ::UserApi::uncancel_order | ( | softint | $wfiid, |
*hash | $tempdata | ||
) |
uncancels the given workflow order data instance
$wfiid | the workflow order instance ID to uncancel |
workflow_status:
the status of the workflow orderCANCEL-WORKFLOW-ERROR | invalid status, foreign session id, missing original status, uncancel operation already in progress |