workflow

package
v1.30.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"chasm.lib.workflow",
	fx.Provide(NewLibrary),
	fx.Invoke(func(registry *chasm.Registry, library *Library) error {
		return registry.Register(library)
	}),
)

Functions

This section is empty.

Types

type Library added in v1.30.0

type Library struct {
	chasm.UnimplementedLibrary
}

func NewLibrary added in v1.30.0

func NewLibrary() *Library

func (*Library) Components added in v1.30.0

func (l *Library) Components() []*chasm.RegistrableComponent

func (*Library) Name added in v1.30.0

func (l *Library) Name() string

type Workflow added in v1.30.0

type Workflow struct {
	chasm.UnimplementedComponent

	// For now, workflow state is managed by mutable_state_impl, not CHASM engine, leaving it empty as CHASM expects a
	// state object.
	*emptypb.Empty

	// MSPointer is a special in-memory field for accessing the underlying mutable state.
	chasm.MSPointer

	// Callbacks map is used to store the callbacks for the workflow.
	Callbacks chasm.Map[string, *callback.Callback]
}

func NewWorkflow added in v1.30.0

func NewWorkflow(
	_ chasm.MutableContext,
	msPointer chasm.MSPointer,
) *Workflow

func (*Workflow) AddCompletionCallbacks added in v1.30.0

func (w *Workflow) AddCompletionCallbacks(
	ctx chasm.MutableContext,
	eventTime *timestamppb.Timestamp,
	requestID string,
	completionCallbacks []*commonpb.Callback,
	maxCallbacksPerWorkflow int,
) error

AddCompletionCallbacks creates completion callbacks using the CHASM implementation. maxCallbacksPerWorkflow is the configured maximum number of callbacks allowed per workflow.

func (*Workflow) GetNexusCompletion added in v1.30.0

func (w *Workflow) GetNexusCompletion(
	ctx chasm.Context,
	requestID string,
) (nexusrpc.OperationCompletion, error)

func (*Workflow) LifecycleState added in v1.30.0

func (w *Workflow) LifecycleState(
	_ chasm.Context,
) chasm.LifecycleState

func (*Workflow) ProcessCloseCallbacks added in v1.30.0

func (w *Workflow) ProcessCloseCallbacks(ctx chasm.MutableContext) error

ProcessCloseCallbacks triggers "WorkflowClosed" callbacks using the CHASM implementation. It iterates through all callbacks and schedules WorkflowClosed ones that are in STANDBY state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL