Qorus Integration Engine®  5.1.2_git
OMQ::UserApi::Workflow::QorusNormalArrayStep Class Referenceabstract

The abstract class for normal array steps. More...

Inheritance diagram for OMQ::UserApi::Workflow::QorusNormalArrayStep:
OMQ::UserApi::Workflow::QorusStepBase

Public Member Methods

abstract public softlist< auto > array ()
 The array method returns the list of elements for the step. More...
 
abstract public nothing primary (auto array_arg)
 The primary step logic for the normal step. More...
 
string validation (auto array_arg)
 Validation logic for the step. More...
 

Detailed Description

The abstract class for normal array steps.

Example
%new-style
%require-types
%strict-types
%enable-all-warnings
class MyNormalStepClass inherits QorusNormalArrayStep {
softlist<auto> array() {
# ... array logic
}
primary(auto array_arg) {
# ... primary step logic
}
string validation(auto array_arg) {
# call checkAction() to check in the target DB if the action has completed
if (checkAction(array_arg)) {
return OMQ::StatComplete;
}
# call checkPending() to see if we retry or still wait
return checkPending(array_arg) ? OMQ::StatAsyncWaiting : OMQ::StatRetry;
}
bool checkAction(auto array_arg) {
# ... logic here
}
bool checkPending(auto array_arg) {
# ... logic here
}
}
# END
Note
Qorus step constructors do not take any arguments; see Step Constructors and Static Initialization for information about constructors and static class initialization.
See also
Normal Steps and Array Step

Member Function Documentation

◆ array()

abstract public softlist<auto> OMQ::UserApi::Workflow::QorusNormalArrayStep::array ( )
pure virtual

The array method returns the list of elements for the step.

Returns
The return value of the array function will determine how many times the step will execute, and on what data; null or a zero-length array means to skip the step entirely. Each element in this array indicates an array step element; each element will be passed as the argument to primary() and validation()
Note
this method must always return the same list in the same order in every call (for example if the step must be recovereed); use Workflow Dynamic Order Data to save the list to ensure that this method always returns the same list in the same order if necessary

◆ primary()

abstract public nothing OMQ::UserApi::Workflow::QorusNormalArrayStep::primary ( auto  array_arg)
pure virtual

The primary step logic for the normal step.

Parameters
array_argthe array element for this step index as returned by the array method

◆ validation()

string OMQ::UserApi::Workflow::QorusNormalArrayStep::validation ( auto  array_arg)

Validation logic for the step.

This method must be overridden for steps that can only execute once; by default this method will return OMQ::StatRetry, meaning that the primary step logic will be repeated.

Parameters
array_argthe array element for this step index as returned by the array method
Returns
this must be one of the following step status constants:
  • StatComplete: do not run the primary step logic; mark the step as "COMPLETE" and continue
  • StatError: do not run the primary step logic; mark the step as "ERROR" and stop running any further dependencies of this step
  • StatRetry: run the step function again immediately
Note
if any other value than the above is returned, an error is raised and the return value is treated like OMQ::StatError
See also

The documentation for this class was generated from the following file: