FlowRepresentableMetadata
open class FlowRepresentableMetadata
Data about a FlowRepresentable
.
Discussion
Every time a Workflow
is created, the defining characteristics about a FlowRepresentable
are stored in the FlowRepresentableMetadata
to be used later.
-
Preferred
LaunchStyle
of the associatedFlowRepresentable
.Declaration
Swift
public private(set) var launchStyle: LaunchStyle { get }
-
Preferred
FlowPersistence
of the associatedFlowRepresentable
; set whenFlowRepresentableMetadata
instantiates an instance.Declaration
Swift
public private(set) var persistence: FlowPersistence? { get }
-
Creates an instance that holds onto metadata associated with the
FlowRepresentable
.Declaration
Swift
public convenience init<FR: FlowRepresentable>(_ flowRepresentableType: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (AnyWorkflow.PassedArgs) -> FlowPersistence)
Parameters
flowRepresentableType
specific type of the associated
FlowRepresentable
.launchStyle
the style to use when launching the
FlowRepresentable
.flowPersistence
a closure passing arguments to the caller and returning the preferred
FlowPersistence
. -
Creates an instance that holds onto metadata associated with the
FlowRepresentable
.Declaration
Swift
public init<FR: FlowRepresentable>(_ flowRepresentableType: FR.Type, launchStyle: LaunchStyle = .default, flowPersistence: @escaping (AnyWorkflow.PassedArgs) -> FlowPersistence, flowRepresentableFactory: @escaping (AnyWorkflow.PassedArgs) -> AnyFlowRepresentable)
Parameters
flowRepresentableType
specific type of the associated
FlowRepresentable
.launchStyle
the style to use when launching the
FlowRepresentable
.flowPersistence
a closure passing arguments to the caller and returning the preferred
FlowPersistence
.flowRepresentableFactory
a closure used to generate an
AnyFlowRepresentable
from theFlowRepresentable
type.