Workflow
public final class Workflow<F> : LinkedList<_WorkflowItem> where F : FlowRepresentable
A doubly linked list of FlowRepresentableMetadata
s; used to define a process.
Discussion
In a sufficiently complex application, it may make sense to create a structure to hold onto all the workflows in an application.
Example
struct Workflows {
static let schedulingFlow = Workflow(SomeFlowRepresentable.self)
.thenProceed(with: SomeOtherFlowRepresentable.self)
}
-
Declaration
Swift
public required init(_ node: Element?)
-
Declaration
Swift
public required init(withoutCopying node: Element? = nil)
-
The
OrchestartionResponder
theWorkflow
will send actions to.Declaration
Swift
public internal(set) var orchestrationResponder: OrchestrationResponder? { get }
-
Creates a
Workflow
with aWorkflowItem
that has metadata, but no instance.Declaration
Swift
public convenience init(_ metadata: FlowRepresentableMetadata)
-
Appends a
WorkflowItem
that has metadata, but no instance.Declaration
Swift
public func append(_ metadata: FlowRepresentableMetadata)
-
Launches the
Workflow
.Declaration
Swift
@discardableResult public func launch(withOrchestrationResponder orchestrationResponder: OrchestrationResponder, launchStyle: LaunchStyle = .default, onFinish: ((AnyWorkflow.PassedArgs) -> Void)? = nil) -> Element?
Parameters
orchestrationResponder
the
OrchestrationResponder
to notify when theWorkflow
proceeds or backs up.launchStyle
the launch style to use.
onFinish
the closure to call when the last element in the workflow proceeds; called with the
AnyWorkflow.PassedArgs
the workflow finished with.Return Value
the first loaded instance or nil, if none was loaded.
-
Launches the
Workflow
.Discussion
Args are passed to the first instance, it has the opportunity to load, not load and transform them, or just not load. In the event an instance does not load and does not transform args, they are passed unmodified to the next instance in the
Workflow
until one loads.Declaration
Swift
@discardableResult public func launch(withOrchestrationResponder orchestrationResponder: OrchestrationResponder, args: Any?, withLaunchStyle launchStyle: LaunchStyle = .default, onFinish: ((AnyWorkflow.PassedArgs) -> Void)? = nil) -> Element?
Parameters
orchestrationResponder
the
OrchestrationResponder
to notify when theWorkflow
proceeds or backs up.args
the arguments to pass to the first instance(s).
launchStyle
the launch style to use.
onFinish
the closure to call when the last element in the workflow proceeds; called with the
AnyWorkflow.PassedArgs
the workflow finished with.Return Value
the first loaded instance or nil, if none was loaded.
-
Launches the
Workflow
.Discussion
passedArgs are passed to the first instance, it has the opportunity to load, not load and transform them, or just not load. In the event an instance does not load and does not transform args, they are passed unmodified to the next instance in the
Workflow
until one loads.Declaration
Swift
@discardableResult public func launch(withOrchestrationResponder orchestrationResponder: OrchestrationResponder, passedArgs: AnyWorkflow.PassedArgs, launchStyle: LaunchStyle = .default, onFinish: ((AnyWorkflow.PassedArgs) -> Void)? = nil) -> Element?
Parameters
orchestrationResponder
the
OrchestrationResponder
to notify when theWorkflow
proceeds or backs up.passedArgs
the arguments to pass to the first instance(s).
launchStyle
the launch style to use.
onFinish
the closure to call when the last element in the workflow proceeds; called with the
AnyWorkflow.PassedArgs
the workflow finished with.Return Value
the first loaded instance or nil, if none was loaded.
-
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default)
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (F.WorkflowInput) -> FlowPersistence)
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable
and returning aFlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping () -> FlowPersistence) where F.WorkflowInput == Never
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (F.WorkflowInput) -> FlowPersistence) where F.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where F.WorkflowOutput == FR.WorkflowInput
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR> where F.WorkflowOutput == FR.WorkflowInput
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Wraps this workflow with a type eraser.
Declaration
Swift
public func eraseToAnyWorkflow() -> AnyWorkflow
Return Value
an
AnyWorkflow
wrapping thisWorkflow
-
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
@available(*, deprecated, renamed: "init(_:launchStyle:flowPersistence:﹚") public convenience init(_ type: F.Type, presentationType: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default)
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
the flow representable should use while it’s part of this workflow.flowPersistence
the
FlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
@available(*, deprecated, renamed: "init(_:launchStyle:flowPersistence:﹚") public convenience init(_ type: F.Type, presentationType: LaunchStyle.PresentationType, flowPersistence: @escaping (F.WorkflowInput) -> FlowPersistence)
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
the flow representable should use while it’s part of this workflow.flowPersistence
a closure taking in the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
@available(*, deprecated, renamed: "init(_:launchStyle:flowPersistence:﹚") public convenience init(_ type: F.Type, presentationType: LaunchStyle.PresentationType, flowPersistence: @autoclosure @escaping () -> FlowPersistence) where F.WorkflowInput == Never
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
the flow representable should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
@available(*, deprecated, renamed: "init(_:launchStyle:flowPersistence:﹚") public convenience init(_ type: F.Type, presentationType: LaunchStyle.PresentationType, flowPersistence: @autoclosure @escaping () -> FlowPersistence) where F.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
the flow representable should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
@available(*, deprecated, renamed: "thenProceed(with:launchStyle:flowPersistence:﹚") public func thenPresent<FR: FlowRepresentable>(_ type: FR.Type, presentationType: LaunchStyle.PresentationType = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where F.WorkflowOutput == FR.WorkflowInput
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
@available(*, deprecated, renamed: "thenProceed(with:launchStyle:flowPersistence:﹚") public func thenPresent<FR: FlowRepresentable>(_ type: FR.Type, presentationType: LaunchStyle.PresentationType = .default, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR> where F.WorkflowOutput == FR.WorkflowInput
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
@available(*, deprecated, renamed: "thenProceed(with:launchStyle:flowPersistence:﹚") public func thenPresent<FR: FlowRepresentable>(_ type: FR.Type, presentationType: LaunchStyle.PresentationType = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
@available(*, deprecated, renamed: "thenProceed(with:launchStyle:flowPersistence:﹚") public func thenPresent<FR: FlowRepresentable>(_ type: FR.Type, presentationType: LaunchStyle.PresentationType = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Called when the workflow should be terminated, and the app should return to the point before the workflow was launched.
Important
In order to dismiss UIKit views the workflow must have anOrchestrationResponder
that is aUIKitPresenter
.Declaration
Swift
public func abandon(animated: Bool = true, onFinish: (() -> Void)? = nil)
Parameters
animated
a boolean indicating whether abandoning the workflow should be animated.
onFinish
a callback after the workflow has been abandoned.
-
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default)
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping (F.WorkflowInput) -> FlowPersistence)
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable
and returning aFlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping () -> FlowPersistence) where F.WorkflowInput == Never
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist. -
Creates a
Workflow
with aFlowRepresentable
.Declaration
Swift
public convenience init(_ type: F.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping (F.WorkflowInput) -> FlowPersistence) where F.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the first
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where F.WorkflowOutput == FR.WorkflowInput
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR> where F.WorkflowOutput == FR.WorkflowInput
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item.
-
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping () -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item.
-
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR>
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR>
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping () -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item.
-
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
@available(*, deprecated, renamed: "thenProceed(with:launchStyle:flowPersistence:﹚") public func thenPresent<FR: FlowRepresentable>(_ type: FR.Type, presentationType: LaunchStyle.PresentationType = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
@available(*, deprecated, renamed: "thenProceed(with:launchStyle:flowPersistence:﹚") public func thenPresent<FR: FlowRepresentable>(_ type: FR.Type, presentationType: LaunchStyle.PresentationType = .default, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.presentationType
the
LaunchStyle.PresentationType
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping () -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item.
-
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR>
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR>
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping (FR.WorkflowInput) -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == AnyWorkflow.PassedArgs
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure taking in the generic type from the
FlowRepresentable.WorkflowInput
and returning aFlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping @autoclosure () -> FlowPersistence = .default) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item. -
Adds an item to the workflow; enforces the
FlowRepresentable.WorkflowOutput
of the previous item matches theFlowRepresentable.WorkflowInput
of this item.Declaration
Swift
public func thenProceed<FR: FlowRepresentable>(with type: FR.Type, launchStyle: LaunchStyle.PresentationType, flowPersistence: @escaping () -> FlowPersistence) -> Workflow<FR> where FR.WorkflowInput == Never
Parameters
type
a reference to the next
FlowRepresentable
‘s concrete type in the workflow.launchStyle
the
LaunchStyle
theFlowRepresentable
should use while it’s part of this workflow.flowPersistence
a closure returning a
FlowPersistence
representing how this item in the workflow should persist.Return Value
a new workflow with the additional
FlowRepresentable
item.