Qorus Integration Engine®
4.0.3.p2_git
|
main workflow API namespace More...
Classes | |
class | DynamicDataHelper |
This class is a helper class that allows workflow dynamic data to be read and updated atomically; the write lock for the data is grabbed in the constructor and released in the destructor. More... | |
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 | QorusWorkflow |
Base class for workflow classes. More... | |
class | SensitiveDataHelper |
This class is a helper class that allows workflow sensitive data to be read and updated atomically; the write lock for the data is grabbed in the constructor and released in the destructor. More... | |
class | StepDataHelper |
This class is a helper class that allows workflow dynamic step data to be read and updated atomically; the write lock for the data is grabbed in the constructor and released in the destructor. More... | |
class | TempDataHelper |
This class is a helper class that allows workflow temp data to be read and updated atomically; the write lock for the data is grabbed in the constructor and released in the destructor. More... | |
class | WorkflowApi |
primary workflow API class More... | |
class | WorkflowDataHelper |
This class is a helper class that allows workflow dynamic data (DynamicDataHelper) and workflow temp data (TempDataHelper) to be read and updated atomically; the write lock for the data is grabbed in the constructor and released in the destructor. 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) |
main workflow API namespace
Qorus workflow API namespace.
deprecated OMQ::UserApi::Workflow::bind_event | ( | softstring | eventkey | ) |
deprecated OMQ::UserApi::Workflow::bind_event_unposted | ( | softstring | eventkey | ) |
deprecated OMQ::UserApi::Workflow::deleteDynamicDataKey | ( | softlist | list | ) |
deprecated OMQ::UserApi::Workflow::deleteInstanceDataKey | ( | softlist | list | ) |
deprecated OMQ::UserApi::Workflow::deleteTempDataKey | ( | softlist | list | ) |
deprecated string OMQ::UserApi::Workflow::generateUniqueKey | ( | ) |
deprecated any OMQ::UserApi::Workflow::get_child_feedback | ( | string | key | ) |
deprecated any OMQ::UserApi::Workflow::getDynamicData | ( | ) |
deprecated any OMQ::UserApi::Workflow::getErrorInfo | ( | string | err | ) |
deprecated any OMQ::UserApi::Workflow::getInstanceData | ( | ) |
deprecated hash<auto> OMQ::UserApi::Workflow::getOrderInfo | ( | ) |
Returns the last order note for the current workflow order data instance.
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
)deprecated any OMQ::UserApi::Workflow::getOrderKeys | ( | ) |
deprecated *string OMQ::UserApi::Workflow::getParentWorkflowInstanceID | ( | ) |
deprecated Datasource OMQ::UserApi::Workflow::getSharedDatasource | ( | string | ds | ) |
deprecated any OMQ::UserApi::Workflow::getStaticData | ( | ) |
deprecated *hash OMQ::UserApi::Workflow::getStepInfo | ( | ) |
deprecated any OMQ::UserApi::Workflow::getTempData | ( | ) |
deprecated DatasourcePool OMQ::UserApi::Workflow::getUniqueDatasource | ( | string | ds | ) |
deprecated any OMQ::UserApi::Workflow::getWorkflowInstanceData | ( | string | field | ) |
deprecated hash OMQ::UserApi::Workflow::getWorkflowInstanceData | ( | ) |
deprecated hash OMQ::UserApi::Workflow::getWorkflowMetadata | ( | ) |
deprecated OMQ::UserApi::Workflow::leave_parent_feedback | ( | string | key, |
any | value | ||
) |
deprecated OMQ::UserApi::Workflow::reprioritize_order | ( | int | prio | ) |
deprecated OMQ::UserApi::Workflow::reschedule_order | ( | date | scheduled | ) |
deprecated OMQ::UserApi::Workflow::serror | ( | string | err, |
any | info | ||
) |
deprecated OMQ::UserApi::Workflow::setBlocked | ( | ) |
deprecated OMQ::UserApi::Workflow::setCustomStatus | ( | string | stat | ) |
deprecated OMQ::UserApi::Workflow::setOrderInfo | ( | *hash< auto > | h | ) |
Sets additional order attributes (op_username
, op_comment
) for the current workflow order data instance.
h | a hash with the following keys:
|
deprecated OMQ::UserApi::Workflow::setRetryDelay | ( | date | delay | ) |
deprecated OMQ::UserApi::Workflow::setRetryDelay | ( | int | secs | ) |
deprecated OMQ::UserApi::Workflow::skip_event | ( | ) |
deprecated OMQ::UserApi::Workflow::skipAsyncStep | ( | ) |
deprecated hash OMQ::UserApi::Workflow::skipSubWorkflow | ( | ) |
Saves the information passed to the current log file depending on the calling context (workflow, service, or job)
ds | the datasource for the SQL message |
msg | the format string for a vsprintf() call with the remaining arguments |
deprecated bool OMQ::UserApi::Workflow::stepExecuted | ( | string | stepname | ) |
deprecated OMQ::UserApi::Workflow::submitAsyncKey | ( | softstring | key | ) |
deprecated OMQ::UserApi::Workflow::swarning | ( | string | err, |
any | info | ||
) |
deprecated OMQ::UserApi::Workflow::updateDynamicData | ( | hash | hash | ) |
deprecated OMQ::UserApi::Workflow::updateInstanceData | ( | hash | hash | ) |
deprecated OMQ::UserApi::Workflow::updateTempData | ( | hash | hash | ) |
OMQ::UserApi::Workflow::wf_add_order_note | ( | string | notestr | ) |
Add new note as described in Order Instance Notes.
notestr | a string with note |
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.
h | key-value pairs to append to workflow order keys; the keys in this hash must match those defined for the workflow |
truncate | allow key values to be truncated without an error |
APPEND-ORDER-KEYS-ERROR | empty hash passed to wf_append_order_keys() |
INVALID-WORKFLOW-KEY | invalid key for workflow |
SET-ORDER-KEYS-ERROR | an invalid data type (not convertible to a string) was given as a key value |
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.
key | the workflow order key to append to; this key must match a defined workflow order key |
value | the value to append for the given key |
truncate | allow key values to be truncated without an error |
INVALID-WORKFLOW-KEY | invalid key for workflow |
DUPLICATE-KEY-VALUE | an order key was assigned a value more than once |
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.
eventkey | the 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 |
WORKFLOW-EVENT-ERROR | invalid function call (not workflow synchronization step, multiple call, etc) |
"wf_"
prefix for backwards compatibilityOMQ::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.
eventkey | the 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 |
ALREADY-POSTED | the given event has already been posted |
WORKFLOW-EVENT-ERROR | invalid function call (not workflow synchronization step, multiple call, etc) |
"wf_"
prefix for backwards compatibilityThis 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
wf | This hash identifies the workflow type to be bound to the subworkflow step having the following keys:
|
order | A hash defining the order data to be processed. Valid keys for this hash are:
|
workflow_instanceid
, the value of which is the workflow order data instance ID of the subworkflowSUBWORKFLOW-ERROR | invalid function call (not subworkflow step, multiple call, etc), invalid arguments (unknown workflow, etc) |
WORKFLOW-KEY-ERROR | invalid workflow key given |
ORDER-DATA-ERROR | missing either external_order_instanceid or staticdata , unknown workflow; invalid keys or sensitive data format |
DUPLICATE-ORDER-KEY | the given unique key already exists in the defined scope |
global_unique_key
sensitive_data
workflow_specific_unique_key
workflow_unique_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.
list | a single key or a list of keys to delete in the workflow order's dynamic data |
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.
list | a single key or a list of strings (keys) to delete in workflow execution instance data |
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.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
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.
Changes are committed to the database before the function returns.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
list | a single key or a list of keys to delete in the workflow order's sensitive data hash for the given sensitive key-value pair |
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.
list | a single key or a a list of strings (keys) to delete in workflow temporary data |
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()
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
key | the feedback key name used by the child workflow |
"wf_"
prefix for backwards compatibility*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
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.
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 the hash data associated with the error code passed as an argument.
err | the error name |
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.
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).
Get Order Instance Notes.
count | an optional integer to limit the list size |
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 sensitive data hash for the given sensitive data key and value.
skey | the type of sensitive key provided in svalue |
svalue | the 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 |
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
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
alias | the alias to lookup; if the alias is unknown, an INVALID-ALIAS exception is raised |
... | zero or more string key fields to return |
INVALID-ALIAS | the given alias is unknown |
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.
Returns the sensitive metadata hash for the given sensitive data key and value if present, otherwise returns an empty hash.
skey | the type of sensitive key provided in svalue |
svalue | the value of the sensitive data key identified by skey |
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
alias | the alias to lookup; if the alias is unknown, an INVALID-ALIAS exception is raised |
INVALID-ALIAS | the given alias is unknown |
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.
*hash<auto> OMQ::UserApi::Workflow::wf_get_step_info | ( | ) |
This function will return a hash of step information for the current step.
stepid:
the ID of the stepname:
the name of the steppatch
]: the patch string for the stepdesc
]: the description of the stepversion:
the version of the stepsteptype:
OMQ::ExecNormal, OMQ::ExecSubWorkflow, or OMQ::ExecAsyncarraytype:
either OMQ::ArraySeries or OMQ::ArrayNone for non-array stepsindex:
the element number for array steps (always 0 for non-array steps)array_size
]: the number of elements in the array for array stepsstepstatus
]: the previous step status when called from a workflow executpon instance run in OMQ::WM_Recovery moderetries
]: the current retry number when called from a workflow execution instance run in OMQ::WM_Recovery modestepfunction_instanceid:
the function instance ID of the primary step functionsfname:
the name of the primary step functionvalidationfunction_instanceid
]: the function instance ID of the validation functionvfname
]: the name of the validation function (corresponds to validationfunction_instanceid
)endfunction_instanceid
]: the function instance ID of the asynchronous end function for asynchronous stepsefname
]: the name of the end function (corresponds to endfunction_instanceid
)arrayfunction_instanceid
]: the function instance ID of the array function for array stepsafname
]: the name of the array function (corresponds to arrayfunction_instanceid
)queueid
]: the ID of the asynchronous queue for asynchronous stepsqueuename
]: the name of the asynchronous queue (corresponds to queueid
)workflow_event_typeid
]: the event type ID for workflow synchronization event stepseventtype
]: the name of the event type (corresponds to workflow_event_typeid
)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
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.
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.
field | the workflow execution instance key; see Running Workflow Execution Instance Properties for valid keys |
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
GET-WORKFLOW-INSTANCE-DATA-ERROR | invalid arguments to function |
hash<auto> OMQ::UserApi::Workflow::wf_get_workflow_metadata | ( | ) |
returns workflow metadata for the currently running workflow as a hash
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.
key | the key name for the feedback in the parent workflow |
value | the value of the key |
FEEDBACK-ERROR | the current workflow is not a subworkflow; value is NOTHING or an error occurred accessing the parent workflow order |
SESSION-ERROR | the parent workflow order is being processed by another Qorus session |
STATUS-ERROR | the 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.
"wf_"
prefix for backwards compatibility*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.
OMQ::UserApi::Workflow::wf_reprioritize_order | ( | int | prio | ) |
changes the order priority for the current workflow order instance
prio | must be an integer >= 0 and <= 999 |
"wf_"
prefix for backwards compatibilityOMQ::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.
scheduled | If the date is ealier than the current time; then this call is ignored |
RESCHEDULE-ERROR | function not called from the attach function; order data does not have OMQ::StatReady or OMQ::StatScheduled status |
"wf_"
prefix for backwards compatibilityOMQ::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.
err | the string error code |
info | additional 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 |
"wf_"
prefix for backwards compatibilityRaises 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.
err | the string error code |
info | additional 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_delay | the 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 |
"wf_"
prefix for backwards compatibilityRaises 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.
err | the string error code |
info | additional 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_delay | the amount of time in seconds to wait until a retry is made; overrides any value in the error definition |
"wf_"
prefix for backwards compatibilityOMQ::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
BLOCK-ERROR | function not called from attach function |
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.
stat | the custom user-defined status to set for the step |
CUSTOM-STATUS-ERROR | this exception is thrown if this function is called outside of step code |
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.
h | key-value pairs to set for order keys; the keys in this hash must match those defined for the workflow |
truncate | allow key values to be truncated without an error |
SET-ORDER-KEYS-ERROR | empty hash passed to wf_set_order_keys() |
INVALID-WORKFLOW-KEY | invalid key for workflow |
DUPLICATE-KEY-VALUE | an order key was assigned a value more than once |
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().
delay | the amount of time to wait until a retry is made; overrides any value in the error definition |
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().
secs | the amount of time in seconds to wait until a retry is made; overrides any value in the error definition |
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.
INVALID-FUNCTION-CALL | invalid function call (not from async step or double call, etc) |
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
WORKFLOW-EVENT-ERROR | invalid function call (not workflow synchronization step, multiple call, etc) |
"wf_"
prefix for backwards compatibilityhash<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.
workflow_instanceid:
the current workflow_instanceidskipped:
constant boolean True
SUBWORKFLOW-ERROR | invalid call (not subworkflow step, subworkflow already bound, etc) |
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
"C"
)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
.
key | the key for the queue entry; must be unique in the queue |
INVALID-FUNCTION-CALL | invalid function call (not from async step or double call, etc) |
INVALID-KEY | empty string passed for key |
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.
err | the string error code |
info | additional 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 |
"wf_"
prefix for backwards compatibilityRaises a warning against the step.
The information is logged, but does not affect the step’s status.
err | the string error code |
fmt | a format string to format additional arguments |
"wf_"
prefix for backwards compatibilityOMQ::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.
hash | the key-value pairs to update in dynamic 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.
hash | the key-value pairs to update in workflow execution instance 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.
skey | the type of value provided in svalue; must not be longer than 100 bytes long or a SENSITIVE-DATA-ERROR exception is raised |
svalue | the 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 |
hash | the 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 |
aliases | other values for the sensitive data |
meta | optional sensitve data metadata with the following recommended keys:
|
SENSITIVE-DATA-ERROR | no sensitive key value was provided; sensitive key value too long (100 bytes maximum length in the encoding used by the system schema) |
Updates or creates the values of one or more keys in the workflow order's sensitive data hash for the given sensitive data alias.
alias | the alias to use for updating the data; if the alias is unknown, an INVALID-ALIAS exception is raised |
hash | the 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 |
meta | optional sensitve data metadata with the following recommended keys:
|
INVALID-ALIAS | the alias given is unknown |
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.
hash | the key-value pairs to update in workflow temporary data |
*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)