Qorus Integration Engine®  3.1.1.p9
Service API Reference

Introduction to the Qorus Service API

Each service's Program container is set up with the following imported objects:

In addition to the above, all public constants in the OMQ namespace are available.

See also
Implementing Services

Service Program Container

Each Qorus service has a single Qore Program object containing all its code for service methods, as well as any library objects imported into the Program object (classes, constants, and functions listed as attributes of the service when the service is defined). Service Program objects are restricted from using elements of the Qore Language related to process and thread control; the use of these functions is either dangerous or could violate the integrity of the Qorus server process and therefore is restricted.

To enforce these restrictions, service Program objects are created with the following parse restrictions:

Directive Constant Description
%no-top-level Qore::PO_NO_TOP_LEVEL_STATEMENTS No code is allowed in the top-level statement (outside a function or class)
%no-thread-control Qore::PO_NO_THREAD_CONTROL Thread management functionality is unavailable
%no-process-control Qore::PO_NO_PROCESS_CONTROL Functionality that affects the entire process is unavailable
%require-our Qore::PO_REQUIRE_OUR All variables must be declared before use

Please note that despite these restrictions, service program objects have most of the Qore language API and class library available for use.

Furthermore, the following parse defines are defined:

Define Availability Description
Qorus W, S, J Identifies code in Qorus
QorusHasAlerts W, S, J Marks the availability of the alert API (Qorus 3.0+)
QorusHasHttpUserIndex S Marks the availability of OMQ::AbstractServiceHttpHandler::setUserIndexInfo() (Qorus 3.0+)
QorusHasTableCache W, S, J Marks the availability of the table cache API (Qorus 3.1+)
QorusHasUserConnections W, S, J Marks the availability of the connection API (Qorus 3.0+)
QorusServer W, S, J Identifies code used in Qorus server interfaces
QorusService S Identifies code used in a service Program container
Note
All defines set in defines (common to workflows, services, and jobs) are also set in service Program containers

Global Variables

Services may declare global variables, but because the %no-top-level parse restriction is set for the Program object; they may not be initialized at the top level of the program.

Initialize them in the init() method instead; global variables may also be declared here if desired. Global variables may be declared anywhere in the Program object; they do not have to be declared at the top level of the service program.

Service API Functions

The following functions are imported into service program logic containers (see also OMQ::UserApi::Service):

Name Domain Availability Description
audit_check_event_string() Audit W, S, J checks if the given audit event (given as a string) is enabled
audit_check_event() Audit W, S, J checks if the given audit event (given as an integer code) is enabled
audit_get_mask() Audit W, S, J returns the audit event mask
audit_user_event() Audit W, S, J creates a user audit event (with audit event code OMQ::AE_USER_EVENT) against the workflow, service, or job instance
call_network_api() Utility W, S, J calls a system RPC API with system permissions
call_network_api_args() Utility W, S, J calls a system RPC API with system permissions with an explicit argument list argument
call_network_api_args_with_authentication() Utility W, S, J calls a system RPC API with authentication information (username and password)
call_rest_api() Utility W, S, J calls a system REST API with system permissions
call_rest_api_with_authentication() Utility W, S, J calls a system REST API with authentication information (username and password)
clear_sql_table_cache() SQL Cache W, S, J clears a cached table from the SQL cache
create_order() Utility W, S, J creates a workflow order data instance in the database and returns the workflow_instanceid of the order created
create_remote_order() Utility W, S, J creates a workflow order data instance in a remote Qorus instance and returns the workflow_instanceid of the order created
deserialize_qorus_data() Utility W, S, J deserializes strings to Qore data structures
exec_synchronous_workflow() Utility W, S, J executes a workflow order synchronously and returns the result of execution
flush_sla_events() SLA W, S, J flushes all pending SLA events to the DB
get_active_jobs() System Info W, S, J returns information about active jobs
get_datasource_dedicated() Connections W, S, J returns a dedicated Qore::SQL::Datasource object
get_datasource_pool() Connections W, S, J returns a shared Qore::SQL::DatasourcePool object
get_datasource_shared() Connections W, S, J returns a shared Qore::SQL::Datasource object
get_option() Options W, S, J returns the value of one or more system or interface options
get_qorus_options() Options W, S, J returns the value of system options
get_qorus_options_args() Options W, S, J returns the value of system options
get_qorus_option_info() Options W, S, J returns information about system options
get_qorus_option_info_args() Options W, S, J returns information about system options
get_remote_rest_connection() Connections W, S, J returns a QorusSystemRestHelper to a remote Qorus instance
get_remote_rpc_connection() Connections W, S, J returns a QorusSystemAPIHelper to a remote Qorus instance
get_running_workflow_info() System Info W, S, J returns information about a running workflow execution instance
get_running_workflow_list() System Info W, S, J returns information about running workflow execution instances
get_service_info() System Info W, S, J returns information about a service
get_session_id() System Info W, S, J returns the current application session ID
get_sql_table() SQL Cache W, S, J retrieves an AbstractTable object from the SQL cache for DML operations
get_sql_cache_info() SQL Cache W, S, J returns information about the SQL cache
get_system_info() System Info W, S, J returns information about the system
get_system_service_info() System Info W, S, J returns information about a system service
get_user_connection() Connections W, S, J returns the given user connection object
get_user_service_info() System Info W, S, J returns information about a user service
get_value_map() Value Maps W, S, J retrieves a value mapping from a value map
get_value_maps() Value Maps W, S, J retrieves a list of all known value sets
log() logging W, S, J outputs a log message in the service's log file
next_sequence_value() Utility W, S, J returns the next value from the given datasource and database sequence
parse_uri_query() Utility W, S, J parses a URI query string in a URI path and returns the parsed data structure
prop_get() System Props W, S, J returns the value of the given system property key in the given domain or NOTHING if the system property does not exist
prop_update() System Props W, S, J changes (inserts, updates, or deletes) the value of one or more system properties
post_sla_event_error() SLA W, S, J posts an unsuccessful event for SLA and performance tracking
post_sla_event_success() SLA W, S, J posts a successful event for SLA and performance tracking
post_sync_event() Utility W, S, J posts a workflow synchronization event given the event type name and event key
post_user_event() Utility W, S, J posts an application event of class OMQ::QE_CLASS_USER
qorus_get_local_url() System Info W, S, J returns a URL for the current system
raise_transient_alert() Alerts W, S, J raises a transient alert
restart_transaction() Utility W, S, J enables recovery from restartable DB communication errors
runtime_properties() System Info W, S, J returns information about runtime system properties defined
serialize_qorus_data() Utility W, S, J serializes Qore data structures to strings
set_option() Options W, S, J sets option values on a workflow, service, or job
svc_bind_ftp() Service FTP S Binds an FTP handler to the service and starts FTP listeners
svc_bind_handler() Service HTTP S Binds a new HTTP handler to a dedicated HTTP service listener
svc_bind_http() Service HTTP S Binds an HTTP handler to the service
svc_call_api_as_current_user() Service System S Calls a system RPC API as the current external user (if any) and returns the result
svc_check_authorization() Service RBAC S checks the current user for all given permissions and throws an exception if not
svc_check_authorization_or() Service RBAC S checks the current user for any of the given permissions and throws an exception if not
svc_check_job_access() Service RBAC S Checks if the current user can access all the given jobs and throws an exception if not
svc_check_job_instance_access() Service RBAC S Checks if the current user can access the given job instance and throws an exception if not
svc_check_mapper_access() Service RBAC S Checks if the current user can access all the given mappers and throws an exception if not
svc_check_queue_access() Service RBAC S Checks if the current user can access all the given asynchronous queues and throws an exception if not
svc_check_service_access() Service RBAC S Checks if the current user can access all the given services and throws an exception if not
svc_check_vmap_access() Service RBAC S Checks if the current user can access all the given value maps and throws an exception if not
svc_check_workflow_access() Service RBAC S Checks if the current user can access all the given workflows and throws an exception if not
svc_check_workflow_instance_access() Service RBAC S Checks if the current user can access the given workflow order instance and throws an exception if not
svc_get_active_jobs_as_current_user() Service Info S Returns a hash of all active jobs visible to the current external user (if any)
svc_get_call_context() Service Info S Returns a hash of contextual information about the current service call
svc_get_call_context_string() Service Info S Returns a string describing the context of the current call
svc_get_http_call_context() Service HTTP S Returns a hash with info about the external HTTP call, if any
svc_get_job_access_hash() Service RBAC S Returns a hash of all job IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no jobs
svc_get_job_access_list() Service RBAC S Returns a list of all job IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no jobs
svc_get_last_events() Service Events S Returns the last system events corresponding to the arguments
svc_get_last_events_and() Service Events S Returns the last system events that meet all the criteria given
svc_get_last_events_or() Service Events S Returns the last system events that meet any of the criteria given
svc_get_mapper_access_hash() Service RBAC S Returns a hash of all mapper IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no mappers
svc_get_mapper_access_list() Service RBAC S Returns a list of all mapper IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no mappers
svc_get_resource() Service Resources S returns the requested resource as a hash with HTTP headers and an HTTP response code to be used as the response for an HTTP request handler
svc_get_resource_data() Service Resources S returns the requested resource as its native type
svc_get_resource_hash() Service Resources S returns a hash describing all resources for the service
svc_get_resource_list() Service Resources S returns a list of all resources for the service
svc_get_resource_wsdl() Service Resources S returns the given resource as a WebService object
svc_get_running_workflow_list_as_current_user() Service Info S Returns a list of running workflows visible to the current external user, if any
svc_get_service_access_hash() Service RBAC S Returns a hash of all services IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no services
svc_get_service_access_list() Service RBAC S Returns a list of all services IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no services
svc_get_template_hash() Service Resources S returns a hash describing all template resources for the service
svc_get_service_info() Service Info S Returns a hash of information about the current service
svc_get_service_info_as_current_user() Service Info S Returns information about the given service if the current external user, if any, can access it
svc_get_template_list() Service Resources S returns a list of all template resources for the service
svc_get_vmap_access_hash() Service RBAC S Returns a hash of all value map IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no value maps
svc_get_vmap_access_list() Service RBAC S Returns a list of all value map IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no value maps
svc_get_workflow_access_hash() Service RBAC S Returns a hash of all workflow IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no workflows
svc_get_workflow_access_list() Service RBAC S Returns a list of all workflow IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no workflows
svc_has_resource() Service Resources S returns True if the given resource exists
svc_has_template() Service Resources S returns True if the given resource is a template
svc_register_soap_handler() Service SOAP S Registers the current service as a SOAP server
svc_render_template() Service Resources S explcitly renders the given template resource and returns the rendered data
svc_start_thread() Service Threads S Starts a service thread
svc_start_thread_args() Service Threads S Starts a service thread with the given arguments as a list argument
svc_test_authorization() Service RBAC S Returns True if the current user has all given permissions
svc_test_authorization_or() Service RBAC S Returns True if the current user has any of the given permissions
svc_test_job_access() Service RBAC S Returns True if the current user can access all the given jobs
svc_test_mapper_access() Service RBAC S Returns True if the current user can access all the given mappers
svc_test_service_access() Service RBAC S Returns True if the current user can access all the given services
svc_test_vmap_access() Service RBAC S Returns True if the current user can access all the given value maps
svc_test_workflow_access() Service RBAC S Returns True if the current user can access all the given workflows
svc_try_render_template() Service Resources S if the given template resource exists then it is rendered and the rendered data is returned
svc_try_get_resource() Service Resources S returns the given resource if it exists as a hash with HTTP headers and an HTTP response code to be used as the response for an HTTP request handler
svc_try_get_resource_data() Service Resources S returns the given resource if it exists as its native type
svc_ui_extension_register() Service HTTP S Registers the current service as a UI extension handler
svc_wait_for_events() Service Events S Waits for system events corresponding to the arguments
svc_wait_for_events_and() Service Events S Waits for system events that meet all the criteria given
svc_wait_for_events_or() Service Events S Waits for system events that meet any of the criteria given

Service API Classes

The following classes are imported into service program logic containers:

Name Availability Description
AbstractAuthenticator S Allows the service to define custom authentication handlers for external HTTP and FTP requests
AbstractFsRemoteReceive W, S, J provides an API for streaming data from a remote filesystem through a remote Qorus instance
AbstractFtpHandler S Allows the service to implement an FTP server and handle FTP requests from clients
AbstractHttpRequestHandler S Allows the service to refer to AbstractHttpRequestHandler methods directly
AbstractParallelStream W, S, J provides an abstract base class for streaming data to or from a remote database through a remote Qorus instance and also provides static helper methods
AbstractPersistentDataHelper S Used when defining persistent HTTP connection support in services
AbstractRestClass S Used when defining REST request handling in a service
AbstractRestStreamRequestHandler S Allows the service to implement data stream handlers
AbstractServiceStream S Used when defining custom stream handlers in a service
AbstractServiceDataStreamResponseHandler S Used when defining custom stream handlers in a service
AbstractServiceHttpHandler S Allows the Qorus HTTP server to redirect HTTP requests to a service
AbstractServiceRestHandler S Allows the service to implement a REST handler and serve external REST requests
AbstractServiceWebSocketHandler S Allows the service to implement a Web Socket service handler
DbRemote W, S, J provides an API wrapper for all system.sqlutil service methods
DbRemoteReceive W, S, J provides an API for streaming data from a remote database through a remote Qorus instance
DbRemoteSend W, S, J provides an API for streaming data to a remote database through a remote Qorus instance
FsRemote W, S, J provides an API wrapper for all system.fs service methods
FsRemoteSend W, S, J provides an API for streaming data to a remote filesystem through a remote Qorus instance
PermissiveAuthenticator S Used to indiscriminately authenticate all requests in HTTP and FTP request handlers
QorusExtensionHandler S Allows the service to extend the Qorus web UI
QorusInboundTableMapper W, S, J provides an API for mapping data to a DB table
QorusInboundTableMapperIterator W, S, J provides an iterator-based API for mapping data to a DB table
QorusRawSqlStatementOutboundMapper W, S, J provides an API for mapping from SQL statement using direct SQL statements passed in
QorusRemoteServiceHelper W, S, J provides an API for calling service methods in remote Qorus instances
QorusSqlStatementOutboundMapper W,S, J provides an API for mapping from SQL statement using SqlUtil
QorusSystemAPIHelper W, S, J provides an API for calling RPC API methods in remote Qorus instances
OMQ::QorusSystemRestHelper W, S, J provides an API for using the REST API in remote Qorus instances
QorusWebSocketConnection S Used when defining web socket service handlers
RestHandler S Allows the service to access RestHandler methods directly when servicing REST requests
ServiceFileHandler S Allows services to implement HTTP file-based request handlers

Service API Modules

The following modules are imported by default into service program logic containers:

Name Availability Description
json W, S, J provides APIs for JSON data serialization and deserialization support
Mime W, S, J provides MIME definitions and functionality
Mapper W, S, J provides a data-mapping API
SoapClient W, S, J provides a SOAP client API
SqlUtil W, S, J provides high-level APIs for programmatic DML (SQL data manipulation), DDL (creating, querying, manipulating database definitions), and DBA operations
TableMapper W, S, J provides high-level APIs for mapping data to and from database tables
Util W, S, J provides utility APIs
uuid W, S, J provides an API for generating UUIDs
xml W, S, J provides APIs for parsing, validating, and generating XML documents
yaml W, S, J provides APIs for Qore's YAML-based data serialization and deserialization support
Note
other modules can be imported using the %requires directive, and it's always safe to %require a module that's already imported into the current Program container

Service API Overview

This section lists all of the functions specific to services.

See also
  • Qorus Common Server API for APIs and API concepts common to all Qorus server code (workflows, services, and jobs).
  • Qorus Common API for a definition of API definitions common to all Qorus user code (workflows, services, and jobs) as well as the client library.
Note
Service-specific API functions are found in the OMQ::UserApi::Service namespace and are prefixed by "svc_" for consistency's sake and ease of identification.

Logging function (common API function):

Service Resource Functions

Name Desc
svc_get_resource() returns the requested resource as a hash with HTTP headers and an HTTP response code to be used as the response for an HTTP request handler
svc_get_resource_data() returns the requested resource as its native type
svc_get_resource_hash() returns a hash describing all resources for the service
svc_get_resource_list() returns a list of all resources for the service
svc_get_resource_wsdl() returns the given resource as a WebService object
svc_get_template_hash() returns a hash describing all template resources for the service
svc_get_template_list() returns a list of all template resources for the service
svc_has_resource() returns True if the given resource exists
svc_has_template() returns True if the given resource is a template
svc_render_template() explcitly renders the given template resource and returns the rendered data
svc_try_render_template() if the given template resource exists then it is rendered and the rendered data is returned
svc_try_get_resource() returns the given resource if it exists as a hash with HTTP headers and an HTTP response code to be used as the response for an HTTP request handler
svc_try_get_resource_data() returns the given resource if it exists as its native type

Service RBAC Functions

Name Desc
svc_check_authorization() checks the current user for all given permissions and throws an exception if not
svc_check_authorization_or() checks the current user for any of the given permissions and throws an exception if not
svc_check_job_access() Checks if the current user can access all the given jobs and throws an exception if not
svc_check_job_instance_access() Checks if the current user can access the given job instance and throws an exception if not
svc_check_mapper_access() Checks if the current user can access all the given mappers and throws an exception if not
svc_check_queue_access() Checks if the current user can access all the given asynchronous queues and throws an exception if not
svc_check_service_access() Checks if the current user can access all the given services and throws an exception if not
svc_check_vmap_access() Checks if the current user can access all the given value maps and throws an exception if not
svc_check_workflow_access() Checks if the current user can access all the given workflows and throws an exception if not
svc_check_workflow_instance_access() Checks if the current user can access the given workflow order instance and throws an exception if not
svc_get_job_access_hash() Returns a hash of all job IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no jobs
svc_get_job_access_list() Returns a list of all job IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no jobs
svc_get_mapper_access_hash() Returns a hash of all mapper IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no mappers
svc_get_mapper_access_list() Returns a list of all mapper IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no mappers
svc_get_service_access_hash() Returns a hash of all services IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no services
svc_get_service_access_list() Returns a list of all services IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no services
svc_get_vmap_access_hash() Returns a hash of all value map IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no value maps
svc_get_vmap_access_list() Returns a list of all value map IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no value maps
svc_get_workflow_access_hash() Returns a hash of all workflow IDs accessible by the user, NOTHING if there are no restrictions, or an empty hash if the user can access no workflows
svc_get_workflow_access_list() Returns a list of all workflow IDs accessible by the user, NOTHING if there are no restrictions, or an empty list if the user can access no workflows
svc_test_authorization() Returns True if the current user has all given permissions
svc_test_authorization_or() Returns True if the current user has any of the given permissions
svc_test_job_access() Returns True if the current user can access all the given jobs
svc_test_mapper_access() Returns True if the current user can access all the given mappers
svc_test_service_access() Returns True if the current user can access all the given services
svc_test_vmap_access() Returns True if the current user can access all the given value maps
svc_test_workflow_access() Returns True if the current user can access all the given workflows

Service SOAP Functions

Name Desc
svc_register_soap_handler() Registers the current service as a SOAP server

Service HTTP and UI Functions

Name Desc
svc_bind_handler() Binds a new HTTP handler to a dedicated HTTP service listener
svc_bind_http() Binds an HTTP handler to the service
svc_ui_extension_register() Registers the current service as a UI extension handler
svc_get_http_call_context() Returns a hash with info about the external HTTP call, if any

Service FTP Functions

Name Desc
svc_bind_ftp() Binds an FTP handler to the service and starts FTP listeners

Service Event Handling Functions

Name Desc
svc_get_last_events() Returns the last system events corresponding to the arguments
svc_get_last_events_and() Returns the last system events that meet all the criteria given
svc_get_last_events_or() Returns the last system events that meet any of the criteria given
svc_wait_for_events() Waits for system events corresponding to the arguments
svc_wait_for_events_and() Waits for system events that meet all the criteria given
svc_wait_for_events_or() Waits for system events that meet any of the criteria given
svc_call_api_as_current_user() Calls a system RPC API as the current external user (if any) and returns the result

Service System Functions

Name Desc
svc_call_api_as_current_user() Calls a system RPC API as the current external user (if any) and returns the result

Service Info Functions

Name Desc
svc_get_active_jobs_as_current_user() Returns a hash of all active jobs visible to the current external user (if any)
svc_get_call_context() Returns a hash of contextual information about the current service call
svc_get_call_context_string() Returns a string describing the context of the current call
svc_get_running_workflow_list_as_current_user() Returns a list of running workflows visible to the current external user, if any
svc_get_service_info() Returns a hash of information about the current service
svc_get_service_info_as_current_user() Returns information about the given service if the current external user, if any, can access it

Service Threading Functions

Name Desc
svc_start_thread() Starts a service thread
svc_start_thread_args() Starts a service thread with the given arguments as a list argument
Deprecated Service API Functions
Backwards-Compatible Functions
Old backwards-compatible service API functions (will be maintained indefinitely for backwards compatibility):

System Event Processing

Each event hash has the the following keys:

  • id (int): the unique event ID for the application session; the first event starts with 1 and increases serially with each event
  • time (date): the date and time the event was submitted with a resolution to the microsecond
  • timeus (int): the microsecond value of the event (i.e. 0-999); this value is included separately because when the date and time are serialized through some protocols (such as XML-RPC), then microsecond value is lost
  • class (int): the event class code of the event
  • classstr (string): the string designation corresponding to the event class code (see the keys of the OMQ::QE_RMAP_CLASS Constant Hash for possible values)
  • event (int): the event code for the event
  • eventstr (string): the string designation corresponding to the event code (see the keys of the OMQ::QE_RMAP_EVENT Constant Hash for possible values)
  • severity (int): the severity level of the event; please note that all user events will have severity code 0 (OMQ::ES_Info). Values may be integers from -1 to 4 corresponding to the keys in the OMQ::ErrorSeverityMap hash.
  • severitystr (string): the string corresponding to the severity level; see the keys of the OMQ::ErrorSeverityOrder hash for possible values of this field.
  • caller (hash): a hash of caller information in case the event was trigger by or can be traced directly to an external call
  • compositeseverity (int) the maximum of the system and user severity levels; in case there is no user severity level; then this field is always equal to the system severity level. Values may be integers from -1 to 4 corresponding to the keys in the OMQ::ErrorSeverityMap hash.
  • compositeseveritystr (string): the string corresponding to the composite severity level; see the keys of the OMQ::ErrorSeverityOrder hash for possible values of this field
  • userseverity (integer, optional): in case the event is a user event and a user severity level was supplied; this field contains the severity level of the user event
  • userseveritystr (string, optional): in case the event is a user event and a user severity level was supplied; this field contains the string corresponding to the user severity level; see the keys of the OMQ::ErrorSeverityOrder hash for possible values of this field
  • info (hash, optional): additional event-specific information; See Event Information Descriptions for details on each message; note that user events have user-defined information in this field

Event Information Descriptions

This section contains the definitions of the info hash of event types

WORKFLOW_START Event Information Description
Event constant: OMQ::QEC_WORKFLOW_START
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • execid: The workflow execution ID
  • mode: The mode of the workflow (OMQ::WM_Normal or OMQ::WM_Recovery)
  • synchronous: True for synchronous workflows, False if not
  • options: A hash of workflow options
WORKFLOW_STOP Event Information Description
Event constant: OMQ::QEC_WORKFLOW_STOP
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • execid: The workflow execution ID
  • mode: The mode of the workflow (OMQ::WM_Normal or OMQ::WM_Recovery))
  • synchronous: True for synchronous workflows, False if not
WORKFLOW_CACHE_RESET Event Information Description
Event constant: OMQ::QEC_WORKFLOW_CACHE_RESET
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
WORKFLOW_DATA_SUBMITTED Event Information Description
Event constant: OMQ::QEC_WORKFLOW_DATA_SUBMITTED
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • workflow_instanceid: The workflow instance ID (i.e. workflow_instance.workflow_instanceid in the database)
  • status: The new workflow order instance's initial status (see Workflow, Segment, and Step Status Descriptions for possible status values)
WORKFLOW_INFO_CHANGED Event Information Description
Event constant: OMQ::QEC_WORKFLOW_INFO_CHANGED
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • workflow_instanceid: The workflow instance ID (i.e. workflow_instance.workflow_instanceid in the database)
  • info: The info hash for the change
WORKFLOW_STATUS_CHANGED Event Information Description
Event constant: OMQ::QEC_WORKFLOW_STATUS_CHANGED
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • workflow_instanceid: The workflow instance ID (i.e. workflow_instance.workflow_instanceid in the database)
  • info: A hash with old and new keys giving the old and new status values (see Workflow, Segment, and Step Status Descriptions for possible status values)
WORKFLOW_DATA_ERROR Event Information Description
Event constant: OMQ::QEC_WORKFLOW_DATA_ERROR
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • workflow_instanceid: The workflow instance ID (i.e. workflow_instance.workflow_instanceid in the database)
  • execid: The workflow execution ID
  • error: A hash of error information containing the following keys:
    • err: the error string (ex: exception name)
    • desc: the error description (ex: exception description)
    • info: any additional error information provided
    • business_error: True for business errors, False if not
    • stepid: the stepid of the error, if any
    • ind: the ind code of the step (array index), if any
    • retry: retry number for error
    • errorid: the error_instanceid in the database
WORKFLOW_DATA_RELEASED Event Information Description
Event constant: OMQ::QEC_WORKFLOW_DATA_RELEASED
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • workflow_instanceid: The workflow instance ID (i.e. workflow_instance.workflow_instanceid in the database)
  • status: The status of the workflow as it is released
  • business_error: The business error status of the workflow (True only if the status is OMQ::StatError due to a business error)
WORKFLOW_DATA_CACHED Event Information Description
Event constant: OMQ::QEC_WORKFLOW_DATA_CACHED
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • workflow_instanceid: The workflow instance ID (i.e. workflow_instance.workflow_instanceid in the database)
  • status: The status of the workflow as it is released
  • business_error: The business error status of the workflow (True only if the status is OMQ::StatError due to a business error)
  • external_order_instanceid: The external order instance ID of the workflow, if any
  • keys: A hash of workflow order keys, if any
WORKFLOW_DATA_UPDATED Event Information Description
Event constant: OMQ::QEC_WORKFLOW_DATA_UPDATED
  • name: The name of the workflow
  • version: The version of the workflow
  • workflowid: The workflow ID (metadata ID, i.e. workflows.workflowid in the database)
  • workflow_instanceid: The workflow instance ID (i.e. workflow_instance.workflow_instanceid in the database)
  • datatype: Type of data updated: staticdata or dynamicdata
SERVICE_START Event Information Description
Event constant: OMQ::QEC_SERVICE_START
  • type: The type of service; either USER or SYSTEM
  • name: The name of the service
  • version: The version of the service
  • serviceid: The service ID (metadata ID, i.e. services.serviceid in the database)
SERVICE_STOP Event Information Description
Event constant: OMQ::QEC_SERVICE_STOP
  • type: The type of service; either USER or SYSTEM
  • name: The name of the service
  • version: The version of the service
  • serviceid: The service ID (metadata ID, i.e. services.serviceid in the database)
SERVICE_ERROR Event Information Description
Event constant: OMQ::QEC_SERVICE_ERROR
  • type: The type of service; either USER or SYSTEM
  • name: The name of the service
  • version: The version of the service
  • serviceid: The service ID (metadata ID, i.e. services.serviceid in the database)
  • err: The error code for the error
  • desc: The error description
  • info: Additional information for the error, if available
SERVICE_AUTOSTART_CHANGE Event Information Description
Event constant: OMQ::QEC_SERVICE_AUTOSTART_CHANGE
  • type: The type of service; either USER or SYSTEM
  • name: The name of the service
  • version: The version of the service
  • serviceid: The service ID (metadata ID, i.e. services.serviceid in the database)
  • autostart: a boolean value giving the new autostart status of the service; True = autostart enabled, False = autostart disabled
JOB_START Event Information Description
Event constant: OMQ::QEC_JOB_START
  • name: The name of the job
  • version: The version of the job
  • jobid: The job ID (metadata ID, i.e. jobs.jobid in the database)
  • info: Additional information about the job; a hash with the following keys:
    • description: the job's description
    • single_instance: boolean flag, True if the job can only be run on one instance at a time on the same schema
    • run_skipped: boolean flag, True if the job will be run immediately if its last trigger time was missed due to the system being down
    • last_executed: date/time of last execution
    • next: next trigger date/time
    • trigger: a string describing the job's trigger
JOB_STOP Event Information Description
Event constant: OMQ::QEC_JOB_STOP
  • name: The name of the job
  • version: The version of the job
  • jobid: The job ID (metadata ID, i.e. jobs.jobid in the database)
JOB_INSTANCE_START Event Information Description
Event constant: OMQ::QEC_JOB_INSTANCE_START
  • name: The name of the job
  • version: The version of the job
  • jobid: The job ID (metadata ID, i.e. jobs.jobid in the database)
  • job_instanceid: The job instance ID (i.e. job_instance.job_instanceid in the database)
JOB_INSTANCE_STOP Event Information Description
Event constant: OMQ::QEC_JOB_INSTANCE_STOP
  • name: The name of the job
  • version: The version of the job
  • jobid: The job ID (metadata ID, i.e. jobs.jobid in the database)
  • job_instanceid: The job instance ID (i.e. job_instance.job_instanceid in the database)
  • status: the job instance's final status in the database (see Job Data Status Codes for possible values)
JOB_ERROR Event Information Description
Event constant: OMQ::QEC_JOB_ERROR
  • name: The name of the job
  • version: The version of the job
  • jobid: The job ID (metadata ID, i.e. jobs.jobid in the database)
  • job_instanceid: The job instance ID (i.e. job_instance.job_instanceid in the database)
  • error: a hash of error information with the following keys:
    • err: the error code
    • desc: the description of the error
    • info: optional info about the error
    • business_error: boolean flag, True if the error is a business error
    • errorid: the error instance id for the job (i.e. job_errors.job_errorid in the database)
GROUP_STATUS_CHANGED Event Information Description
Event constant: OMQ::QEC_GROUP_STATUS_CHANGED
  • name: the interface group's name
  • enabled: the new status of the group
ALERT_ONGOING_RAISED Event Information Description
Event constant: OMQ::QEC_ALERT_ONGOING_RAISED
  • type: the alert type
  • id: the ID of the object causing or related to the alert
  • alert: the string "name" of the alert
  • reason: the text giving the reason for the alert
  • name: the name of the object causing or related to the alert
  • version: the version of the object causing or related to the alert
ALERT_ONGOING_CLEARED Event Information Description
Event constant: OMQ::QEC_ALERT_ONGOING_CLEARED
  • type: the alert type
  • id: the ID of the object causing or related to the alert
  • alert: the string "name" of the alert
  • reason: the text giving the reason for the alert
  • name: the name of the object causing or related to the alert
  • version: the version of the object causing or related to the alert
ALERT_TRANSIENT_RAISED Event Information Description
Event constant: OMQ::QEC_ALERT_TRANSIENT_RAISED
  • type: the alert type
  • id: the ID of the object causing or related to the alert
  • alert: the string "name" of the alert
  • reason: the text giving the reason for the alert
  • name: the name of the object causing or related to the alert
  • version: the version of the object causing or related to the alert

Event Filter Criteria

The following gives a list of the criteria that can be used for filtering events:

  • "all": The argument with this criteria is ignored; automatically matches all events; this criteria is useful with “logical or” filtering and an “and not” list to specify all events except events matching all of the criteria in any of the “and not” criteria hashes.
  • "class": The class code for the event; the event’s class code must match this class code exactly for the criteria to match
  • "classstr": The string designation corresponding to the event class code (see the keys of the OMQ::QE_RMAP_CLASS Constant Hash for possible values); the event’s class string must match this class string exactly for the criteria to match
  • "event": The event code for the event; the event’s event code must match this event code exactly for the criteria to match
  • "eventstr": The string designation corresponding to the event code (see the keys of the OMQ::QE_RMAP_EVENT Constant Hash for possible values); the event’s event string must match this event string exactly for the criteria to match
  • "mincompositeseverity": The minimum composite severity code for the event. Composite severity is the maximum of the event and user severity levels. Values may be integers from -1 to 4 corresponding to the keys in the OMQ::ErrorSeverityMap hash. If the event has an equal or higher composite severity code, then this criteria matches.
  • "mincompositeseveritystr": The string description corresponding to the minimum composite severity code for the event. Composite severity is the maximum of the event and user severity levels. See the keys of the OMQ::ErrorSeverityOrder hash for possible values of this field. When the strings are converted to severity codes, works like the mincompositeseverity criteria.
  • "minseverity": The minimum severity code for the event; values may be integers from -1 to 4 corresponding to the keys in the OMQ::ErrorSeverityMap hash. If the event has an equal or higher severity code, then this criteria matches.
  • "minseveritystr": The string description corresponding to the minimum severity code for the event; see the keys of the OMQ::ErrorSeverityOrder hash for possible values of this field. When the strings are converted to severity codes, works like the minseverity criteria.
  • "miuserseverity": The minimum user severity for the event; values may be integers from -1 to 4 corresponding to the keys in the OMQ::ErrorSeverityMap hash. If the event has an equal or higher user severity code, then this criteria matches.
  • "minuserseveritystr": The string description corresponding to the minimum user severity code for the event; see the keys of the OMQ::ErrorSeverityOrder hash for possible values of this field. When the strings are converted to severity codes, works like the minuserseverity criteria.
  • "none": The argument with this criteria is ignored; automatically matches no events; this criteria is useful with “logical and” filtering” and an “or not” list to specify all events except those not matching the criteria in the “or not” list.
qorus-small.png
Qorus Integration Engine®