flow_node

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: LGPL-2.1 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllSequenceFlows

func AllSequenceFlows(
	sequenceFlows *[]sequence_flow.SequenceFlow,
	exclusion ...func(*sequence_flow.SequenceFlow) bool,
) (result []*sequence_flow.SequenceFlow)

Types

type ActionTransformer

type ActionTransformer func(sequenceFlowId *schema.IdRef, action IAction) IAction

type CancellationTrace

type CancellationTrace struct {
	Node schema.FlowNodeInterface
}

func (CancellationTrace) TraceInterface

func (t CancellationTrace) TraceInterface()

type CompleteAction

type CompleteAction struct{}

type ErrHandleMode added in v0.2.7

type ErrHandleMode int
const (
	HandleRetry ErrHandleMode = iota + 1
	HandleSkip
	HandleExit
)

type ErrHandler added in v0.2.7

type ErrHandler struct {
	Mode    ErrHandleMode
	Retries int32
}

type FlowAction

type FlowAction struct {
	Response *FlowActionResponse

	SequenceFlows []*sequence_flow.SequenceFlow
	// Index of sequence flows that should flow without
	// conditionExpression being evaluated
	UnconditionalFlows []int
	// The actions produced by the targets should be processed by
	// this function
	ActionTransformer ActionTransformer
	// If supplied channel sends a function that returns true, the flow action
	// is to be terminated if it wasn't already
	Terminate Terminate
}

type FlowActionResponse

type FlowActionResponse struct {
	DataObjects map[string]data.IItem
	Variables   map[string]data.IItem
	Err         error
	Handler     <-chan ErrHandler
}

type FlowNodeMapping

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

func NewLockedFlowNodeMapping

func NewLockedFlowNodeMapping() *FlowNodeMapping

func (*FlowNodeMapping) Finalize

func (mapping *FlowNodeMapping) Finalize()

func (*FlowNodeMapping) RegisterElementToFlowNode

func (mapping *FlowNodeMapping) RegisterElementToFlowNode(element schema.FlowNodeInterface,
	flowNode IFlowNode) (err error)

func (*FlowNodeMapping) ResolveElementToFlowNode

func (mapping *FlowNodeMapping) ResolveElementToFlowNode(
	element schema.FlowNodeInterface,
) (flowNode IFlowNode, found bool)

type IAction

type IAction interface {
	// contains filtered or unexported methods
}

type IFlowNode

type IFlowNode interface {
	IOutgoing
	Element() schema.FlowNodeInterface
}

type IOutgoing

type IOutgoing interface {
	NextAction(flow flow_interface.T) chan IAction
}

type NewFlowNodeTrace

type NewFlowNodeTrace struct {
	Node schema.FlowNodeInterface
}

func (NewFlowNodeTrace) TraceInterface

func (t NewFlowNodeTrace) TraceInterface()

type NoAction

type NoAction struct{}

type ProbeAction

type ProbeAction struct {
	SequenceFlows []*sequence_flow.SequenceFlow
	// ProbeReport is a function that needs to be called
	// wth sequence flow indices that have successful
	// condition expressions (or none)
	ProbeReport func([]int)
}

type Terminate

type Terminate func(sequenceFlowId *schema.IdRef) chan bool

type Wiring

type Wiring struct {
	ProcessInstanceId              id.Id
	FlowNodeId                     schema.Id
	Definitions                    *schema.Definitions
	Incoming                       []sequence_flow.SequenceFlow
	Outgoing                       []sequence_flow.SequenceFlow
	EventIngress                   event.IConsumer
	EventEgress                    event.ISource
	Tracer                         tracing.ITracer
	Process                        schema.Element
	FlowNodeMapping                *FlowNodeMapping
	FlowWaitGroup                  *sync.WaitGroup
	EventDefinitionInstanceBuilder event.IDefinitionInstanceBuilder
	Locator                        data.IFlowDataLocator
}

Wiring holds all necessary "wiring" for functioning of flow nodes: definitions, process, sequence flow, event management, tracer, flow node mapping and a flow wait group

func NewWiring

func NewWiring(
	processInstanceId id.Id,
	process schema.Element,
	definitions *schema.Definitions,
	flowNode *schema.FlowNode,
	eventIngress event.IConsumer,
	eventEgress event.ISource,
	tracer tracing.ITracer,
	flowNodeMapping *FlowNodeMapping,
	flowWaitGroup *sync.WaitGroup,
	eventDefinitionInstanceBuilder event.IDefinitionInstanceBuilder,
	locator data.IFlowDataLocator,
) (node *Wiring, err error)

func (*Wiring) CloneFor

func (wiring *Wiring) CloneFor(flowNode *schema.FlowNode) (result *Wiring, err error)

CloneFor copies receiver, overriding FlowNodeId, Incoming, Outgoing for a given flowNode

Jump to

Keyboard shortcuts

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