flow

package
v0.0.2-beta Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(wf *model.Workflow, container *container.DIContiner) error

Types

type Flow

type Flow struct {
	Id             string
	RootAction     int
	Actions        map[int]action.Action
	FailureHandler cluster.Statehandler
	SuccessHandler cluster.Statehandler
}

func Convert

func Convert(wf *model.Workflow, id string, container *container.DIContiner) *Flow

type FlowMachine

type FlowMachine struct {
	WorkflowName string
	FlowId       string

	CurrentAction action.Action
	// contains filtered or unexported fields
}

func GetFlowStateMachine

func GetFlowStateMachine(wfName string, flowId string, container *container.DIContiner) (*FlowMachine, error)

func NewFlowStateMachine

func NewFlowStateMachine(container *container.DIContiner) *FlowMachine

func (*FlowMachine) Execute

func (f *FlowMachine) Execute(tryCount int, actionId int) error

func (*FlowMachine) GetFlowState

func (f *FlowMachine) GetFlowState() model.FlowState

func (*FlowMachine) Init

func (f *FlowMachine) Init(wfName string, input map[string]any) error

func (*FlowMachine) MarkComplete

func (f *FlowMachine) MarkComplete()

func (*FlowMachine) MarkFailed

func (f *FlowMachine) MarkFailed()

func (*FlowMachine) MarkPaused

func (f *FlowMachine) MarkPaused()

func (*FlowMachine) MarkRunning

func (f *FlowMachine) MarkRunning()

func (*FlowMachine) MarkWaitingDelay

func (f *FlowMachine) MarkWaitingDelay()

func (*FlowMachine) MarkWaitingEvent

func (f *FlowMachine) MarkWaitingEvent()

func (*FlowMachine) MoveForward

func (f *FlowMachine) MoveForward(event string, dataMap map[string]any) (bool, error)

func (*FlowMachine) ValidateExecutionRequest

func (f *FlowMachine) ValidateExecutionRequest(actionId int) error

Jump to

Keyboard shortcuts

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