StemModule class

Generated or hand-authored bundle of tasks and workflow definitions.

The intended use is to pass one module into bootstrap helpers rather than threading separate task, flow, and script lists through every call site.

Constructors

StemModule({Iterable<WorkflowDefinition<Object?>> workflows = const [], Iterable<Flow<Object?>> flows = const [], Iterable<WorkflowScript<Object?>> scripts = const [], Iterable<TaskHandler<Object?>> tasks = const [], Iterable<WorkflowManifestEntry>? workflowManifest})
Creates a bundled module of tasks and workflows.
StemModule.merge(Iterable<StemModule> modules)
Merges modules into one bundled module.
factory

Properties

flows List<Flow<Object?>>
Flow workflows in this module.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scripts List<WorkflowScript<Object?>>
Script workflows in this module.
final
tasks List<TaskHandler<Object?>>
Task handlers in this module.
final
workflowDefinitions Iterable<WorkflowDefinition<Object?>>
All workflow definitions contained in the module.
no setter
workflowManifest List<WorkflowManifestEntry>
Workflow manifest entries exported by this module.
final
workflows List<WorkflowDefinition<Object?>>
Raw workflow definitions that are not represented as Flow or WorkflowScript instances.
final

Methods

inferredTaskQueues({Iterable<TaskHandler<Object?>> additionalTasks = const []}) List<String>
Returns the default queues implied by the bundled task handlers only.
inferredWorkerQueues({String workflowQueue = 'workflow', String? continuationQueue, String? executionQueue, Iterable<TaskHandler<Object?>> additionalTasks = const []}) List<String>
Returns the default queues implied by the bundled task handlers.
inferTaskWorkerSubscription({String defaultQueue = 'default', Iterable<TaskHandler<Object?>> additionalTasks = const []}) RoutingSubscription?
Infers a worker subscription from bundled task handlers only.
inferWorkerSubscription({String workflowQueue = 'workflow', String? continuationQueue, String? executionQueue, Iterable<TaskHandler<Object?>> additionalTasks = const []}) RoutingSubscription?
Infers a worker subscription from the bundled task handlers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerInto({WorkflowRegistry? workflows, TaskRegistry? tasks}) → void
Registers bundled definitions into the supplied registries.
requiredTaskQueues({Iterable<TaskHandler<Object?>> additionalTasks = const []}) List<String>
Returns the queues required by bundled task handlers only.
requiredTaskSubscription({Iterable<TaskHandler<Object?>> additionalTasks = const []}) RoutingSubscription
Returns the explicit subscription required for task-only workers.
requiredWorkflowQueues({String workflowQueue = 'workflow', String? continuationQueue, String? executionQueue, Iterable<TaskHandler<Object?>> additionalTasks = const []}) List<String>
Returns the queues required to run workflow orchestration plus bundled tasks.
requiredWorkflowSubscription({String workflowQueue = 'workflow', String? continuationQueue, String? executionQueue, Iterable<TaskHandler<Object?>> additionalTasks = const []}) RoutingSubscription
Returns the explicit subscription required for workflow-capable workers.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

combine({StemModule? module, Iterable<StemModule> modules = const []}) StemModule?
Combines an optional singular module and plural modules input.