builder

package
v3.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInitExecutionOperations

func BuildInitExecutionOperations(kv *api.KV, deploymentID, taskID, workflowName string, registerWorkflow bool) (api.KVTxnOps, error)

BuildInitExecutionOperations returns Consul transactional KV operations for initiating workflow execution

func BuildWorkFlow

func BuildWorkFlow(kv *api.KV, deploymentID, wfName string) (map[string]*Step, error)

BuildWorkFlow creates a workflow tree from values for a specified workflow name and deploymentID

Types

type Activity

type Activity interface {
	// Type returns the ActivityType if this activity
	Type() ActivityType

	// Value returns the actual value of this activity
	//
	// For delegate activities it's the delegate operation name.
	// For set-state activities it's the state value.
	// For call-operation activities it's the operation name.
	// For inline activities it's the inlined workflow name.
	Value() string
}

An Activity is the representation of a workflow activity

type ActivityType

type ActivityType int

ActivityType x ENUM( delegate set-state call-operation inline )

const (
	// ActivityTypeDelegate is a ActivityType of type Delegate
	ActivityTypeDelegate ActivityType = iota
	// ActivityTypeSetState is a ActivityType of type Set-State
	ActivityTypeSetState
	// ActivityTypeCallOperation is a ActivityType of type Call-Operation
	ActivityTypeCallOperation
	// ActivityTypeInline is a ActivityType of type Inline
	ActivityTypeInline
)

func ParseActivityType

func ParseActivityType(name string) (ActivityType, error)

ParseActivityType attempts to convert a string to a ActivityType

func (ActivityType) String

func (i ActivityType) String() string

type Step

type Step struct {
	Name               string
	Target             string
	TargetRelationship string
	OperationHost      string
	Activities         []Activity
	Next               []*Step
	OnFailure          []*Step
	OnCancel           []*Step
	Previous           []*Step
	WorkflowName       string
	Async              bool
	IsOnFailurePath    bool
	IsOnCancelPath     bool
}

Step represents the workflow step

func (*Step) IsInitial

func (s *Step) IsInitial() bool

IsInitial returns true is the workflow step has no previous step

func (*Step) IsTerminal

func (s *Step) IsTerminal() bool

IsTerminal returns true is the workflow step has no next step

Jump to

Keyboard shortcuts

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