Documentation
¶
Index ¶
- Variables
- type Library
- type Workflow
- func (w *Workflow) AddCompletionCallbacks(ctx chasm.MutableContext, eventTime *timestamppb.Timestamp, requestID string, ...) error
- func (w *Workflow) GetNexusCompletion(ctx chasm.Context, requestID string) (nexusrpc.CompleteOperationOptions, error)
- func (w *Workflow) LifecycleState(_ chasm.Context) chasm.LifecycleState
- func (w *Workflow) ProcessCloseCallbacks(ctx chasm.MutableContext) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Library ¶
type Library struct {
chasm.UnimplementedLibrary
}
func NewLibrary ¶
func NewLibrary() *Library
func (*Library) Components ¶
func (l *Library) Components() []*chasm.RegistrableComponent
type Workflow ¶
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 ¶
func NewWorkflow( _ chasm.MutableContext, msPointer chasm.MSPointer, ) *Workflow
func (*Workflow) AddCompletionCallbacks ¶
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 ¶
func (*Workflow) LifecycleState ¶
func (w *Workflow) LifecycleState( _ chasm.Context, ) chasm.LifecycleState
func (*Workflow) ProcessCloseCallbacks ¶
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.
Click to show internal directories.
Click to hide internal directories.