The abstract class for normal array steps.
More...
|
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...
|
|
The abstract class for normal array steps.
- Example
%new-style
%require-types
%strict-types
%enable-all-warnings
class MyNormalStepClass inherits QorusNormalArrayStep {
softlist<auto> array() {
}
primary(auto array_arg) {
}
string validation(auto array_arg) {
if (checkAction(array_arg)) {
return OMQ::StatComplete;
}
return checkPending(array_arg) ? OMQ::StatAsyncWaiting : OMQ::StatRetry;
}
bool checkAction(auto array_arg) {
}
bool checkPending(auto array_arg) {
}
}
- 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
◆ 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
-
◆ 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
-
- 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: