-
Notifications
You must be signed in to change notification settings - Fork 277
Description
Additional considerations based on initial SequentialConditiion design work done in #3500:
CONDITION_VARIABLE = {
"varName": STR,
"condition": {
CONDITION
}
}
SEQUENTIAL_CONDITION = {
"name": ... (Optional),
"conditionType": "sequential",
"conditionVariables": [CONDITION_VARIABLE*]
}- For a
ConditionVariable,CONDITIONhas an optionalnamevalue that was intended for labelling. Perhaps the already existingnamevalue can be used instead ofvarName, and then theConditionVariabletype will no longer be needed.
CONDITIONhas a requiredreturnValueTestproperty. Therefore each condition in the sequential condition will require a check i.e. return value test. The need for check may apply in some cases, but in others, perhaps the result of a condition execution call does not need to be checked - i.e. we only need the result of the underlying call and don't need to check the value. Since returnValueTest is required devs could do a trivial check like != "" or != -1 or ... if they really don't care about the value of the result, but just need it for a subsequent condition.
Instead a SequentialCondition may use some combination of CALL(s) (the ExecutionCall concept from #3500 could be further leveraged) and CONDITION(s) where some items don't need to check the result while others do respectively. Alternatively, if we continue to just use CONDITIONS then perhaps a noop return value test could be good instead of always having the condition do some trivial check as part of the required return value test.
So something like:
CONDITION_VARIABLE = {
"varName": STR,
"condition": {
CONDITION
}
}
EXECUTION_VARIABLE = {
"varName": STR,
"call": {
EXECUTION_CALL
}
}
SEQUENTIAL_CONDITION = {
"name": ... (Optional),
"conditionType": "sequential",
"conditionVariables": [(CONDITION_VARIABLE | EXECUTION_VARIABLE)*]
}This was explored early on in #3500:
But was subsequently removed for simplification.
Note however that since execution calls are purely execution and don't have any ondition checking, what is the behaviour of a SequentialCondition whose list ends with an EXECUTION_VARIABLE (and not a CONDITION_VARIABLE). Does successful execution i.e. a result is received and no exception raised, mean the condition should return True? Perhaps - just something to think about.