MCPcopy Index your code
hub / github.com/Effect-TS/effect / makeWorkflowEntity

Function makeWorkflowEntity

packages/cluster/src/ClusterWorkflowEngine.ts:610–632  ·  view source on GitHub ↗
(workflow: Workflow.Any)

Source from the content-addressed store, hash-verified

608const payloadParentKey = "~@effect/workflow/parent" as const
609
610const makeWorkflowEntity = (workflow: Workflow.Any) =>
611 Entity.make(`Workflow/${workflow.name}`, [
612 Rpc.make("run", {
613 payload: {
614 ...workflow.payloadSchema.fields,
615 [payloadParentKey]: Schema.optional(Schema.Struct({
616 workflowName: Schema.String,
617 executionId: Schema.String
618 }))
619 },
620 primaryKey: () => "",
621 success: Workflow.Result({
622 success: workflow.successSchema,
623 error: workflow.errorSchema
624 })
625 })
626 .annotate(ClusterSchema.Persisted, true)
627 .annotate(ClusterSchema.Uninterruptible, true),
628
629 DeferredRpc,
630 ResumeRpc,
631 ActivityRpc
632 ]).annotateContext(workflow.annotations)
633
634const ExitUnknown = Schema.Exit({
635 success: Schema.Unknown,

Callers 1

ensureEntityFunction · 0.85

Calls 3

annotateContextMethod · 0.65
makeMethod · 0.65
annotateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…