CLASS
WorkflowHost¶
public final class WorkflowHost<WorkflowType: Workflow>
Manages an active workflow hierarchy.
Properties¶
rendering¶
public let rendering: Property<WorkflowType.Rendering>
Represents the Rendering produced by the root workflow in the hierarchy. New Rendering values are produced
as state transitions occur within the hierarchy.
output¶
public var output: Signal<WorkflowType.Output, Never>
A signal containing output events emitted by the root workflow in the hierarchy.
Methods¶
init(workflow:observers:debugger:)¶
public init(
workflow: WorkflowType,
observers: [WorkflowObserver] = [],
debugger: WorkflowDebugger? = nil
)
Initializes a new host with the given workflow at the root.
- Parameter workflow: The root workflow in the hierarchy
- Parameter observers: An optional array of
WorkflowObserversthat will allow runtime introspection for thisWorkflowHost - Parameter debugger: An optional debugger. If provided, the host will notify the debugger of updates to the workflow hierarchy as state transitions occur.
Parameters¶
| Name | Description |
|---|---|
| workflow | The root workflow in the hierarchy |
| observers | An optional array of WorkflowObservers that will allow runtime introspection for this WorkflowHost |
| debugger | An optional debugger. If provided, the host will notify the debugger of updates to the workflow hierarchy as state transitions occur. |
update(workflow:)¶
public func update(workflow: WorkflowType)
Update the input for the workflow. Will cause a render pass.