OrchestrationResponder
public protocol OrchestrationResponder
A type capable of responding to Workflow
actions.
-
Respond to the
Workflow
launching.Declaration
Swift
func launch(to: AnyWorkflow.Element)
Parameters
to
Passes the
AnyWorkflow.Element
andFlowRepresentableMetadata
so the responder can decide how to launch the first loaded instance. -
Respond to the
Workflow
proceeding.Declaration
Swift
func proceed(to: AnyWorkflow.Element, from: AnyWorkflow.Element)
Parameters
to
Passes the
AnyWorkflow.Element
andFlowRepresentableMetadata
so the responder can decide how to proceed.from
Passes the
AnyWorkflow.Element
andFlowRepresentableMetadata
so the responder has context on where to proceed from. -
Respond to the
Workflow
backing up.Declaration
Swift
func backUp(from: AnyWorkflow.Element, to: AnyWorkflow.Element)
Parameters
to
Passes the
AnyWorkflow.Element
andFlowRepresentableMetadata
so the responder can decide how to back up.from
Passes the
AnyWorkflow.Element
andFlowRepresentableMetadata
so the responder has context on where to back up from. -
Respond to the
Workflow
getting abandoned.Declaration
Swift
func abandon(_ workflow: AnyWorkflow, onFinish: (() -> Void)?)
Parameters
workflow
The
AnyWorkflow
that is being abandoned.onFinish
A closure that is executed when the responder is finished abandoning.
-
Respond to the
Workflow
completing.Declaration
Swift
func complete(_ workflow: AnyWorkflow, passedArgs: AnyWorkflow.PassedArgs, onFinish: ((AnyWorkflow.PassedArgs) -> Void)?)
Parameters
workflow
The
AnyWorkflow
that is being completed.passedArgs
The
AnyWorkflow.PassedArgs
to be passed toonFinish
.onFinish
A closure that is executed when the responder is finished completing.