flow

package
v0.0.0-...-7240e86 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWorkflowNotExists = errors.New("workflow not exists")

ErrWorkflowNotExists is returned when workflow not exists

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine() *Engine

func (*Engine) Start

func (e *Engine) Start(ctx context.Context, param *WorkflowParam) (string, error)

Start start workflow

func (*Engine) Transition

func (e *Engine) Transition(ctx context.Context, param *WorkflowParam) error

Transition transition next workflow task

func (*Engine) Validate

func (e *Engine) Validate(ctx context.Context, instanceID string) error

Validate 验证流程执行合法性

type WorkflowEventCatalog

type WorkflowEventCatalog struct {
	OperationID string `json:"operation_id"`
	Topic       string `json:"topic"`
	Schema      string `json:"schema"`
}

type WorkflowParam

type WorkflowParam struct {
	ID             string `json:"id"`
	InstanceID     string `json:"instance_id"`
	TaskInstanceID string `json:"task_instance_id"`
	Input          string `json:"input"`
}

WorkflowParam workflow runtime param

Jump to

Keyboard shortcuts

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