Skip to content

Additional SequentialConditions considerations #3555

@derekpierre

Description

@derekpierre

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, CONDITION has an optional name value that was intended for labelling. Perhaps the already existing name value can be used instead of varName, and then the ConditionVariable type will no longer be needed.

  • CONDITION has a required returnValueTest property. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions