-
An empty
AnyWorkflow
. Mostly used as a base for dynamically building a workflow.Declaration
Swift
public static var empty: AnyWorkflow { get }
-
The
OrchestrationResponder
of the wrappedWorkflow
.Declaration
Swift
public internal(set) var orchestrationResponder: OrchestrationResponder? { get set }
-
The count of the wrapped
Workflow
.Declaration
Swift
public var count: Int { get }
-
The first
LinkedList.Node
of the wrappedWorkflow
.Declaration
Swift
public var first: Element? { get }
-
The last
LinkedList.Node
of the wrappedWorkflow
.Declaration
Swift
public var last: Element? { get }
-
Creates a type erased
Workflow
.Declaration
Swift
public init<F>(_ workflow: Workflow<F>) where F : FlowRepresentable
-
Appends
FlowRepresentableMetadata
to theWorkflow
.Declaration
Swift
public func append(_ metadata: FlowRepresentableMetadata)
-
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) -> AnyWorkflow.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.
-
Latest supported schema version
Declaration
Swift
public static var jsonSchemaVersion: JSONSchemaVersion
-
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.
-
Called when the workflow should be terminated, and the app should return to the point before the workflow was launched.
Declaration
Swift
public func abandon()