activity

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTaskDataOutput added in v0.2.0

func ApplyTaskDataOutput(element schema.BaseElementInterface, dataOutputs map[string]any) map[string]data.IItem

func FetchTaskDataInput added in v0.2.0

func FetchTaskDataInput(locator data.IFlowDataLocator, element schema.BaseElementInterface) (headers, properties, dataObjects map[string]any)

Types

type ActiveBoundaryTrace

type ActiveBoundaryTrace struct {
	Start bool
	Node  schema.FlowNodeInterface
}

func (ActiveBoundaryTrace) TraceInterface

func (b ActiveBoundaryTrace) TraceInterface()

type Activity

type Activity interface {
	flow_node.IFlowNode
	Type() Type
	// Cancel initiates a cancellation of activity and returns a channel
	// that will signal a boolean (`true` if cancellation was successful,
	// `false` otherwise)
	Cancel() <-chan bool
}

Activity is a generic interface to flow nodes that are activities

type Constructor

type Constructor = func(*flow_node.Wiring) (node Activity, err error)

type DoOption added in v0.7.4

type DoOption func(*DoResponse)

func WithErr added in v0.7.4

func WithErr(err error) DoOption

func WithErrHandle added in v0.7.4

func WithErrHandle(err error, ch <-chan flow_node.ErrHandler) DoOption

func WithObjects added in v0.7.4

func WithObjects(dataObjects map[string]any) DoOption

func WithProperties added in v0.7.4

func WithProperties(properties map[string]any) DoOption

func WithValue added in v0.7.4

func WithValue(key, value any) DoOption

type DoResponse added in v0.7.4

type DoResponse struct {
	Context     context.Context
	DataObjects map[string]any
	Properties  map[string]any
	Err         error
	HandlerCh   <-chan flow_node.ErrHandler
}

type Harness

type Harness struct {
	*flow_node.Wiring
	// contains filtered or unexported fields
}

func NewHarness

func NewHarness(ctx context.Context,
	wiring *flow_node.Wiring,
	element *schema.FlowNode,
	idGenerator id.IGenerator,
	constructor Constructor,
) (node *Harness, err error)

func (*Harness) Activity

func (node *Harness) Activity() Activity

func (*Harness) ConsumeEvent

func (node *Harness) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)

func (*Harness) Element

func (node *Harness) Element() schema.FlowNodeInterface

func (*Harness) NextAction

func (node *Harness) NextAction(flow flow_interface.T) chan flow_node.IAction

func (*Harness) RegisterEventConsumer

func (node *Harness) RegisterEventConsumer(consumer event.IConsumer) (err error)

type Trace added in v0.7.4

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

Trace describes common channel handler for all tasks

func (*Trace) Context added in v0.7.4

func (t *Trace) Context() context.Context

func (*Trace) Do added in v0.7.4

func (t *Trace) Do(options ...DoOption)

func (*Trace) GetActivity added in v0.7.4

func (t *Trace) GetActivity() Activity

func (*Trace) GetDataObjects added in v0.7.4

func (t *Trace) GetDataObjects() map[string]any

func (*Trace) GetHeaders added in v0.7.4

func (t *Trace) GetHeaders() map[string]any

func (*Trace) GetProperties added in v0.7.4

func (t *Trace) GetProperties() map[string]any

func (*Trace) TraceInterface added in v0.7.4

func (t *Trace) TraceInterface()

type TraceBuilder added in v0.7.4

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

func NewTraceBuilder added in v0.7.4

func NewTraceBuilder() *TraceBuilder

func (*TraceBuilder) Activity added in v0.7.4

func (b *TraceBuilder) Activity(activity Activity) *TraceBuilder

func (*TraceBuilder) Build added in v0.7.4

func (b *TraceBuilder) Build() *Trace

func (*TraceBuilder) Context added in v0.7.4

func (b *TraceBuilder) Context(ctx context.Context) *TraceBuilder

func (*TraceBuilder) DataObjects added in v0.7.4

func (b *TraceBuilder) DataObjects(dataObjects map[string]any) *TraceBuilder

func (*TraceBuilder) Headers added in v0.7.4

func (b *TraceBuilder) Headers(headers map[string]any) *TraceBuilder

func (*TraceBuilder) Properties added in v0.7.4

func (b *TraceBuilder) Properties(properties map[string]any) *TraceBuilder

func (*TraceBuilder) Response added in v0.7.4

func (b *TraceBuilder) Response(ch chan DoResponse) *TraceBuilder

func (*TraceBuilder) Value added in v0.7.4

func (b *TraceBuilder) Value(key, value any) *TraceBuilder

type Type added in v0.7.4

type Type string
const (
	TaskType         Type = "Task"
	ServiceType      Type = "ServiceTask"
	ScriptType       Type = "ScriptTask"
	UserType         Type = "UserTask"
	CallType         Type = "CallActivity"
	BusinessRuleType Type = "BusinessRuleTask"
	SendType         Type = "SendTask"
	ReceiveType      Type = "ReceiveTask"
	SubprocessType   Type = "Subprocess"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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