Qorus Integration Engine®  4.0.3.p1_git
OMQ::UserApi::Workflow Namespace Reference

Qorus workflow API namespace. More...

Classes

class  QorusAsyncArrayStep
 The abstract class for asynchronous array steps. More...
 
class  QorusAsyncStep
 The abstract class for asynchronous steps. More...
 
class  QorusAsyncStepBase
 The Qore base interface class for asynchronous steps. More...
 
class  QorusEventArrayStep
 The abstract class for workflow synchronization event array steps. More...
 
class  QorusEventStep
 The abstract class for workflow synchronization event steps. More...
 
class  QorusEventStepBase
 The Qore base interface class for event steps. More...
 
class  QorusNormalArrayStep
 The abstract class for normal array steps. More...
 
class  QorusNormalStep
 The abstract class for normal steps. More...
 
class  QorusStepBase
 Base class for workflow step classes. More...
 
class  QorusSubworkflowArrayStep
 The abstract class for subworkflow array steps. More...
 
class  QorusSubworkflowStep
 The abstract class for subworkflow steps. More...
 
class  QorusSubworkflowStepBase
 The Qore base interface class for subworkflow steps. More...
 
class  WorkflowApi
 primary workflow API class More...
 

Functions

string wf_generate_unique_key ()
 returns a unique async key for the order for use with wf_submit_async_key() More...
 
 wf_serror (string err, auto info)
 Raises an error against the current step without affecting the flow of processing. More...
 
 wf_serror (string err, auto info, date retry_delay)
 Raises an error against the current step without affecting the flow of processing. More...
 
 wf_serror (string err, auto info, int retry_delay)
 Raises an error against the current step without affecting the flow of processing. More...
 
 wf_swarning (string err, auto info)
 Raises a warning against the step. More...
 
 wf_swarning (string err, string fmt)
 Raises a warning against the step. More...
 
 wf_set_retry_delay (date delay)
 Sets the value of the retry delay for an asynchronous step. More...
 
 wf_set_retry_delay (int secs)
 Sets the value of the retry delay for an asynchronous step. More...
 
*hash< auto > wf_get_error_info (string err)
 Returns the hash data associated with the error code passed as an argument. More...
 
 wf_update_dynamic_data (hash< auto > hash)
 Updates the values of one or more keys in the workflow order data instance’s dynamic data hash. More...
 
 wf_delete_dynamic_data_key (softlist list)
 Deletes one or more keys from the workflow order data instance’s dynamic data hash. More...
 
auto wf_get_dynamic_data ()
 Retrieves the values of one or more keys from the workflow order data instance’s dynamic data hash. More...
 
auto wf_get_static_data ()
 Retrieves the values of one or more keys from the workflow order data instance’s static data hash (this is the order data the workflow execution instance is processing) More...
 
 wf_update_temp_data (hash< auto > hash)
 Updates the values of one or more keys in the workflow order data instance’s temporary data hash. More...
 
auto wf_get_temp_data ()
 Retrieves the values of one or more keys from the workflow order data instance’s temporary data hash. More...
 
 wf_delete_temp_data_key (softlist list)
 Deletes one or more keys from the workflow order data instance’s temporary data hash. More...
 
 wf_update_sensitive_data (string skey, string svalue, hash< auto > hash, *softlist aliases, *hash< auto > meta)
 Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data key and value. More...
 
 wf_update_sensitive_data_from_alias (string alias, hash hash, *hash meta)
 Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data alias. More...
 
auto wf_get_sensitive_metadata (string skey, string svalue)
 Returns the sensitive metadata hash for the given sensitive data key and value if present, otherwise returns an empty hash. More...
 
hash< auto > wf_get_sensitive_metadata_from_alias (string alias)
 returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of the sensitive metadata hash for the given sensitive data alias corresponding to a sensitive data key and value More...
 
auto wf_get_sensitive_data (string skey, string svalue)
 Returns the sensitive data hash for the given sensitive data key and value. More...
 
hash< auto > wf_get_sensitive_data_from_alias (string alias)
 returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of one or more keys in the workflow sensitive data hash for the given sensitive data alias corresponding to a sensitive data key and value More...
 
hash< auto > wf_get_sensitive_data_aliases ()
 returns a hash of all sensitive data aliases for the current order or an empty hash if there are none More...
 
bool wf_delete_sensitive_data (string skey, string svalue)
 Deletes the sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this function returns. More...
 
bool wf_delete_sensitive_data_key (string skey, string svalue, softlist< auto > list)
 Deletes one or more keys from the workflow order data instance’s sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this function returns. More...
 
hash< auto > wf_get_sensitive_data_key_values ()
 Returns a hash of sensitive data keys and values saved against the order; the sensitive data hashes themselves are not returned, just the information used to index sensitive data against the order. More...
 
 wf_update_instance_data (hash< auto > hash)
 Updates the values of one or more keys in the workflow execution instance’s instance data hash. More...
 
 wf_delete_instance_data_key (softlist list)
 Deletes a single key or a list of keys from the workflow execution instance’s instance data hash. More...
 
auto wf_get_instance_data ()
 Retrieves the values of one or more keys from the workflow execution instance’s instance data hash. More...
 
auto wf_get_workflow_instance_data (string field)
 Retrieves the value of a single key (system-defined property) from the workflow execution instance object itself. More...
 
hash< auto > wf_get_workflow_instance_data ()
 Retrieves the values of one or more keys (system-defined properties) from the workflow execution instance object itself. More...
 
 wf_set_order_keys (hash< auto > h, bool truncate=False)
 This function sets user-defined order keys against an order, so that the workflow order data instance can be quickly searched and retrieved using the key value. More...
 
 wf_append_order_keys (hash< auto > h, bool truncate=False)
 This function appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value. More...
 
 wf_append_order_keys (string key, softstring value, bool truncate=False)
 This function appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value. More...
 
auto wf_get_order_keys ()
 This function retrieves the user-defined order key information saved against the workflow order data instance. More...
 
bool wf_step_executed (string stepname)
 This function returns True if the step passed has been executed and has status OMQ::StatComplete ("C") More...
 
*string wf_get_step_status (string stepname)
 Returns the current status of the given step for the current workflow order instance. More...
 
 wf_submit_async_key (softstring key)
 This function creates a queue entry in the asynchronous queue bound to the asynchronous step being executed with a queue status of OMQ::QS_Waiting ("W") More...
 
 wf_skip_async_step ()
 This function will skip the execution of an asynchronous step. More...
 
*hash< auto > wf_get_step_info ()
 This function will return a hash of step information for the current step. More...
 
 wf_bind_event (softstring eventkey)
 binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent) More...
 
 wf_bind_event_unposted (softstring eventkey)
 binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent) only if the event has not yet been posted; if the event has already been posted, then an ALREADY-POSTED exception is raised More...
 
 wf_skip_event ()
 skips a workflow synchronization event step More...
 
hash< auto > wf_bind_subworkflow (hash< auto > wf, hash< auto > order)
 This function binds a workflow to a subworkflow step. More...
 
hash< auto > wf_skip_subworkflow ()
 This function will skip the execution of a subworkflow step. More...
 
hash< auto > wf_get_workflow_metadata ()
 returns workflow metadata for the currently running workflow as a hash More...
 
deprecated *softstring wf_get_parent_workflow_instanceid ()
 Returns the parent workflow order data instance ID of a subworkflow or NOTHING if the current workflow order is not a subworkflow and therefore has no parent. More...
 
 wf_set_blocked ()
 set the current workflow order status to OMQ::StatBlocked, can only be called from the attach function More...
 
deprecated setOrderInfo (*hash< auto > h)
 Sets additional order attributes (op_username, op_comment) for the current workflow order data instance. More...
 
deprecated hash< auto > getOrderInfo ()
 Returns the last order note for the current workflow order data instance. More...
 
list< auto > wf_get_order_notes (*int count)
 Get Order Instance Notes. More...
 
 wf_add_order_note (string notestr)
 Add new note as described in Order Instance Notes. More...
 
 wf_set_custom_status (string stat)
 Sets a user-defined custom status for the current step. More...
 
 wf_reschedule_order (date scheduled)
 reschedules the current workflow order instance for later processing More...
 
 wf_reprioritize_order (int prio)
 changes the order priority for the current workflow order instance More...
 
 wf_leave_parent_feedback (string key, auto value)
 leaves feedback for a parent workflow More...
 
auto wf_get_child_feedback (string key)
 gets feedback from a child workflow order with the given key More...
 
*hash< auto > wf_get_child_feedback ()
 gets all feedback from all child workflow orders as a hash More...
 
*softint wf_parent_wfiid ()
 Returns the parent workflow order data instance ID from a subworkflow or NOTHING if the current workflow order is not a subworkflow and therefore has no parent. More...
 
*softint wf_wfiid ()
 returns the current workflow_instanceid as an integer; returns NOTHING if not called in a workflow order context (ex: onetimeinit function, etc) More...
 
deprecated public sqllog (string ds, string msg)
 Saves the information passed to the current log file depending on the calling context (workflow, service, or job) More...
 
deprecated bind_event (softstring eventkey)
 
deprecated bind_event_unposted (softstring eventkey)
 
deprecated skip_event ()
 
deprecated hash bindSubWorkflow (hash wf, hash order)
 
deprecated hash skipSubWorkflow ()
 
deprecated deleteDynamicDataKey (softlist list)
 
deprecated deleteInstanceDataKey (softlist list)
 
deprecated deleteTempDataKey (softlist list)
 
deprecated any get_child_feedback (string key)
 
deprecated Datasource getSharedDatasource (string ds)
 
deprecated DatasourcePool getUniqueDatasource (string ds)
 
deprecated string generateUniqueKey ()
 
deprecated any getErrorInfo (string err)
 
deprecated any getInstanceData ()
 
deprecated *string getParentWorkflowInstanceID ()
 
deprecated any getWorkflowInstanceData (string field)
 
deprecated hash getWorkflowInstanceData ()
 
deprecated setRetryDelay (date delay)
 
deprecated setRetryDelay (int secs)
 
deprecated any getDynamicData ()
 
deprecated any getOrderKeys ()
 
deprecated any getStaticData ()
 
deprecated *hash getStepInfo ()
 
deprecated *string getStepStatus (string stepname)
 
deprecated any getTempData ()
 
deprecated hash getWorkflowMetadata ()
 
deprecated leave_parent_feedback (string key, any value)
 
deprecated reschedule_order (date scheduled)
 
deprecated reprioritize_order (int prio)
 
deprecated serror (string err, any info)
 
deprecated serror (string err, any info, date retry_delay)
 
deprecated serror (string err, any info, int retry_delay)
 
deprecated setBlocked ()
 
deprecated setCustomStatus (string stat)
 
deprecated setOrderKeys (hash hash, bool truncate=False)
 
deprecated skipAsyncStep ()
 
deprecated bool stepExecuted (string stepname)
 
deprecated submitAsyncKey (softstring key)
 
deprecated swarning (string err, any info)
 
deprecated updateDynamicData (hash hash)
 
deprecated updateInstanceData (hash hash)
 
deprecated updateTempData (hash hash)
 

Detailed Description

Qorus workflow API namespace.

main workflow API namespace

Function Documentation

◆ bind_event()

deprecated OMQ::UserApi::Workflow::bind_event ( softstring  eventkey)

◆ bind_event_unposted()

deprecated OMQ::UserApi::Workflow::bind_event_unposted ( softstring  eventkey)

◆ bindSubWorkflow()

deprecated hash OMQ::UserApi::Workflow::bindSubWorkflow ( hash  wf,
hash  order 
)

◆ deleteDynamicDataKey()

deprecated OMQ::UserApi::Workflow::deleteDynamicDataKey ( softlist  list)

◆ deleteInstanceDataKey()

deprecated OMQ::UserApi::Workflow::deleteInstanceDataKey ( softlist  list)

◆ deleteTempDataKey()

deprecated OMQ::UserApi::Workflow::deleteTempDataKey ( softlist  list)

◆ generateUniqueKey()

deprecated string OMQ::UserApi::Workflow::generateUniqueKey ( )

◆ get_child_feedback()

deprecated any OMQ::UserApi::Workflow::get_child_feedback ( string  key)

◆ getDynamicData()

deprecated any OMQ::UserApi::Workflow::getDynamicData ( )

◆ getErrorInfo()

deprecated any OMQ::UserApi::Workflow::getErrorInfo ( string  err)

◆ getInstanceData()

deprecated any OMQ::UserApi::Workflow::getInstanceData ( )

◆ getOrderInfo()

deprecated hash<auto> OMQ::UserApi::Workflow::getOrderInfo ( )

Returns the last order note for the current workflow order data instance.

Deprecated:
This function is present for backwards-compatibility, now uses Order Instance Notes; use WorkflowApi::getOrderNotes() instead
Returns
a hash with the following keys for backwards-compatibility (returns other keys as well, see wf_get_order_notes() for more information):
  • op_username: the username of the operator who created the last note (renamed from username)
  • op_comment: the content of the last note (renamed from note)
Since
Qorus 2.5.0

◆ getOrderKeys()

deprecated any OMQ::UserApi::Workflow::getOrderKeys ( )

◆ getParentWorkflowInstanceID()

deprecated *string OMQ::UserApi::Workflow::getParentWorkflowInstanceID ( )

◆ getSharedDatasource()

deprecated Datasource OMQ::UserApi::Workflow::getSharedDatasource ( string  ds)

◆ getStaticData()

deprecated any OMQ::UserApi::Workflow::getStaticData ( )

◆ getStepInfo()

deprecated *hash OMQ::UserApi::Workflow::getStepInfo ( )

◆ getStepStatus()

deprecated *string OMQ::UserApi::Workflow::getStepStatus ( string  stepname)

◆ getTempData()

deprecated any OMQ::UserApi::Workflow::getTempData ( )

◆ getUniqueDatasource()

deprecated DatasourcePool OMQ::UserApi::Workflow::getUniqueDatasource ( string  ds)

◆ getWorkflowInstanceData() [1/2]

deprecated any OMQ::UserApi::Workflow::getWorkflowInstanceData ( string  field)

◆ getWorkflowInstanceData() [2/2]

deprecated hash OMQ::UserApi::Workflow::getWorkflowInstanceData ( )

◆ getWorkflowMetadata()

deprecated hash OMQ::UserApi::Workflow::getWorkflowMetadata ( )

◆ leave_parent_feedback()

deprecated OMQ::UserApi::Workflow::leave_parent_feedback ( string  key,
any  value 
)

◆ reprioritize_order()

deprecated OMQ::UserApi::Workflow::reprioritize_order ( int  prio)

◆ reschedule_order()

deprecated OMQ::UserApi::Workflow::reschedule_order ( date  scheduled)

◆ serror() [1/3]

deprecated OMQ::UserApi::Workflow::serror ( string  err,
any  info 
)

◆ serror() [2/3]

deprecated OMQ::UserApi::Workflow::serror ( string  err,
any  info,
date  retry_delay 
)

◆ serror() [3/3]

deprecated OMQ::UserApi::Workflow::serror ( string  err,
any  info,
int  retry_delay 
)

◆ setBlocked()

deprecated OMQ::UserApi::Workflow::setBlocked ( )

◆ setCustomStatus()

deprecated OMQ::UserApi::Workflow::setCustomStatus ( string  stat)

◆ setOrderInfo()

deprecated OMQ::UserApi::Workflow::setOrderInfo ( *hash< auto >  h)

Sets additional order attributes (op_username, op_comment) for the current workflow order data instance.

Deprecated:
This function is present for backwards-compatibility; uses Order Instance Notes; use WorkflowApi::addOrderNote() instead
Parameters
ha hash with the following keys:
  • op_username: the username of the operator currently working on the workflow order data when performing manual error resolution
  • op_comment: notes about the workflow order data instance; for example; notes about manual processing steps already taken or needed
See also
the documentation for the system API method omq.system.set-order-info()
Since
Qorus 2.5.0

◆ setOrderKeys()

deprecated OMQ::UserApi::Workflow::setOrderKeys ( hash  hash,
bool  truncate = False 
)

◆ setRetryDelay() [1/2]

deprecated OMQ::UserApi::Workflow::setRetryDelay ( date  delay)

◆ setRetryDelay() [2/2]

deprecated OMQ::UserApi::Workflow::setRetryDelay ( int  secs)

◆ skip_event()

deprecated OMQ::UserApi::Workflow::skip_event ( )

◆ skipAsyncStep()

deprecated OMQ::UserApi::Workflow::skipAsyncStep ( )

◆ skipSubWorkflow()

deprecated hash OMQ::UserApi::Workflow::skipSubWorkflow ( )

◆ sqllog()

deprecated public OMQ::UserApi::Workflow::sqllog ( string  ds,
string  msg 
)

Saves the information passed to the current log file depending on the calling context (workflow, service, or job)

Deprecated:
This function is present for backwards-compatibility; use log() instead
Parameters
dsthe datasource for the SQL message
msgthe format string for a vsprintf() call with the remaining arguments

◆ stepExecuted()

deprecated bool OMQ::UserApi::Workflow::stepExecuted ( string  stepname)

◆ submitAsyncKey()

deprecated OMQ::UserApi::Workflow::submitAsyncKey ( softstring  key)

◆ swarning()

deprecated OMQ::UserApi::Workflow::swarning ( string  err,
any  info 
)

◆ updateDynamicData()

deprecated OMQ::UserApi::Workflow::updateDynamicData ( hash  hash)

◆ updateInstanceData()

deprecated OMQ::UserApi::Workflow::updateInstanceData ( hash  hash)

◆ updateTempData()

deprecated OMQ::UserApi::Workflow::updateTempData ( hash  hash)

◆ wf_add_order_note()

OMQ::UserApi::Workflow::wf_add_order_note ( string  notestr)

Add new note as described in Order Instance Notes.

Parameters
notestra string with note
Note
The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.0.2

◆ wf_append_order_keys() [1/2]

OMQ::UserApi::Workflow::wf_append_order_keys ( hash< auto >  h,
bool  truncate = False 
)

This function appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value.

The hash provided appends orders keys to the workflow order; existing order keys matching keys given in the hash provided as an argument to this function are updated and any new keys are added.

The data is committed to the database before the function returns.

Parameters
hkey-value pairs to append to workflow order keys; the keys in this hash must match those defined for the workflow
truncateallow key values to be truncated without an error
Exceptions
APPEND-ORDER-KEYS-ERRORempty hash passed to wf_append_order_keys()
INVALID-WORKFLOW-KEYinvalid key for workflow
SET-ORDER-KEYS-ERRORan invalid data type (not convertible to a string) was given as a key value
Note
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.0

◆ wf_append_order_keys() [2/2]

OMQ::UserApi::Workflow::wf_append_order_keys ( string  key,
softstring  value,
bool  truncate = False 
)

This function appends user-defined order key values to a workflow order key, so that the workflow order data instance can be quickly searched and retrieved using the key value.

This function appends orders keys to the workflow order; existing order keys matching keys given in the arguments to this function are updated and any new keys are added.

The data is committed to the database before the function returns.

Parameters
keythe workflow order key to append to; this key must match a defined workflow order key
valuethe value to append for the given key
truncateallow key values to be truncated without an error
Exceptions
INVALID-WORKFLOW-KEYinvalid key for workflow
DUPLICATE-KEY-VALUEan order key was assigned a value more than once
Note
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.0

◆ wf_bind_event()

OMQ::UserApi::Workflow::wf_bind_event ( softstring  eventkey)

binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent)

can only be called from a workflow synchronization event step (step of type OMQ::ExecEvent); otherwise if called from any other step type, or called twice for the same step; or called after wf_skip_event(), then an exception is raised. The event type is defined when the step is defined in the workflow definition (see Event Type Tag (eventtype)); this information does not need to be supplied here; only the event key, and the event will be automatically created (if it does not exist) or found in the queue as defined by its event type.

Parameters
eventkeythe event key to bind the step to; if the event key does not already exist, then it is created in the table WORKFLOW_EVENTS and automatically tagged with its event type. A record for this step is also created in STEP_INSTANCE_EVENTS
Exceptions
WORKFLOW-EVENT-ERRORinvalid function call (not workflow synchronization step, multiple call, etc)
Note
  • Either this function, wf_bind_event_unposted() or wf_skip_event() must be called in a workflow synchronization event step
  • Prior to Qorus 3.0.2 this function was known as bind_event(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 2.6.0

◆ wf_bind_event_unposted()

OMQ::UserApi::Workflow::wf_bind_event_unposted ( softstring  eventkey)

binds a workflow synchronization event based on the event key to a workflow synchronization event step (type OMQ::ExecEvent) only if the event has not yet been posted; if the event has already been posted, then an ALREADY-POSTED exception is raised

can only be called from a workflow synchronization event step (step of type OMQ::ExecEvent); otherwise if called from any other step type, or called twice for the same step; or called after wf_skip_event(), then an exception is raised. The event type is defined when the step is defined in the workflow definition (see Event Type Tag (eventtype)); this information does not need to be supplied here; only the event key, and the event will be automatically created (if it does not exist) or found in the queue as defined by its event type.

Parameters
eventkeythe event key to bind the step to; if the event key does not already exist, then it is created in the table WORKFLOW_EVENTS and automatically tagged with its event type. A record for this step is also created in STEP_INSTANCE_EVENTS
Exceptions
ALREADY-POSTEDthe given event has already been posted
WORKFLOW-EVENT-ERRORinvalid function call (not workflow synchronization step, multiple call, etc)
Note
  • Either this function, wf_bind_event() or wf_skip_event() must be called in a workflow synchronization event step
  • Prior to Qorus 3.0.2 this function was known as bind_event_unposted(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 2.6.3.p14

◆ wf_bind_subworkflow()

hash<auto> OMQ::UserApi::Workflow::wf_bind_subworkflow ( hash< auto >  wf,
hash< auto >  order 
)

This function binds a workflow to a subworkflow step.

If this function is called from a non-subworkflow step, or if called twice or after wf_skip_subworkflow() is called, then an exception is raised

To ensure that a given workflow order is only created once for a given unique key value, make sure your workflow defines order keys, and use one of the following options to guarantee uniqueness of the order:

  • global_unique_key
  • workflow_specific_unique_key
  • workflow_unique_key
Parameters
wfThis hash identifies the workflow type to be bound to the subworkflow step having the following keys:
  • name: (required) the workflow name for the new order
  • version: (optional) the version of the workflow for the new order
    Other keys will be ignored. If the version key is not present, an order for the latest version of the workflow will be created
orderA hash defining the order data to be processed. Valid keys for this hash are:
  • dynamicdata: (optional hash) the initial dynamic data for the order
  • external_order_instanceid: (optional/required string) the external order instance ID for the workflow data; one of staticdata or external_order_instanceid must be provided
  • global_unique_key: (optional hash) a hash giving one or more unique order keys for the order (across all workflows regardless of workflowid, name, or version); if this key already exists for any order in the system, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • orderkeys: (optional hash; also order-keys is accepted for backwards-compatibility) a hash of order keys for the order
  • priority: the order priority (optional int, default DefaultOrderPriority) from 0 - 999; priority 0 is the highest; 999 is the lowest
  • scheduled: (optional date) the earliest date and time the order can be processed; if this date is given as a future date/time value and a StatReady status is given, then the initial status of the workflow order data instance will be automatically changed to StatScheduled instead of StatReady
  • sensitive_data: (optional hash) a hash of sensitive data information for the workflow; this key can only be used when submitting the data over a secure (encrypted) connection; the keys are sensitive data key types, values are hashes keyed by sensitive data values, and the hash values have the following keys:
    • aliases: (optional list of strings) zero or more string aliases for the sensitive data
    • data: (required hash) the sensitive data hash itself
    • meta: (optional hash) a hash of metadata for the sensitive data with the following recommended keys (recommended keys are not enforced by the API itself):
      • PURPOSE: free-form information about the purpose of the sensitive data
      • CATEGORIES: free-form information about the categories of sensitive data
      • RECIPIENTS: free-form information about the recipients or recipient catories of sensitive data
      • STORAGE: free-form information about the storage time or rules for sensitive data
  • staticdata: (optional/required hash) the initial static data for the order; one of staticdata or external_order_instanceid must be provided
  • tempdata: (optional hash) the initial temporary data for the order
  • workflow_specific_unique_key: (optional string) a hash giving one or more unique order keys for the particular workflowid (which matches a unique name and workflow version); if this key already exists for an order with the target workflowid, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
  • workflow_unique_key: (optional string) a hash giving one or more unique order keys for the particular workflow by name only (across all workflows with the same name regardless of version); if this key already exists for a workflow order with the same name, then the order creation will fail with a DUPLICATE-ORDER-KEY error; the hash key must be a valid order key, and the value is the unique key value; this value will also be created as an order key
Returns
a hash with a single key: workflow_instanceid, the value of which is the workflow order data instance ID of the subworkflow
Exceptions
SUBWORKFLOW-ERRORinvalid function call (not subworkflow step, multiple call, etc), invalid arguments (unknown workflow, etc)
WORKFLOW-KEY-ERRORinvalid workflow key given
ORDER-DATA-ERRORmissing either external_order_instanceid or staticdata, unknown workflow; invalid keys or sensitive data format
DUPLICATE-ORDER-KEYthe given unique key already exists in the defined scope
Note
  • Subworkflow steps must call either this function or wf_skip_subworkflow() or an error will be raised.
  • Prior to Qorus 3.0.2 this function was known as bindSubWorkflow(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
  • Qorus 3.1.1 implemented support for the following keys in the order argument:
    • global_unique_key
    • sensitive_data
    • workflow_specific_unique_key
    • workflow_unique_key

◆ wf_delete_dynamic_data_key()

OMQ::UserApi::Workflow::wf_delete_dynamic_data_key ( softlist  list)

Deletes one or more keys from the workflow order data instance’s dynamic data hash.

Dynamic data is directly linked to the order data the workflow execution instance is processing.

Changes are committed to the database before the function returns.

See also
Workflow Order Dynamic Data
Parameters
lista single key or a list of keys to delete in the workflow order's dynamic data
Note
  • Prior to Qorus 3.0.2 this function was known as deleteDynamicDataKey(), and is still imported with this old camel-case name for backwards compatibility
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_delete_instance_data_key()

OMQ::UserApi::Workflow::wf_delete_instance_data_key ( softlist  list)

Deletes a single key or a list of keys from the workflow execution instance’s instance data hash.

Parameters
lista single key or a list of strings (keys) to delete in workflow execution instance data
Note
  • Prior to Qorus 3.0.2 this function was known as deleteInstanceDataKey(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_delete_sensitive_data()

bool OMQ::UserApi::Workflow::wf_delete_sensitive_data ( string  skey,
string  svalue 
)

Deletes the sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this function returns.

Example:
wf_delete_sensitive_data("personal_id", personal_id);
Parameters
skeythe type of sensitive key provided in svalue
svaluethe value of the sensitive data key identified by skey
Returns
True if the data existed and was deleted, False if no such sensitive data key and value were present in the order
Note
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_delete_sensitive_data_key()

bool OMQ::UserApi::Workflow::wf_delete_sensitive_data_key ( string  skey,
string  svalue,
softlist< auto >  list 
)

Deletes one or more keys from the workflow order data instance’s sensitive data hash for the given sensitive data key and value; changes have already been committed to the database when this function returns.

Example:
# delete the "tax_number" and "insurance_number" keys from the sensitive data hash for the given person
wf_delete_sensitive_data_key("personal_id", personal_id, ("tax_number", "insurance_number"));

Changes are committed to the database before the function returns.

Parameters
skeythe type of sensitive key provided in svalue
svaluethe value of the sensitive data key identified by skey
lista single key or a list of keys to delete in the workflow order's sensitive data hash for the given sensitive key-value pair
Returns
True if the data existed and was deleted, False if no data was deleted
Note
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_delete_temp_data_key()

OMQ::UserApi::Workflow::wf_delete_temp_data_key ( softlist  list)

Deletes one or more keys from the workflow order data instance’s temporary data hash.

Parameters
lista single key or a a list of strings (keys) to delete in workflow temporary data
See also
Workflow Temporary Data
Note
  • Prior to Qorus 3.0.2 this function was known as deleteTempDataKey(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_generate_unique_key()

string OMQ::UserApi::Workflow::wf_generate_unique_key ( )

returns a unique async key for the order for use with wf_submit_async_key()

the generated key uses the workflow_instanceid, stepid, and ind number for the step to generate a unique key. Another alterative would be to call UUID::get()

Note
  • Prior to Qorus 3.0.2 this function was known as generateUniqueKey(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_child_feedback() [1/2]

auto OMQ::UserApi::Workflow::wf_get_child_feedback ( string  key)

gets feedback from a child workflow order with the given key

the child workflow has to set a value with the given key first with wf_leave_parent_feedback() for any value to be returned with this function call

Parameters
keythe feedback key name used by the child workflow
Returns
the value of the feedback saved by the child workflow order with wf_leave_parent_feedback() under the given key
Note
  • Prior to Qorus 3.0.2 this function was known as get_child_feedback(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_child_feedback() [2/2]

*hash<auto> OMQ::UserApi::Workflow::wf_get_child_feedback ( )

gets all feedback from all child workflow orders as a hash

child workflows have to set feedback values with wf_leave_parent_feedback() for any value to be returned with this function call

Returns
a hash representing all feedback values saved by child workflow orders with wf_leave_parent_feedback()
Note
The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.0

◆ wf_get_dynamic_data()

auto OMQ::UserApi::Workflow::wf_get_dynamic_data ( )

Retrieves the values of one or more keys from the workflow order data instance’s dynamic data hash.

Dynamic data is directly linked to the order data the workflow execution instance is processing.

See also
Workflow Order Dynamic Data

Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested

Note
  • Prior to Qorus 3.0.2 this function was known as getDynamicData(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_error_info()

*hash<auto> OMQ::UserApi::Workflow::wf_get_error_info ( string  err)

Returns the hash data associated with the error code passed as an argument.

Parameters
errthe error name
Returns
normally returns a hash of error information or NOTHING if the error is not defined
Note
  • Prior to Qorus 3.0.2 this function was known as getErrorInfo(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_instance_data()

auto OMQ::UserApi::Workflow::wf_get_instance_data ( )

Retrieves the values of one or more keys from the workflow execution instance’s instance data hash.

This data is set by the user (by calling wf_update_instance_data()) and is not associated to the order data being processed, but rather directly with the workflow execution instance. In this sense, this data is similar to global variables in a program.

Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested.

Returns
a single value or hash of workflow execution instance data, depending on the argument(s)
Note
  • not to be confused with wf_get_workflow_instance_data(), which returns system properties of the workflow execution instance
  • Prior to Qorus 3.0.2 this function was known as getInstanceData(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_order_keys()

auto OMQ::UserApi::Workflow::wf_get_order_keys ( )

This function retrieves the user-defined order key information saved against the workflow order data instance.

Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested. Pass NOTHING to the function to get a hash of all keys (if any are set).

Note
  • Prior to Qorus 3.0.2 this function was known as getOrderKeys(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function

◆ wf_get_order_notes()

list<auto> OMQ::UserApi::Workflow::wf_get_order_notes ( *int  count)

Get Order Instance Notes.

Parameters
countan optional integer to limit the list size
Returns
list of hashes of Order Instance Notes
Note
The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.0.2

◆ wf_get_parent_workflow_instanceid()

deprecated *softstring OMQ::UserApi::Workflow::wf_get_parent_workflow_instanceid ( )

Returns the parent workflow order data instance ID of a subworkflow or NOTHING if the current workflow order is not a subworkflow and therefore has no parent.

Returns
the parent workflow order data instance ID of a subworkflow or NOTHING if the current workflow order is not a subworkflow
Deprecated:
use WorkflowApi::parentWfiid() instead
Note
  • this function returns *string for backwards-compatibility
  • Prior to Qorus 3.0.2 this function was known as getParentWorkflowInstanceID(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_sensitive_data()

auto OMQ::UserApi::Workflow::wf_get_sensitive_data ( string  skey,
string  svalue 
)

Returns the sensitive data hash for the given sensitive data key and value.

Example:
string tax_number = wf_get_sensitive_data("personal_id", personal_id, "tax_number");
Parameters
skeythe type of sensitive key provided in svalue
svaluethe value of the sensitive data key identified by skey
...any sensitive data keys for the given key and value; if none are present, the entire hash is returned (if any), otherwise only the given key values are returned; if mutiple keys are given, then a hash is returned, if a single key is given, then only that key value is returned
Returns
the sensitive data hash stored according to the sensitive data key and value; if no such sensitive key and value exist for the order, then NOTHING is returned
Note
  • returns sensitive data; take care not to log any of the data returned by this function
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_get_sensitive_data_aliases()

hash<auto> OMQ::UserApi::Workflow::wf_get_sensitive_data_aliases ( )

returns a hash of all sensitive data aliases for the current order or an empty hash if there are none

Example:
Returns
a hash of all sensitive data aliases for the current order or an empty hash if there are none, otherwise keys are alias names and values are hashes with the following keys:
  • skey: (string) the sensitive data key type
  • svalue: (string) the sensitive data value (considered sensitive itself)
Note
  • returns sensitive data; sensitive data values (svalue) should not be logged
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_get_sensitive_data_from_alias()

hash<auto> OMQ::UserApi::Workflow::wf_get_sensitive_data_from_alias ( string  alias)

returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of one or more keys in the workflow sensitive data hash for the given sensitive data alias corresponding to a sensitive data key and value

Example:
# get the tax number for the person
string tax_number = wf_get_sensitive_data_from_alias("0", "tax_number").value;
Parameters
aliasthe alias to lookup; if the alias is unknown, an INVALID-ALIAS exception is raised
...zero or more string key fields to return
Returns
a hash of information corresponding to the arguments; the hash returned has the following keys:
  • skey: (string) the sensitive data key type
  • svalue: (string) the sensitive data value
  • value: the value of the entire hash (if no arguments were requested), or a hash of the requested keys (if more than one key was requested), or the given value (if set, if one value is requested)
Exceptions
INVALID-ALIASthe given alias is unknown
Note
  • returns sensitive data; take care not to log any of the data returned by this function
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_get_sensitive_data_key_values()

hash<auto> OMQ::UserApi::Workflow::wf_get_sensitive_data_key_values ( )

Returns a hash of sensitive data keys and values saved against the order; the sensitive data hashes themselves are not returned, just the information used to index sensitive data against the order.

Example:
Returns
a hash of sensitive data keys and values saved against the order; the sensitive data hashes themselves are not returned, just the information used to index sensitive data against the order; if no sensitive data is stored against the order, an empty hash is returned
Note
  • returns sensitive data; sensitive data values should not be logged
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_get_sensitive_metadata()

auto OMQ::UserApi::Workflow::wf_get_sensitive_metadata ( string  skey,
string  svalue 
)

Returns the sensitive metadata hash for the given sensitive data key and value if present, otherwise returns an empty hash.

Example:
hash metadata = wf_get_sensitive_metadata("personal_id", personal_id);
Parameters
skeythe type of sensitive key provided in svalue
svaluethe value of the sensitive data key identified by skey
Returns
the sensitive metadata hash stored according to the sensitive data key and value; if no such sensitive key and value exist for the order, or no metadata is present for the given sensitive key and value, then an empty hash is returned
Note
  • returns sensitive data; take care not to log any of the data returned by this function
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_get_sensitive_metadata_from_alias()

hash<auto> OMQ::UserApi::Workflow::wf_get_sensitive_metadata_from_alias ( string  alias)

returns a hash with the corresponding sensitive data key and sensitive data value as well as the value of the sensitive metadata hash for the given sensitive data alias corresponding to a sensitive data key and value

Example:
# get sensitive metadata
hash<auto> metadata = wf_get_sensitive_metadata_from_alias("0").value;
Parameters
aliasthe alias to lookup; if the alias is unknown, an INVALID-ALIAS exception is raised
Returns
a hash of information corresponding to the arguments; the hash returned has the following keys:
  • skey: (string) the sensitive data key type
  • svalue: (string) the sensitive data value (considered sensitive itself)
  • value: (hash) the value of the sensitive metadata hash, if any
Exceptions
INVALID-ALIASthe given alias is unknown
Note
  • returns sensitive data; take care not to log any of the sensitive data returned by this function
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_get_static_data()

auto OMQ::UserApi::Workflow::wf_get_static_data ( )

Retrieves the values of one or more keys from the workflow order data instance’s static data hash (this is the order data the workflow execution instance is processing)

Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested

Workflow order static data corresponds to the deserialized contents of the database field ORDER_INSTANCE.STATICDATA for the current workflow order data instance.

Returns
data from the workflow order data instance’s static data hash according to the arguments passed
Note
  • Prior to Qorus 3.0.2 this function was known as getStaticData(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_step_info()

*hash<auto> OMQ::UserApi::Workflow::wf_get_step_info ( )

This function will return a hash of step information for the current step.

Returns
if not called from a step; returns NOTHING, otherwise returns a hash with the following members:
  • stepid: the ID of the step
  • name: the name of the step
  • [patch]: the patch string for the step
  • [desc]: the description of the step
  • version: the version of the step
  • steptype: OMQ::ExecNormal, OMQ::ExecSubWorkflow, or OMQ::ExecAsync
  • arraytype: either OMQ::ArraySeries or OMQ::ArrayNone for non-array steps
  • index: the element number for array steps (always 0 for non-array steps)
  • [array_size]: the number of elements in the array for array steps
  • [stepstatus]: the previous step status when called from a workflow executpon instance run in OMQ::WM_Recovery mode
  • [retries]: the current retry number when called from a workflow execution instance run in OMQ::WM_Recovery mode
  • stepfunction_instanceid: the function instance ID of the primary step function
  • sfname: the name of the primary step function
  • [validationfunction_instanceid]: the function instance ID of the validation function
  • [vfname]: the name of the validation function (corresponds to validationfunction_instanceid)
  • [endfunction_instanceid]: the function instance ID of the asynchronous end function for asynchronous steps
  • [efname]: the name of the end function (corresponds to endfunction_instanceid)
  • [arrayfunction_instanceid]: the function instance ID of the array function for array steps
  • [afname]: the name of the array function (corresponds to arrayfunction_instanceid)
  • [queueid]: the ID of the asynchronous queue for asynchronous steps
  • [queuename]: the name of the asynchronous queue (corresponds to queueid)
  • [workflow_event_typeid]: the event type ID for workflow synchronization event steps
  • [eventtype]: the name of the event type (corresponds to workflow_event_typeid)
Note
  • Prior to Qorus 3.0.2 this function was known as getStepInfo(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_step_status()

*string OMQ::UserApi::Workflow::wf_get_step_status ( string  stepname)

Returns the current status of the given step for the current workflow order instance.

If the step name does not exist then an exception is thrown

Returns
the current status of the given step for the current workflow order instance
Note
  • Prior to Qorus 3.0.2 this function was known as getStepStatus(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_temp_data()

auto OMQ::UserApi::Workflow::wf_get_temp_data ( )

Retrieves the values of one or more keys from the workflow order data instance’s temporary data hash.

See also
Workflow Temporary Data
Note
  • Prior to Qorus 3.0.2 this function was known as getTempData(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_get_workflow_instance_data() [1/2]

auto OMQ::UserApi::Workflow::wf_get_workflow_instance_data ( string  field)

Retrieves the value of a single key (system-defined property) from the workflow execution instance object itself.

Parameters
fieldthe workflow execution instance key; see Running Workflow Execution Instance Properties for valid keys
Returns
the value of the key in the current workflow execution instance
Note
Since
Qorus 3.1.0 the sync attribute was added
See also

◆ wf_get_workflow_instance_data() [2/2]

hash<auto> OMQ::UserApi::Workflow::wf_get_workflow_instance_data ( )

Retrieves the values of one or more keys (system-defined properties) from the workflow execution instance object itself.

Pass a single string argument, in which case the value of that key is returned, or a list of strings, in which case a hash is returned giving the values of all the keys requested; see Running Workflow Execution Instance Properties for valid keys; if no arguments are passed, then a hash of all possible keys is returned

Returns
a hash of key-value pairs giving the value of the given keys in the current workflow execution instance
Exceptions
GET-WORKFLOW-INSTANCE-DATA-ERRORinvalid arguments to function
Note
See also

◆ wf_get_workflow_metadata()

hash<auto> OMQ::UserApi::Workflow::wf_get_workflow_metadata ( )

returns workflow metadata for the currently running workflow as a hash

Returns
a hash of workflow metadata; see Workflow Metadata for the hash description
Note
  • Prior to Qorus 3.0.2 this function was known as getWorkflowMetadata(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_leave_parent_feedback()

OMQ::UserApi::Workflow::wf_leave_parent_feedback ( string  key,
auto  value 
)

leaves feedback for a parent workflow

When this call returns, the feedback data has already been committed to the database.

Parameters
keythe key name for the feedback in the parent workflow
valuethe value of the key
Exceptions
FEEDBACK-ERRORthe current workflow is not a subworkflow; value is NOTHING or an error occurred accessing the parent workflow order
SESSION-ERRORthe parent workflow order is being processed by another Qorus session
STATUS-ERRORthe parent workflow order is already COMPLETE or CANCELED and cannot be updated

The parent workflow should then call wf_get_child_feedback() to get the feedback data left by the child workflow.

Note
  • Prior to Qorus 3.0.2 this function was known as leave_parent_feedback(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_parent_wfiid()

*softint OMQ::UserApi::Workflow::wf_parent_wfiid ( )

Returns the parent workflow order data instance ID from a subworkflow or NOTHING if the current workflow order is not a subworkflow and therefore has no parent.

Returns
the parent workflow order data instance ID of a subworkflow or NOTHING if the current workflow order is not a subworkflow
Note
The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_reprioritize_order()

OMQ::UserApi::Workflow::wf_reprioritize_order ( int  prio)

changes the order priority for the current workflow order instance

Parameters
priomust be an integer >= 0 and <= 999
Since
Qorus 2.6.0
Note
  • The order priority can be changed externally by calling the system API method omq.system.reprioritize-order()
  • Prior to Qorus 3.0.2 this function was known as reprioritize_order(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_reschedule_order()

OMQ::UserApi::Workflow::wf_reschedule_order ( date  scheduled)

reschedules the current workflow order instance for later processing

Can only be called in the attach function; calling anywhere else will cause an exception to be raised. Can only be called when the workflow order has status OMQ::StatReady or OMQ::StatScheduled; otherwise an exception will be raised.

Parameters
scheduledIf the date is ealier than the current time; then this call is ignored
Exceptions
RESCHEDULE-ERRORfunction not called from the attach function; order data does not have OMQ::StatReady or OMQ::StatScheduled status
Note
  • The scheduled date can be changed or cleared by calling the system API method omq.system.reschedule-order()
  • Prior to Qorus 3.0.2 this function was known as reschedule_order(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 2.6.0

◆ wf_serror() [1/3]

OMQ::UserApi::Workflow::wf_serror ( string  err,
auto  info 
)

Raises an error against the current step without affecting the flow of processing.

This function will affect the final status of the step, segment, and workflow, if the severity of the error is OMQ::ES_Major or OMQ::ES_Fatal. If the error raised is not defined, severity OMQ::ES_Major is assumed.

Parameters
errthe string error code
infoadditional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history
Note
  • workflow errors can also be raised by throwing an exception
  • Prior to Qorus 3.0.2 this function was known as serror(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_serror() [2/3]

OMQ::UserApi::Workflow::wf_serror ( string  err,
auto  info,
date  retry_delay 
)

Raises an error against the current step without affecting the flow of processing.

This function will affect the final status of the step, segment, and workflow, if the severity of the error is OMQ::ES_Major or OMQ::ES_Fatal. If the error raised is not defined, severity OMQ::ES_Major is assumed.

Parameters
errthe string error code
infoadditional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history
retry_delaythe amount of time to wait until a retry is made; overrides any value in the error definition; this may be either a relative date/time value (in which case the value is added to the current time to arrive at an absolute date/time value), or an absolute date/time value, giving the earliest date/time that the error will be retried
Since
Qorus 2.5.0 (variants with the retry_delay parameter)
Note
  • workflow errors can also be raised by throwing an exception
  • Prior to Qorus 3.0.2 this function was known as serror(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_serror() [3/3]

OMQ::UserApi::Workflow::wf_serror ( string  err,
auto  info,
int  retry_delay 
)

Raises an error against the current step without affecting the flow of processing.

This function will affect the final status of the step, segment, and workflow, if the severity of the error is OMQ::ES_Major or OMQ::ES_Fatal. If the error raised is not defined, severity OMQ::ES_Major is assumed.

Parameters
errthe string error code
infoadditional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history
retry_delaythe amount of time in seconds to wait until a retry is made; overrides any value in the error definition
Since
Qorus 2.5.0 (variants with the retry_delay parameter)
Note
  • workflow errors can also be raised by throwing an exception
  • Prior to Qorus 3.0.2 this function was known as serror(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_set_blocked()

OMQ::UserApi::Workflow::wf_set_blocked ( )

set the current workflow order status to OMQ::StatBlocked, can only be called from the attach function

Processing of the workflow order will stop after this call; in order to be further processed the workflow order must be unblocked

Exceptions
BLOCK-ERRORfunction not called from attach function
Note
  • This function can only be called in the attach function of the workflow; if called from any other code, an exception will result.
  • Prior to Qorus 3.0.2 this function was known as setBlocked(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 2.5.0

◆ wf_set_custom_status()

OMQ::UserApi::Workflow::wf_set_custom_status ( string  stat)

Sets a user-defined custom status for the current step.

The custom status is also propagatef to the segment and workflow order data instances. The status is reset when the step is updated subsequently. The value of the custom status is only used for display purposes; it does not affect Qorus’ internal behavior at all.

Parameters
statthe custom user-defined status to set for the step
Exceptions
CUSTOM-STATUS-ERRORthis exception is thrown if this function is called outside of step code
Note
  • The custom status must be a single character
  • Prior to Qorus 3.0.2 this function was known as setCustomStatus(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 2.5.0

◆ wf_set_order_keys()

OMQ::UserApi::Workflow::wf_set_order_keys ( hash< auto >  h,
bool  truncate = False 
)

This function sets user-defined order keys against an order, so that the workflow order data instance can be quickly searched and retrieved using the key value.

The hash provided replaces orders keys on the workflow order; existing order keys matching keys given in the hash provided as an argument to this function are replaced and any new keys in the hash are added.

The data is committed to the database before the function returns.

Parameters
hkey-value pairs to set for order keys; the keys in this hash must match those defined for the workflow
truncateallow key values to be truncated without an error
Exceptions
SET-ORDER-KEYS-ERRORempty hash passed to wf_set_order_keys()
INVALID-WORKFLOW-KEYinvalid key for workflow
DUPLICATE-KEY-VALUEan order key was assigned a value more than once
Note
  • Prior to Qorus 3.0.2 this function was known as setOrderKeys(), and is still imported with this old camel-case name for backwards compatibility
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_set_retry_delay() [1/2]

OMQ::UserApi::Workflow::wf_set_retry_delay ( date  delay)

Sets the value of the retry delay for an asynchronous step.

Only takes effect when called from an asynchronous step that will receive an OMQ::StatAsyncWaiting ("A") status or when called from a normal step after an error has been raised that will cause the step to get a OMQ::StatRetry ("R") status. Note that if this function is called before an error is raised, the retry delay setting will be lost.

Otherwise, to affect the retry of a normal step when an error has been raised that will give the step a status of OMQ::StatRetry ("R"), you can also use the wf_serror() function with the optional third argument giving the retry delay instead of calling this function after the call to wf_serror().

Parameters
delaythe amount of time to wait until a retry is made; overrides any value in the error definition
Since
Qorus 2.5.0
Note
  • Prior to Qorus 3.0.2 this function was known as setRetryDelay(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_set_retry_delay() [2/2]

OMQ::UserApi::Workflow::wf_set_retry_delay ( int  secs)

Sets the value of the retry delay for an asynchronous step.

Only takes effect when called from an asynchronous step that will receive an OMQ::StatAsyncWaiting ("A") status or when called from a normal step after an error has been raised that will cause the step to get a OMQ::StatRetry ("R") status. Note that if this function is called before an error is raised, the retry delay setting will be lost.

Otherwise, to affect the retry of a normal step when an error has been raised that will give the step a status of OMQ::StatRetry ("R"), you can also use the wf_serror() function with the optional third argument giving the retry delay instead of calling this function after the call to serror().

Parameters
secsthe amount of time in seconds to wait until a retry is made; overrides any value in the error definition
Since
Qorus 2.5.0
Note
  • Prior to Qorus 3.0.2 this function was known as setRetryDelay(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_skip_async_step()

OMQ::UserApi::Workflow::wf_skip_async_step ( )

This function will skip the execution of an asynchronous step.

Calling this function in a non-asynchronous step or calling this function or wf_submit_async_key() more than once from an asynchronous step will result in an exception.

Exceptions
INVALID-FUNCTION-CALLinvalid function call (not from async step or double call, etc)
Note
  • Asynchronous steps must call either this function or wf_submit_async_key() or an error will be raised.
  • Prior to Qorus 3.0.2 this function was known as skipAsyncStep(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_skip_event()

OMQ::UserApi::Workflow::wf_skip_event ( )

skips a workflow synchronization event step

can only be called from a workflow synchronization event step (step of type OMQ::ExecEvent); otherwise if called from any other step type, or called after wf_bind_event(), then an exception is raised. If called twice for the same step a message is logged but no exception is raised

Exceptions
WORKFLOW-EVENT-ERRORinvalid function call (not workflow synchronization step, multiple call, etc)
Note
  • Either wf_bind_event() or wf_skip_event() must be called in a workflow synchronization event step
  • Prior to Qorus 3.0.2 this function was known as skip_event(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 2.6.0

◆ wf_skip_subworkflow()

hash<auto> OMQ::UserApi::Workflow::wf_skip_subworkflow ( )

This function will skip the execution of a subworkflow step.

Calling this function in a non-subworkflow step will result in an exception being thrown.

Calling after wf_bind_subworkflow() has already been called, and a subworkflow order instance has been bound to the step, will result in an exception.

Calling this function twice for the same step will simply cause a message to be logged that the function was called twice.

Returns
a hash with the following keys:
  • workflow_instanceid: the current workflow_instanceid
  • skipped: constant boolean True
Exceptions
SUBWORKFLOW-ERRORinvalid call (not subworkflow step, subworkflow already bound, etc)
Note
  • Subworkflow steps must call either this function or wf_bind_subworkflow() or an error will be raised.
  • Prior to Qorus 3.0.2 this function was known as skipSubWorkflow(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_step_executed()

bool OMQ::UserApi::Workflow::wf_step_executed ( string  stepname)

This function returns True if the step passed has been executed and has status OMQ::StatComplete ("C")

If the step name does not exist then an exception is thrown

Returns
True if the step passed has been executed and has status OMQ::StatComplete ("C")
Note
  • Prior to Qorus 3.0.2 this function was known as stepExecuted(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_submit_async_key()

OMQ::UserApi::Workflow::wf_submit_async_key ( softstring  key)

This function creates a queue entry in the asynchronous queue bound to the asynchronous step being executed with a queue status of OMQ::QS_Waiting ("W")

If this function is called in a non-asynchronous (i.e. not OMQ::ExecAsync, so either a normal, subworkflow, or event synchronization) step, or if this function or wf_skip_async_step() are called more than once from an asynchronous step, an exception will be thrown.

If the key already exists in the queue, an exception will be thrown.

The queue name and ID is taken from the step definition; queue entries are created in the table QUEUE_DATA.

Parameters
keythe key for the queue entry; must be unique in the queue
Exceptions
INVALID-FUNCTION-CALLinvalid function call (not from async step or double call, etc)
INVALID-KEYempty string passed for key
Note
  • Asynchronous steps must call either this function or wf_skip_async_step() or an error will be raised.
  • Prior to Qorus 3.0.2 this function was known as submitAsyncKey(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_swarning() [1/2]

OMQ::UserApi::Workflow::wf_swarning ( string  err,
auto  info 
)

Raises a warning against the step.

The information is logged, but does not affect the step’s status.

Parameters
errthe string error code
infoadditional information for the error; should normally be a string in order to be logged in the database; if not a string then it will be converted to a string for saving in error history
Note
  • Prior to Qorus 3.0.2 this function was known as swarning(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_swarning() [2/2]

OMQ::UserApi::Workflow::wf_swarning ( string  err,
string  fmt 
)

Raises a warning against the step.

The information is logged, but does not affect the step’s status.

Parameters
errthe string error code
fmta format string to format additional arguments
Note
  • Prior to Qorus 3.0.2 this function was known as swarning(), and is still imported with this old name without the "wf_" prefix for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_update_dynamic_data()

OMQ::UserApi::Workflow::wf_update_dynamic_data ( hash< auto >  hash)

Updates the values of one or more keys in the workflow order data instance’s dynamic data hash.

Dynamic data is directly linked to the order data the workflow execution instance is processing.

Changes are committed to the database before the function returns.

See also
Workflow Order Dynamic Data
Parameters
hashthe key-value pairs to update in dynamic data
Note
  • this call does not replace the dynamic data hash; any keys in the hash parameter are added to the dynamic data hash
  • Prior to Qorus 3.0.2 this function was known as updateDynamicData(), and is still imported with this old camel-case name for backwards compatibility
  • The use of this method causes SQL I/O to be performed in the system schema; to maximize performance, calls to this and other similar methods should be minimized if possible
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_update_instance_data()

OMQ::UserApi::Workflow::wf_update_instance_data ( hash< auto >  hash)

Updates the values of one or more keys in the workflow execution instance’s instance data hash.

Parameters
hashthe key-value pairs to update in workflow execution instance data
Note
  • Prior to Qorus 3.0.2 this function was known as updateInstanceData(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_update_sensitive_data()

OMQ::UserApi::Workflow::wf_update_sensitive_data ( string  skey,
string  svalue,
hash< auto >  hash,
*softlist  aliases,
*hash< auto >  meta 
)

Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data key and value.

Example:
wf_update_sensitive_data("personal_id", h.person.personal_id, h, h.("tax_number",));
Parameters
skeythe type of value provided in svalue; must not be longer than 100 bytes long or a SENSITIVE-DATA-ERROR exception is raised
svaluethe value of the sensitive data key identified by skey; if this string is empty or longer than 100 bytes, a SENSITIVE-DATA-ERROR exception is raised
hashthe data to create or update against skey; existing keys will be replaced; new keys will be added; if the new hash does not refer to existing keys, then those existing keys remain untouched
aliasesother values for the sensitive data
metaoptional sensitve data metadata with the following recommended keys:
  • PURPOSE: free-form information about the purpose of the sensitive data
  • CATEGORIES: free-form information about the categories of sensitive data
  • RECIPIENTS: free-form information about the recipients or recipient catories of sensitive data
  • STORAGE: free-form information about the storage time or rules for sensitive data
Exceptions
SENSITIVE-DATA-ERRORno sensitive key value was provided; sensitive key value too long (100 bytes maximum length in the encoding used by the system schema)
Note
  • do not use sensitive data for the sensitive key names itself (skey); key names are logged to provide an audit trail of changes to sensitive data
  • metadata keys listed above for the meta argument are recommended for consistency's sake but are not checked; a hash with any keys can be stored with this API
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_update_sensitive_data_from_alias()

OMQ::UserApi::Workflow::wf_update_sensitive_data_from_alias ( string  alias,
hash  hash,
*hash  meta 
)

Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data alias.

Example:
Parameters
aliasthe alias to use for updating the data; if the alias is unknown, an INVALID-ALIAS exception is raised
hashthe data to create or update against skey; existing keys will be replaced; new keys will be added; if the new hash does not refer to existing keys, then those existing keys remain untouched
metaoptional sensitve data metadata with the following recommended keys:
  • PURPOSE: free-form information about the purpose of the sensitive data
  • CATEGORIES: free-form information about the categories of sensitive data
  • RECIPIENTS: free-form information about the recipients or recipient catories of sensitive data
  • STORAGE: free-form information about the storage time or rules for sensitive data
Exceptions
INVALID-ALIASthe alias given is unknown
Note
  • metadata keys listed above for the meta argument are recommended for consistency's sake but are not checked; a hash with any keys can be stored with this API
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.1

◆ wf_update_temp_data()

OMQ::UserApi::Workflow::wf_update_temp_data ( hash< auto >  hash)

Updates the values of one or more keys in the workflow order data instance’s temporary data hash.

Parameters
hashthe key-value pairs to update in workflow temporary data
See also
Workflow Temporary Data
Note
  • this call does not replace the temporary data hash; any keys in the hash parameter are added to the temporary data hash
  • Prior to Qorus 3.0.2 this function was known as updateTempData(), and is still imported with this old camel-case name for backwards compatibility
  • The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also

◆ wf_wfiid()

*softint OMQ::UserApi::Workflow::wf_wfiid ( )

returns the current workflow_instanceid as an integer; returns NOTHING if not called in a workflow order context (ex: onetimeinit function, etc)

Returns
the current workflow_instanceid as an integer; returns NOTHING if not called in a workflow order context (ex: onetimeinit function, etc)
Note
The function-baased workflow API will be deprecated in a future release; please use class-based steps and the WorkflowApi class instead of this function
See also
Since
Qorus 3.1.0