startworkflow

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeforeCreateHookFunc added in v1.24.0

type BeforeCreateHookFunc func(lease api.WorkflowLease) error

type StartOutcome added in v1.26.2

type StartOutcome int
const (
	StartErr StartOutcome = iota
	StartNew
	StartReused
	StartDeduped
)

func (StartOutcome) String added in v1.26.2

func (s StartOutcome) String() string

type Starter added in v1.20.0

type Starter struct {
	// contains filtered or unexported fields
}

Starter starts a new workflow execution.

func NewStarter added in v1.20.0

func NewStarter(
	shardContext shard.Context,
	workflowConsistencyChecker api.WorkflowConsistencyChecker,
	tokenSerializer common.TaskTokenSerializer,
	visibilityManager manager.VisibilityManager,
	request *historyservice.StartWorkflowExecutionRequest,
	createLeaseFn api.CreateOrUpdateLeaseFunc,
) (*Starter, error)

NewStarter creates a new starter, fails if getting the active namespace fails.

func (*Starter) Invoke added in v1.20.0

func (s *Starter) Invoke(
	ctx context.Context,
) (resp *historyservice.StartWorkflowExecutionResponse, startOutcome StartOutcome, retError error)

Invoke starts a new workflow execution. NOTE: `beforeCreateHook` might be invoked more than once in the case where the workflow policy requires terminating the running workflow first; it is then invoked again on the newly started workflow.

Jump to

Keyboard shortcuts

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