Maps a Temporal Core WorkflowActivation to the Elixir workflow
module that should evaluate it.
Two-tier lookup, in order:
Structural resolution from the activation's
initialize_workflowjob. Every fresh start, and every replay-from-history delivery to a worker that doesn't yet have the workflow cached, includes anInitializeWorkflowjob whoseworkflow_typefield is the module's stringified atom (e.g."Elixir.Hourglass.Workflows.IngestSource"). We recover the module atom viaString.to_existing_atom/1and verify it is a loaded Hourglass workflow by checking for the__workflow_input_type__/0marker injected byuse Hourglass.Workflow. No registration or module list is required — the type name IS the module.From the cached
Workflow.State. Subsequent incremental activations (e.g. just aresolve_activityjob) don't repeat the workflow type. By the time we receive one, the prior activation has already populatedstate.workflow_moduleviaHourglass.Workflow.Evaluator.evaluate/3. We look upWorkflowStateCache.fetch(task_queue, run_id)and return the stored module.
Both tiers fall through if exhausted; the function raises a clear error rather than guessing.
Summary
Functions
Resolve the workflow module for an activation.
Functions
Resolve the workflow module for an activation.
See moduledoc for lookup order. Raises with a descriptive message
when neither tier yields a module — that case indicates either an
unknown/unloaded workflow type or a Core/cache invariant violation
(e.g. an incremental activation arriving before any
initialize_workflow ever populated the state cache).