executeworkflowstepgroup

package
v0.19.907 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DirectiveContinue      = "continue"
	DirectiveStop          = "stop"
	DirectiveRetry         = "retry"
	DirectiveRetryGroup    = "retry-group"
	DirectiveSkipGroup     = "skip-group"
	DirectiveAwaitApproval = "await-approval"
)

Directive constants — duplicated to avoid import cycle with the flow package.

View Source
const SignalType signal.SignalType = "execute-workflow-step-group"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveStepRequest

type ApproveStepRequest struct {
	StepID             string `json:"step_id"`
	ApprovalResponseID string `json:"approval_response_id"`
	ResponseType       string `json:"response_type"`
}

ApproveStepRequest is the input for the "approve-step" group update handler.

type ApproveStepResponse

type ApproveStepResponse struct{}

ApproveStepResponse is the response from the "approve-step" group update handler.

type CancelStepRequest

type CancelStepRequest struct {
	StepID string `json:"step_id"`
}

CancelStepRequest is the input for the "cancel-step" group update handler.

type CancelStepResponse

type CancelStepResponse struct{}

CancelStepResponse is the response from the "cancel-step" group update handler.

type RetryStepRequest

type RetryStepRequest struct {
	StepID string `json:"step_id"`
}

RetryStepRequest is the input for the "retry-step" group update handler.

type RetryStepResponse

type RetryStepResponse struct {
	Retryable bool   `json:"retryable"`
	Directive string `json:"directive"`
}

RetryStepResponse is the response from the "retry-step" group update handler.

type Signal

type Signal struct {
	WorkflowID      string `json:"workflow_id"`
	StepGroupID     string `json:"step_group_id"`
	GroupIdx        int    `json:"group_idx"`
	OwnerID         string `json:"owner_id"`
	OwnerType       string `json:"owner_type"`
	QueueName       string `json:"queue_name"`
	TargetQueueName string `json:"target_queue_name"`
	Parallel        bool   `json:"parallel"`
	// contains filtered or unexported fields
}

Signal encapsulates the lifecycle of executing all steps within a single workflow step group (GroupIdx). It orchestrates sequential or parallel step dispatch and communicates the group outcome back to the flow signal via the workflow's ResultDirective field.

func (*Signal) Cancel

func (s *Signal) Cancel(ctx workflow.Context) error

Cancel propagates cancellation to all in-flight step signals.

func (*Signal) Execute

func (s *Signal) Execute(ctx workflow.Context) error

Execute runs all steps in this group, either sequentially or in parallel.

func (*Signal) RegisterUpdateHandlers

func (s *Signal) RegisterUpdateHandlers(ctx workflow.Context) error

RegisterUpdateHandlers registers group-level update handlers.

func (*Signal) SleepAfter

func (s *Signal) SleepAfter() time.Duration

func (*Signal) Type

func (s *Signal) Type() signal.SignalType

func (*Signal) Validate

func (s *Signal) Validate(ctx workflow.Context) error

type SkipStepRequest

type SkipStepRequest struct {
	StepID string `json:"step_id"`
}

SkipStepRequest is the input for the "skip-step" group update handler.

type SkipStepResponse

type SkipStepResponse struct {
	Skippable bool `json:"skippable"`
}

SkipStepResponse is the response from the "skip-step" group update handler.

type StepResult

type StepResult struct {
	// Directive is the step's ResultDirective after execution. Empty or
	// "continue" means the caller should proceed to the next step.
	Directive string

	// Error is set when the step failed and was NOT handled by auto-retry or
	// user action. The caller should propagate this as a group error.
	Error error
}

StepResult describes the outcome of executing a single step.

Jump to

Keyboard shortcuts

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