Qorus Integration Engine®
4.0.3.p2_git
|
Each workflow'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.
This section describes additional classes, constants, and functions that are imported into workflow Program objects by the Qorus system itself that make up the Qorus Workflow API for the Qore proggramming language.
The workflow class APIs are documented here:
For class steps, each base step class inherits Workflow::WorkflowApi (Qore) or workflow.WorkflowApi (Java) directly. This means that Qore and Java code can call the static methods defined in the base class directly.
For library classes and other workflow code, calls must be prefixed with the class name (also for all Java code as well).
Each workflow has a single Qore Program logic container containing all its code for the workflow, as well as any objects imported into the Program object (classes, constants, and functions listed as attributes of the workflow when the workflow is defined).
Workflow 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, workflow Program logic containers are created with the following sandbox 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 |
%no-global-vars | Qore::PO_NO_GLOBAL_VARS | Global variables may not be defined |
%require-our | Qore::PO_REQUIRE_OUR | All variables must be declared before use |
Please see the above links for more information on the features made unavailable when these parse options are set.
Please note that despite these restrictions, workflow program objects have most of the Qore language API and class library available for use.
Furthermore sandbox restrictions apply to Qore code; code in other languages such as Java is not subject to these restrictions.
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+) |
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 |
QorusWorkflow | W | Identifies code used in a workflow Program container |
It is recommended to use the workflow class API instead of workflow API functions, as all future development will be made in the workflow class API.
The following APIs are imported into workflow program logic containers (see also OMQ::UserApi::Workflow):
The following classes are imported into workflow program logic containers:
Qore Class | Java Class | Availability | Description |
AbstractFsRemoteReceive | AbstractFsRemoteReceive | W , S , J | provides an API for streaming data from a remote filesystem through a remote Qorus instance |
AbstractParallelStream | n/a | 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 |
DbRemote | DbRemote | W , S , J | provides an API wrapper for all system.sqlutil service methods |
DbRemoteReceive | DbRemoteReceive | W , S , J | provides an API for streaming data from a remote database through a remote Qorus instance |
DbRemoteSend | DbRemoteSend | W , S , J | provides an API for streaming data to a remote database through a remote Qorus instance |
DynamicDataHelper | DynamicDataHelper | W | provides an API for managing dynamic data atomically in workflows |
FsRemote | FsRemote | W , S , J | provides an API wrapper for all system.fs service methods |
FsRemoteSend | FsRemoteSend | W , S , J | provides an API for streaming data to a remote filesystem through a remote Qorus instance |
QorusInboundTableMapper | InboundTableMapper | W , S , J | provides an API for mapping data to a DB table |
QorusInboundTableMapperIterator | n/a | W , S , J | provides an iterator-based API for mapping data to a DB table |
QorusRawSqlStatementOutboundMapper | RawSqlStatementOutboundMapper | W , S , J | provides an API for mapping from SQL statement using direct SQL statements passed in |
QorusRemoteServiceHelper | n/a | W , S , J | provides an API for calling service methods in remote Qorus instances |
QorusSqlStatementOutboundMapper | SqlStatementOutboundMapper | W , S , J | provides an API for mapping from SQL statement using SqlUtil |
QorusSystemAPIHelper | n/a | W , S , J | provides an API for calling RPC API methods in remote Qorus instances |
OMQ::QorusSystemRestHelper | QorusSystemRestHelper | W , S , J | provides an API for using the REST API in remote Qorus instances |
SensitiveDataHelper | SensitiveDataHelper | W | provides an API for managing sensitive data atomically in workflows |
TempDataHelper | TempDataHelper | W | provides an API for managing temp data atomically in workflows |
UserApi | UserApi | W , S , J | the primary shared Qorus API class |
WorkflowApi | WorkflowApi | W | the primary workflow API class |
The following modules are imported by default into Qore workflow 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 |
This section lists all of the API methods specific to workflows; the main workflow API classes are:
"wf_"
.Workflow logging APIs:
Miscellaneous workflow API functions:
API calls related to workflow data (see Workflow Data):
Functions related to workflow error handling:
Qore Method | Java Method | Qore Function | Desc |
WorkflowApi::stepError() | WorkflowApi.stepError() | wf_serror() | raises an error against the workflow order data without affecting the flow of processing |
WorkflowApi::setRetryDelay() | WorkflowApi.setRetryDelay()</td> | wf_set_retry_delay() | sets the retry delay explicitly after raising an error against the workflow order instance with WorkflowApi::stepError() |
WorkflowApi::stepWarning() | WorkflowApi.stepWarning() | wf_swarning() | raises a warning against the workflow order data |
API calls that can only be called from asynchronous steps:
Qore Method | Java Method | Qore Function | Desc |
QorusAsyncStepBase::skipAsyncStep() | QorusAsyncStepBase.skipAsyncStep() | wf_skip_async_step() | skips setting an asynchronous key for an asynchronous step |
QorusAsyncStepBase::submitAsyncKey() | QorusAsyncStepBase.submitAsyncKey() | wf_submit_async_key() | submits an async key for an asynchronous step |
API calls that can only be called from subworkflow steps:
Qore Method | Java Method | Qore Function | Desc |
QorusSubworkflowStepBase::bindSubworkflow() | QorusSubworkflowStepBase.bindSubworkflow() | wf_bind_subworkflow() | binds a subworkflow to the current subworkflow step |
QorusSubworkflowStepBase::skipSubworkflow() | QorusSubworkflowStepBase.skipSubworkflow() | wf_skip_subworkflow() | skips the subworkflow bind in a subworkflow step |
API calls that can only be called from workflow synchronization event steps:
Qore Method | Java Method | Qore Function | Desc |
QorusEventStepBase::bindEvent() | QorusEventStepBase.bindEvent() | wf_bind_event() | binds a workflow synchronization event to the current workflow synchronization event step |
QorusEventStepBase::bindEventUnposted() | QorusEventStepBase.bindEventUnposted() | wf_bind_event_unposted() | binds an unposted workflow synchronization event to the current workflow synchronization event step |
QorusEventStepBase::skipEvent() | QorusEventStepBase.skipEvent() | wf_skip_event() | skips binding a workflow synchronization event to the current workflow synchronization event step |
API calls that can only be called from the attach function:
Qore Method | Java Method | Qore Function | Desc |
WorkflowApi::setBlocked() | WorkflowApi.setBlocked() | wf_set_blocked() | sets the current workflow order instance to status OMQ::StatBlocked in the attach function |
WorkflowApi::rescheduleOrder() | WorkflowApi.rescheduleOrder() | wf_reschedule_order() | changes the earliest possible processing date for the current workflow order instance in the attach function |