IfFlow

struct IfFlow
extension IfFlow : Equatable, Hashable, Identifiable, Node, Sendable

A Node that executes a sequence of nodes if a condition is true. If the if-then condition is false, it will evaluate the else-if clauses in order. If none of the clauses execute, the else-then clause will execute if it is defined. Otherwise, the next Node in the parent flow will execute.

IfFlow nodes are not permitted within a ParallelFlow.

  • id

    The stable identity of the entity associated with this instance.

    Declaration

    Swift

    let id: String
  • The if-then clause of the IfFlow.

    Declaration

    Swift

    let ifThen: IfThen
  • The else-if clauses of the IfFlow. These will execute in order if the if-then clause is false.

    Declaration

    Swift

    let elseIfThens: [IfThen]
  • The else-then clause of the IfFlow. This will execute if none of the if-then or else-if clauses execute.

    Declaration

    Swift

    let elseThen: (any Node)?