Qorus Integration Engine® Enterprise Edition 6.0.16_prod
Loading...
Searching...
No Matches
Qorus Common Server API

This section covers APIs and API concepts common to all Qorus user code, workflows, services, and jobs for the Qore programming language. Qore APIs are automatically imported in Java and Python code in Qorus, so all Qore APIs that can be imported into each language are also available in Java and Python code in Qorus.

Qorus System Utility Classes

The following Qore modules are imported into all user objects:

Name Description
json provides APIs for JSON data serialization and deserialization support
Mime provides MIME definitions and functionality
Mapper provides a data-mapping API
SoapClient provides a SOAP client API
SqlUtil provides high-level APIs for programmatic DML (SQL data manipulation), DDL (creating, querying, manipulating database definitions), and DBA operations
TableMapper provides high-level APIs for mapping data to and from database tables
Util provides utility APIs
uuid provides an API for generating UUIDs
xml provides APIs for parsing, validating, and generating XML documents
yaml provides APIs for Qore's YAML-based data serialization and deserialization support

The following Qore classes are imported into all user objects:

Qore/Python/Java Class Description
OMQ::AbstractFsRemoteReceive provides an API for streaming data from a remote filesystem through a remote Qorus instance
OMQ::AbstractParallelStream 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
OMQ::DbRemote provides an API wrapper for all system.sqlutil service methods
OMQ::DbRemoteReceive provides an API for streaming data from a remote database through a remote Qorus instance
OMQ::DbRemoteSend provides an API for streaming data to a remote database through a remote Qorus instance
OMQ::FsRemote provides an API wrapper for all system.fs service methods
OMQ::FsRemoteSend provides an API for streaming data to a remote filesystem through a remote Qorus instance
OMQ::QorusInboundTableMapper provides an API for mapping data to a DB table
OMQ::QorusInboundTableMapperIterator provides an iterator-based API for mapping data to a DB table
OMQ::QorusRawSqlStatementOutboundMapper provides an API for mapping from SQL statement using direct SQL statements passed in
OMQ::QorusRemoteServiceHelper provides an API for calling service methods in remote Qorus instances
OMQ::QorusSqlStatementOutboundMapper provides an API for mapping from SQL statement using SqlUtil
OMQ::QorusSystemAPIHelper provides an API for calling RPC API methods in remote Qorus instances
OMQ::QorusSystemRestHelper provides an API for using the REST API in remote Qorus instances
OMQ::UserApi the main Qorus API class
Note
Python and Java code require explicit imports to dynamically import Qore classes; see:

The main Qorus API class is the UserApi class, available in Java as qore.OMQ.UserApi.UserApi and in Python as simply UserApi.

Qorus Logging Methods

Qore/Python/Java Method Description
UserApi::logTrace() outputs information in the relevant log file with TRACE priority
UserApi::logDebug() outputs information in the relevant log file with DEBUG priority
UserApi::logInfo() outputs information in the relevant log file with INFO priority
UserApi::logWarn() outputs information in the relevant log file with WARN priority
UserApi::logError() outputs information in the relevant log file with ERROR priority
UserApi::logFatal() outputs information in the relevant log file with FATAL priority

All Qorus APIs are dynamically imported into Python and Java.

Example Python call:
UserApi.logInfo("log message")
Example Java call:
// this import is not necessary
import qore.OMQ.UserApi.UserApi;
UserApi.logInfo("log message");

Qorus System Information API

Qore/Python/Java Method Description
UserApi::getActiveJobs() returns information about active jobs
UserApi::getGlobalConfigItemValue() returns the value of the given configuration item on global level
UserApi::getRunningWorkflowInfo() returns information about a running workflow execution instance
UserApi::getRunningWorkflowList() returns information about running workflow execution instances
UserApi::getServiceInfo() returns information about a service
UserApi::getSessionId() returns the current application session ID
UserApi::getSystemInfo() returns information about the system
UserApi::getSystemServiceInfo() returns information about a system service
UserApi::getUserServiceInfo() returns information about a user service
UserApi::qorusGetLocalUrl() returns a URL for the current system
UserApi::runtimeProperties() returns information about runtime system defines

All Qorus APIs are dynamically imported into Python and Java.

Example Python call:
info: dict = UserApi.getSystemInfo()
Example Java call:
import qore.OMQ.UserApi.UserApi;
import org.qore.jni.Hash;
Hash info = UserApi.getSystemInfo();

Qorus System Connection API

Qore/Python/Java Method Description
UserApi::getDatasourceDedicated() returns a dedicated Qore::SQL::Datasource object
UserApi::getDatasourcePool() returns a shared Qore::SQL::DatasourcePool object
UserApi::getRemoteRestConnection() returns a QorusSystemRestHelper to a remote Qorus instance
UserApi::getRemoteRpcConnection() returns a QorusSystemAPIHelper to a remote Qorus instance
UserApi::getUserConnection() returns the given user connection object

All Qorus APIs are dynamically imported into Python and Java.

Example Python call:
from qore.SQL import DatasourcePool
dsp: DatasourcePool = UserApi.getDatasourcePool("omquser")
Example Java call:
import qore.OMQ.UserApi.UserApi;
import qore.Qore.SQL.DatasourcePool;
DatasourcePool dsp = UserApi.getDatasourcePool("omquser");

Qorus High-Level Streaming API

The following classes provide Work with Data Streaming to iterate with remote Qorus instances

Qore/Python/Java Class Description
AbstractFsRemoteReceive provides an API for streaming data from a remote filesystem through a remote Qorus instance
AbstractParallelStream 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
DbRemote provides an API wrapper for all system.sqlutil service methods
DbRemoteReceive provides an API for streaming data from a remote database through a remote Qorus instance
DbRemoteSend provides an API for streaming data to a remote database through a remote Qorus instance
FsRemote provides an API wrapper for all system.fs service methods
FsRemoteSend provides an API for streaming data to a remote filesystem through a remote Qorus instance

Qorus SQL Object Cache API

Qore/Python/Java Method Description
UserApi::clearSqlTableCache() clears a cached table from the SQL cache
UserApi::getSqlTable() retrieves an AbstractTable object from the SQL cache for DML operations
UserApi::getSqlCacheInfo() returns information about the SQL cache

Qorus Value Map API

The following functions provide APIs to work with Qorus Value Maps

Qore/Python/Java Method Description
UserApi::getValueMap() retrieves a value mapping from a value map
UserApi::getValueMaps() retrieves a list of all known value sets

Qorus System Alert APIs

Qore/Python/Java Method Description
UserApi::raiseTransientAlert() raises a transient alert

Qorus System Auditing APIs

Qore/Python/Java Method Description
UserApi::auditCheckEventString() checks if the given audit event (given as a string) is enabled
UserApi::auditCheckEvent() checks if the given audit event (given as an integer code) is enabled
UserApi::auditGetMask() returns the audit event mask
UserApi::auditUserEvent() creates a user audit event (with audit event code OMQ::AE_USER_EVENT) against the workflow, service, or job instance

Qorus System Option APIs

Qore/Python/Java Method Description
UserApi::getOption() returns the value of one or more system or interface options
UserApi::getQorusOptions() returns the value of system options
UserApi::getQorusOptionsArgs() returns the value of system options
UserApi::getQorusOptionInfo() returns information about system options
UserApi::getQorusOptionInfoArgs() returns information about system options
UserApi::setOption() sets option values on a workflow, service, or job

Qorus System Property APIs

Qore/Python/Java Method Description
UserApi::propGet() returns the value of the given system property key in the given domain or NOTHING if the system property does not exist
UserApi::propUpdate() changes (inserts, updates, or deletes) the value of one or more system properties

Qorus System General Utility APIs

Qore/Python/Java Method Description
UserApi::callNetworkApi() calls a system RPC API with system permissions
UserApi::callNetworkApiArgs() calls a system RPC API with system permissions with an explicit argument list argument
UserApi::callNetworkApiArgsWithAuthentication() calls a system RPC API with authentication information (username and password)
UserApi::callRestApi() calls a system REST API with system permissions
UserApi::callRestApiWithAuthentication() call a system REST API with authentication information (username and password)
UserApi::createOrder() creates a workflow order data instance in the database and returns the workflow_instanceid of the order created
UserApi::createRemoteOrder() creates a workflow order data instance in a remote Qorus instance and returns the workflow_instanceid of the order created
UserApi::deserializeQorusData() deserializes strings to Qore data structures
UserApi::executeFsm() executes a finite state machine registered with the interface and returns the result
UserApi::execSynchronousWorkflow() executes a workflow order synchronously and returns the result of execution
UserApi::getNextSequenceValue() returns the next value from the given datasource and database sequence
UserApi::postSyncEvent() posts a workflow synchronization event given the event type name and the unique event key
UserApi::postUserEvent() posts an application event of class OMQ::QE_CLASS_USER
UserApi::registerFsmAsObserver() registers a finite state machine as an event observer
UserApi::restartTransaction() enables recovery from restartable DB communication errors
UserApi::serializeQorusData() serializes Qore data structures to strings

Qorus System SLA APIs

Qore/Python/Java Method Description
UserApi::flushSlaEvents() flushes all pending SLA events to the DB
UserApi::postSlaEventError() posts an unsuccessful SLA and performance tracking event
UserApi::postSlaEventSuccess() posts a successful SLA and performance tracking event

Qorus System Building Block APIs

Qore/Python/Java Method Description
UserApi::expandOneVariable() expands one variable in a templated string
UserApi::expandTemplatedValue() expands all variables in a templated string
UserApi::bbParseExactlyOneVariable() parses one template variable and returns a hash with its parts
UserApi::getInputData() returns input data
UserApi::updateOutputData() updates output data
Note
all functions in the Util module are available in all user code objects in Qorus as well.

Calling Qorus Services

Qorus services can be called from anywhere in Qorus user code (from a workflow, from another service, or in a job). To call a service from Qore, use the ::omqservice object imported into every workflow, service, and job program object as follows:

omqservice.[system|user].<service_name>.<method_name>(<arguments>)

For example, to get information about a workflow order from its order key:

hash<auto> props = omqservice.system.info.searchOrderKeys({"value": "keyvalue"});

Config Item / Building Block Template Substitution Strings

Template substitution strings in building block APIs have one of the following formats:

  • $type:value
  • $type:{value}

In addition, each template substitution string can be followed by an expression giving an alternate value to use in case the first expression returns no value in the following format:

  • ??{...} where ... is a template substitution expression to use if the first expression resolves to no value

Values may be enclosed in square brackets to separate value characters from other characters that might otherwise be considered part of the value string.

Value characters for values are alphanumeric characters, plus underscore ("_"), and the dot (".") character to reference hash members. Value strings enclosed in curly brackets ('{}') can be any character except a close curly bracket ('}').

Examples:

  • Use the Account.Name value from static data
    $static:{Account.Name} 
  • Take the Account.Address.Country value from static data, if not present, use the string "USA"
    $static:{Account.Address.Country}??{USA} 
  • Take the Account.ShippingAddress value from static data, if not present, use the Account.BillingAddress value instead
    $static:{Account.ShippingAddress}??{$static:{Account.BillingAddress}} 
  • Use the first expression in the list that has a value
    $static:FullName??{$static:LegalName}??${static:Name} 
Note
  • Dot (".") characters may be escaped with a backslash character (\) before the dot to ensure that the dot is used as a part of the string and not a field separator; ex: "field\.with\.dots"
  • Template substitution is performed recursively and template strings are tokenized for processing; to prohibit template substitution, escape the first "$" character of template strings with a backslash (\); ex "\$static:not_a_template_string"
  • If intermediate elements when resolving a path are lists of data structures, and the path is resolved through the list, the resulting value will be a list of all resolved elements in the path
  • Hash keys with spaces are supported by enclosing the hash key in single or double quotes; ex: $static:'key with spaces' or by escaping the spaces; ex: $static:key\ with\ spaces

Valid types and values are given in the following table.

Template Substitution String Values

Context Type Value Data Type Read/Write Example Description
all autovar any any R $autovar:{account-info.id} references automatic variables in FSMs
all autovar * *hash R $autovar:* a hash of all automatic variables in FSMs
all config any any R $config:item_name the value of the given configuration item for the current context (see also $xconfig: below)
all config * *hash R $config:* the value of all configuration items as a hash keyed by item name for the current context (see also $xconfig: below)
all fsminput any any R $fsminfo:key the value of the given hash key of the input data of the current finite state machine
all fsminput * any R $fsminfo:* the initial input data (if any) from the current finite state machine
all globalvar any any RW $globalvar:{account-info.id} synonym for $transient:{}; references global variables as the value from the temporary thread-local transient data hash; see The Difference Between var and transient Data
all globalvar * *hash R $globalvar:* synonym for $transient:{}; all global variables as a hash; the entire temporary transient data hash; see The Difference Between var and transient Data
all local type string R $local:type the interface type: "workflow", "service", or "job"
all local name string R $local:name the interface name
all local version string R $local:version the interface version
all local id int R $local:id the interface ID
all local * *hash R $local:* the entire local context hash
all localvar any any RW $localvar:{account-info.id} synonym for $var:{}; references local variables; see The Difference Between var and transient Data
all localvar * *hash R $localvar:* synonym for $var:{}; all local variables as a hash; see The Difference Between var and transient Data
all parse-value any any R $parse-value:{id=$static:{account.id}} parses the string argument with parse_to_qore_value() after recursive template substitution
all pstate any any RW $pstate:key the value of the given key in the interface's persistent state hash; see Universal Persistent Storage
all pstate * *hash R $pstate:* the entire interface persistent state hash; see Universal Persistent Storage
all python-expr any any R $python-expr:{("$info:type" + "." + "$info:name" + " v" + "$info:version")} Performs template substitution on the argument and then parses the argument as a Python expression; the evaluation of the expression is used as the resulting value
all qore-expr any any R $qore-expr:{("$info:type" + "." + "$info:name" + " v" + "$info:version")} Performs template substitution on the argument and then parses the argument as a Qore expression; the evaluation of the expression is used as the resulting value
all qore-expr-value any string R $qore-expr-value:{$static:{order.json}} Returns a string representation of the value that can be used with $qore-expr:{}; strings are quoted (and internal strings are escaped), other values are converted to valid Qore expressions
all rest REST URI path any R $rest:{remote/user/my-connection/url_hash/path} the result of a GET request to the given system API URI path in the latest REST API
all sysprop domain[.key] any RW $sysprop:{domain-1.key-1} the value from the given system property domain and optional key; if only a domain is given then the value returned or set must be a hash or NOTHING
all timestamp timegm int R $timestamp:timegm returns the current number of seconds after the UNIX epoch (1970-01-01 UTC)
all timestamp date format string R $timestamp:{YYYY-MM-DD HH:mm:SS.xx Z} a timestamp formatted according to the value as the format argument (see Date Formatting Codes for more information on the timestamp format argument)
all transient any any RW $transient:{account-info.id} synonym for $global:{}; the value from the temporary thread-local transient data hash; see The Difference Between var and transient Data
all transient * *hash R $transient:* synonym for $global:{}; the entire temporary transient data hash; see The Difference Between var and transient Data
all value-map value-map-name.value-map-key * R $value-map:{my-map.key2} the value from the given key of the given value map
all var any any RW $var:{account-info.id} the value from the temporary thread-local/block-local data hash; see The Difference Between var and transient Data
all var * *hash R $var:* the entire temporary thread-local/block-local data hash; see The Difference Between var and transient Data
all xconfig any any R $xconfig:item_name the value of the given configuration item for the current interface context; in data pipelines and finite state machines, this will return configuration information for the interface and not for the data pipeline or finite state machine (see also $config: above)
all xconfig * *hash R $xconfig:* the value of all configuration items as a hash keyed by item name for the current interface context; in data pipelines and finite state machines, this will return configuration information for the interface and not for the data pipeline or finite state machine (see also $config: above)
job info any any R $info:key the value of the given key in the job info hash (return value of JobApi::getInfo())
Note
supported for backwards-compatibility for writing as an alias to $jinfo
job info * *hash R $info:* the entire job info hash (return value of JobApi::getInfo())
job jinfo any any RW $jinfo:key the value of the given key in the job result info hash (value set in JobApi::saveInfo())
job jinfo * *hash R $jinfo:* the entire job result info hash (value set in JobApi::saveInfo())
job local job_instanceid int R $local:job_instanceid the job instance ID
job state any any RW $state:key the value of the given key in the job's state hash (used for recovery state; cleared when the job gets a COMPLETE status)
job state * *hash R $state:* the entire job state hash (used for recovery state; cleared when the job gets a COMPLETE status)
service info any any RW $info:key the value of the given key in the service info hash (return value of ServiceApi::getServiceInfo())
service info * *hash R $info:* the entire job info hash (return value of ServiceApi::getServiceInfo())
service local servicetype string R $local:servicetype the service type: "user" or "system"
service state any any RW $state:key the value of the given key in the service's state hash
service state * *hash R $state:* the entire service state hash
workflow dynamic any any RW $dynamic:order.ID the given value from the workflow order's dynamic data hash; dot notation accepted
workflow dynamic * *hash R $dynamic:* the entire dynamic data hash
workflow feedback any any W $feedback:key provides the name of the key that the given output data value will be saved to in the parent order; only valid for child orders in a subworkflow hierarchy; each feedback key value is subject to recursive template substitution with UserApi::expandTemplatedValue()
workflow info any any RW $info:key the value of the given key in the workflow info hash with an additional step key containing the return value of WorkflowApi::getStepInfo()
workflow info * *hash R $info:* the entire hash consisting of the workflow info hash with an additional step key containing the return value of WorkflowApi::getStepInfo()
workflow keys any any RW $keys:order_id the value of the given workflow order key; each order key value is subject to recursive template substitution with UserApi::expandTemplatedValue()
workflow local execid int R $local:execid the workflow execution instance ID
workflow local stepname string R $local:stepname the step name
workflow local stepversion string R $local:stepversion the step version
workflow local stepid int R $local:stepid the step ID
workflow local ind int R $local:ind the step index value
workflow local workflow_instanceid int R $local:workflow_instanceid the workflow instance ID
workflow sensitive skey.svalue.... any RW $sensitive:taxid.xxxx.address the given value from the workflow order's sensitive data hash; dot notation accepted; the first two components of the value are the sensitive data key and the sensitive data value
workflow sensitive-alias alias.... any RW $sensitive-alias:{cust-1.address} the given value from the workflow order's sensitive data hash with the given alias; dot notation accepted; the first component of the value is the sensitive data alias value
workflow static any any R $static:order.ID the given value from the workflow order's static data hash; dot notation accepted
workflow static * *hash R $static:* the entire static data hash
workflow step any any RW $step:{order-data.address} the given value from the current step's step data hash; dot notation accepted
workflow step * *hash R $step:* the entire step data hash
workflow temp any any RW $temp:order.ID the given value from the workflow order's temporary data hash; dot notation accepted
workflow temp * *hash R $temp:* the entire temporary data hash
Note
  • in each of the examples above the value could be encosed in curly brackets, ex: "$static:{step.order.address}"; strings with characters outside the acceptable range ([a-zA-Z_0-9]) must be enclosed with curly brackets; ex: "$static:{account-1.customer-name}"
  • most template strings are readable meaning they can be used in any context where template variable substitution is performed; writable template strings marked with W above can also be used with UserApi::updateOutputData()

$autovar:{} Template

$autovar:{...} returns the value of the given automatic variable in an FSM; this template is always read-only and will return an error if attempted to be used for output or writing.

$fsminput:{} Template

$fsminput:{...} returns information about the original input data (if any) from the current finite state machine.

When this template is resolved in a context where there is no finite state machine input data or no finite state machine at all, it will return NOTHING.

If the finite state machine is not a hash, then the argument expression should be * as in:

$fsminput:* 

$globalvar:{} Template

This is a synonym for $transient:{}, because the thread-local transient data hash is used for implementing global variables in finite state machines.

See also
$transient:{} Template for more information.

$localvar:{} Template

This is a synonym for $var:{} for local variables in finite state machines.

See also
$var:{} Template for more information.

$python-expr:{} Template

$python-expr:{...} first resolves the argument expression as a template string. If the argument expression does not resolve to a string value, then the argument is returned without further evaluation.

If the argument expression resolves to a string, then this string is evaluated as a Python expression, and the resulting value is returned as the result.

$qore-expr:{} Template

$qore-expr:{...} first resolves the argument expression as a template string. If the argument expression does not resolve to a string value, then the argument is returned without further evaluation.

If the argument expression resolves to a string, then this string is evaluated as a Qore expression, and the resulting value is returned as the result.

In the following examples, templates are evaluated with a local context with the following keys:

{
    "intent_name": "i.400.userID-correct",
    "project_id": "02724364-f352-46a2-9279-083989c53360",
    "session_id": "769113b8-ee2a-4495-acf3-b12bf4709790",
    "timestamp": 1635493630000,
    "timestamp_str": "Fri Oct 29 09:47:10 CEST+0200",
    "parameters": {
        "p_inbound_user_id": "SJ3ZA",
        "yes": "ja"
    }
}
Example 1
The following template:
$qore-expr:{$local:parameters.p_inbound_user_id.val()} 
will be first subjected to template substitution, resulting in the following string:
"SJ3ZA".val() 
which will then be evaluated as a Qore expression, resulting in the result True.
Example 2
If on the other hand, the following template would be evaluated in the same context as in the previous example:
$qore-expr:{$local:parameters.p_outbound_user_id.val()} 
This results in the following string after template substitution:
"".val() 
which will then be evaluated as a Qore expression, resulting in the result False.
See also

$qore-expr-value:{} Template

$qore-expr-value:{...} first resolves the argument expression as a template string and then converts the resulting value to a string value that can be interpreted as the same value by Qore for use in a $qore-expr:{} Template

Conversion Table

Type Example Description
string "a \"string\"" Strings are double quoted; internal double quotes are escaped
bool True Converted to True or False
int 100 Direct conversion
float 100.1 Direct conversion
number 100.1n Direct conversion
binary <a125f3> Conversion to a string of hex digits surrounded by angle brackets
date 2021-10-30T09:25:44.255073+02:00 Conversion to ISO-8601 format, preserves microseconds and time zone
hash {"key1": 1, "key2": "two", "key3": 3.0} Conversion to a Qore hash string
list (1, "two", 3.0) Conversion to a Qore list string
NOTHING NOTHING Direct conversion
NULL NULL Direct conversion

The output value of this template expression is a string value that can be parsed with the $qore-expr:{} Template that will result in the same value again; this allows complex values to be used with the $qore-expr:{} Template

Example
In the following example, the template is evaluated with a local context with the following keys:
{
    "intent_name": "i.400.userID-correct",
    "project_id": "02724364-f352-46a2-9279-083989c53360",
    "session_id": "769113b8-ee2a-4495-acf3-b12bf4709790",
    "timestamp": 1635493630000,
    "timestamp_str": "Fri Oct 29 09:47:10 CEST+0200",
    "parameters": {
        "p_inbound_user_id": "SJ3ZA",
        "yes": "ja"
    }
}
The following template:
$qore-expr-value:{$local:parameters} 
will be first subjected to template substitution, resulting in the following string:
{"p_inbound_user_ud": "SJ3ZA", "yes": "ja"} 

$transient:{} Template

Transient data is like a global variable for a finite state machine; any value assigned to a $transient:{} output location can be retrieved in any finite state machine block.

Note
  • Transient data is not persistent outside of the interface execution context in which it's run
  • $transient:{} data is thread local; FSMs are normally executed in a single thread with the exception of data pipelines; data pipelines have a dedicated I/O thread assigned to each queue, including the main queue, therefore $transient:{} data is only readable for $transient:{} data written in the same pipeline queue; $transient:{} data written in the FSM or in another pipeline queue is only readable in the same thread where is was written. In particular, $transient:{} data written in the FSM cannot be read in a pipeline processor, and $transient:{} data written in a pipeline processor cannot be read in the FSM itself.
  • synonym for $globalvar:{}

$var:{} Template

Var data is like a finite-state-machine-block-local variable; any value assigned to a $var:{} output location is local to the finite state machine block.

Note
  • $var:{} data is thread local; FSMs are normally executed in a single thread with the exception of data pipelines; data pipelines have a dedicated I/O thread assigned to each queue, including the main queue, therefore $var:{} data is only readable for $var:{} data written in the same pipeline queue; $var:{} data written in the FSM or in another pipeline queue is only readable in the same thread where is was written. In particular, $var:{} data written in the FSM cannot be read in a pipeline processor, and $var:{} data written in a pipeline processor cannot be read in the FSM itself.
  • synonym for $localvar:{}

The Difference Between var and transient Data

$transient: data is similar to a global variable (and in fact can be referred to as $globalvar:), while $var: data is like a local variable in the finite state machine block (and in fact can be referred to as $localvar:) where it's used.

$transient: or $globalvar: differs from $var: or $localvar: in that each block in a finite state machine has its own copy of $var: / $localvar: data, while $transient: or $globalvar: data is persistent in a single interface action across finite state machine block states.

See also

Universal Persistent Storage

$pstate: can be used for persistent storage in any interface:

  • for workflows, $pstate: is equal to $dynamic:
  • for services, $pstate: is unique persistent storage for services
  • for jobs, $pstate: is unique and different to $state: data, which is purged when a job instance gets a COMPLETE status

$pstate: is serialized and stored in the database when updated and therefore is persistent across Qorus restarts.

File Locations

The location types in the following table are supported.

Location Types

Scheme Example Description
file://file_location file://$OMQ_DIR/user/file.txt file_location provides a location on the local file system; environment variable substitution is performed
ftp(s)://host[:port]/path ftps://my.host:8888/path/file specifies a remote file on an FTP server (ftp is unencrypted, ftps is FTP with encryption extensions; not to be confused with sftp)
http(s)://host[:port]/uri_path https://my.host:8888/path/file specifies a file that can be retrieved as the response message body of an HTTP GET request
resource://[[remote:]service:]resource_path resource://my-service:resource-path/resource-name.html specifies a service file resource file
- [remote:]: gives the name of an optional remote Qorus connection
- [service:]: gives the name of the service that has the given service file resource
rest(s)://host[:port]/uri_path rests://my.host:8888/path/file specifies a file that can be retrieved as the string or binary response message body of a REST GET request
sftp://host[:port]/path sftp://my.host:8888/path/file specifies a remote file on an SFTP server
Note
  • ftps (FTP Secure) is not the same as sftp (SSH FTP).
  • service: is not required in resource:// locations when the resource is retrieved from the same service; in this case the given resource will be retrieved from the current service, however in all other cases, service: is required or a LOCATION-ERROR exception will be thrown.

Locations are used in the following APIs: