Documentation
¶
Index ¶
- Variables
- func ApplyTaskDataOutput(element schema.BaseElementInterface, dataOutputs map[string]any) map[string]data.IItem
- func ApplyTaskResult(element schema.BaseElementInterface, results map[string]any) map[string]data.IItem
- func DistributeFlows(awaitingActions []chan IAction, sequenceFlows []*SequenceFlow)
- func FetchTaskDataInput(locator data.IFlowDataLocator, element schema.BaseElementInterface) (headers, properties, dataObjects map[string]any)
- func GoV() string
- func Version() string
- type ActionTransformer
- type ActiveBoundaryTrace
- type ActiveListeningTrace
- type Activity
- type BusinessRuleTask
- type BusinessRuleTaskKey
- type CallActivity
- type CallActivityKey
- type CancellationFlowNodeTrace
- type CancellationFlowTrace
- type CatchEvent
- type CeaseFlowTrace
- type CompleteAction
- type CompletionTrace
- type Constructor
- func NewBusinessRuleTask(ctx context.Context, task *schema.BusinessRuleTask) Constructor
- func NewCallActivity(ctx context.Context, task *schema.CallActivity) Constructor
- func NewManualTask(ctx context.Context, task *schema.ManualTask) Constructor
- func NewReceiveTask(ctx context.Context, task *schema.ReceiveTask) Constructor
- func NewScriptTask(ctx context.Context, task *schema.ScriptTask) Constructor
- func NewSendTask(ctx context.Context, task *schema.SendTask) Constructor
- func NewServiceTask(ctx context.Context, task *schema.ServiceTask) Constructor
- func NewSubProcess(ctx context.Context, eventDefinitionBuilder event.IDefinitionInstanceBuilder, ...) Constructor
- func NewTask(ctx context.Context, task *schema.Task) Constructor
- func NewUserTask(ctx context.Context, task *schema.UserTask) Constructor
- type DeterminationMadeTrace
- type DoOption
- type DoResponse
- type EndEvent
- type ErrHandleMode
- type ErrHandler
- type ErrorTrace
- type EventBasedGateway
- type EventObservedTrace
- type ExclusiveGateway
- type ExclusiveNoEffectiveSequenceFlows
- type Flow
- type FlowAction
- type FlowActionResponse
- type FlowNodeMapping
- type FlowTrace
- type Harness
- func (node *Harness) Activity() Activity
- func (node *Harness) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)
- func (node *Harness) Element() schema.FlowNodeInterface
- func (node *Harness) NextAction(flow T) chan IAction
- func (node *Harness) RegisterEventConsumer(consumer event.IConsumer) (err error)
- type IAction
- type IFlowNode
- type IOutgoing
- type InclusiveGateway
- type InclusiveNoEffectiveSequenceFlows
- type IncomingFlowProcessedTrace
- type Instance
- func (ins *Instance) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)
- func (ins *Instance) FlowNodeMapping() *FlowNodeMapping
- func (ins *Instance) Id() id.Id
- func (ins *Instance) Locator() data.IFlowDataLocator
- func (ins *Instance) Process() *schema.Process
- func (ins *Instance) RegisterEventConsumer(ev event.IConsumer) (err error)
- func (ins *Instance) StartAll() (err error)
- func (ins *Instance) StartWith(ctx context.Context, startEvent schema.StartEventInterface) (err error)
- func (ins *Instance) Tracer() tracing.ITracer
- func (ins *Instance) WaitUntilComplete(ctx context.Context) (complete bool)
- type InstanceTrace
- type InstantiationTrace
- type LeaveTrace
- type ManualTask
- type NewFlowNodeTrace
- type NewFlowTrace
- type NoAction
- type Option
- func WithContext(ctx context.Context) Option
- func WithDataObjects(dataObjects map[string]any) Option
- func WithEventDefinitionInstanceBuilder(builder event.IDefinitionInstanceBuilder) Option
- func WithEventEgress(source event.ISource) Option
- func WithEventIngress(consumer event.IConsumer) Option
- func WithIdGenerator(builder id.IGeneratorBuilder) Option
- func WithLocator(locator data.IFlowDataLocator) Option
- func WithTracer(tracer tracing.ITracer) Option
- func WithVariables(variables map[string]any) Option
- type Options
- type ParallelGateway
- type ProbeAction
- type Process
- type ProcessLandMarkTrace
- type ProcessTrace
- type ReceiveTask
- type Retry
- type ScriptTask
- type SendTask
- type SequenceFlow
- type ServiceTask
- type Snapshot
- type StartEvent
- type SubProcess
- func (p *SubProcess) Cancel() <-chan bool
- func (p *SubProcess) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)
- func (p *SubProcess) Element() schema.FlowNodeInterface
- func (p *SubProcess) NextAction(T) chan IAction
- func (p *SubProcess) RegisterEventConsumer(ev event.IConsumer) (err error)
- func (p *SubProcess) Type() Type
- type T
- type Task
- type TaskTrace
- func (t *TaskTrace) Context() context.Context
- func (t *TaskTrace) Do(options ...DoOption)
- func (t *TaskTrace) Element() any
- func (t *TaskTrace) GetActivity() Activity
- func (t *TaskTrace) GetDataObjects() map[string]any
- func (t *TaskTrace) GetHeaders() map[string]any
- func (t *TaskTrace) GetProperties() map[string]any
- type TaskTraceBuilder
- func (b *TaskTraceBuilder) Activity(activity Activity) *TaskTraceBuilder
- func (b *TaskTraceBuilder) Build() *TaskTrace
- func (b *TaskTraceBuilder) Context(ctx context.Context) *TaskTraceBuilder
- func (b *TaskTraceBuilder) DataObjects(dataObjects map[string]any) *TaskTraceBuilder
- func (b *TaskTraceBuilder) Headers(headers map[string]any) *TaskTraceBuilder
- func (b *TaskTraceBuilder) Properties(properties map[string]any) *TaskTraceBuilder
- func (b *TaskTraceBuilder) Timeout(timeout time.Duration) *TaskTraceBuilder
- func (b *TaskTraceBuilder) Value(key, value any) *TaskTraceBuilder
- type Terminate
- type TerminationTrace
- type Type
- type TypeKey
- type UserTask
- type VisitTrace
- type Wiring
Constants ¶
This section is empty.
Variables ¶
var ( DefaultTaskTimeoutKey = "timeout" DefaultTaskExecTimeout = time.Second * 30 )
var ( GitCommit = "" GitTag = "" BuildDate = "" )
Functions ¶
func ApplyTaskDataOutput ¶
func ApplyTaskResult ¶ added in v2.2.0
func DistributeFlows ¶
func DistributeFlows(awaitingActions []chan IAction, sequenceFlows []*SequenceFlow)
func FetchTaskDataInput ¶
func FetchTaskDataInput(locator data.IFlowDataLocator, element schema.BaseElementInterface) (headers, properties, dataObjects map[string]any)
Types ¶
type ActionTransformer ¶
type ActiveBoundaryTrace ¶
type ActiveBoundaryTrace struct {
Start bool
Node schema.FlowNodeInterface
}
func (ActiveBoundaryTrace) Element ¶
func (b ActiveBoundaryTrace) Element() any
type ActiveListeningTrace ¶
type ActiveListeningTrace struct {
Node *schema.CatchEvent
}
func (ActiveListeningTrace) Element ¶
func (t ActiveListeningTrace) Element() any
type Activity ¶
type Activity interface {
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 BusinessRuleTask ¶
type BusinessRuleTask struct {
*Wiring
// contains filtered or unexported fields
}
func (*BusinessRuleTask) Cancel ¶
func (task *BusinessRuleTask) Cancel() <-chan bool
func (*BusinessRuleTask) Element ¶
func (task *BusinessRuleTask) Element() schema.FlowNodeInterface
func (*BusinessRuleTask) NextAction ¶
func (task *BusinessRuleTask) NextAction(T) chan IAction
func (*BusinessRuleTask) Type ¶
func (task *BusinessRuleTask) Type() Type
type BusinessRuleTaskKey ¶
type BusinessRuleTaskKey struct{}
type CallActivity ¶
type CallActivity struct {
*Wiring
// contains filtered or unexported fields
}
func (*CallActivity) Cancel ¶
func (task *CallActivity) Cancel() <-chan bool
func (*CallActivity) Element ¶
func (task *CallActivity) Element() schema.FlowNodeInterface
func (*CallActivity) NextAction ¶
func (task *CallActivity) NextAction(T) chan IAction
func (*CallActivity) Type ¶
func (task *CallActivity) Type() Type
type CallActivityKey ¶
type CallActivityKey struct{}
type CancellationFlowNodeTrace ¶
type CancellationFlowNodeTrace struct {
Node schema.FlowNodeInterface
}
func (CancellationFlowNodeTrace) Element ¶
func (t CancellationFlowNodeTrace) Element() any
type CancellationFlowTrace ¶
func (CancellationFlowTrace) Element ¶
func (t CancellationFlowTrace) Element() any
type CatchEvent ¶
type CatchEvent struct {
*Wiring
// contains filtered or unexported fields
}
func NewCatchEvent ¶
func NewCatchEvent(ctx context.Context, wiring *Wiring, catchEvent *schema.CatchEvent) (evt *CatchEvent, err error)
func (*CatchEvent) ConsumeEvent ¶
func (evt *CatchEvent) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)
func (*CatchEvent) Element ¶
func (evt *CatchEvent) Element() schema.FlowNodeInterface
func (*CatchEvent) NextAction ¶
func (evt *CatchEvent) NextAction(flow T) chan IAction
type CeaseFlowTrace ¶
func (CeaseFlowTrace) Element ¶
func (t CeaseFlowTrace) Element() any
type CompleteAction ¶
type CompleteAction struct{}
type CompletionTrace ¶
type CompletionTrace struct {
Node schema.FlowNodeInterface
}
func (CompletionTrace) Element ¶
func (t CompletionTrace) Element() any
type Constructor ¶
func NewBusinessRuleTask ¶
func NewBusinessRuleTask(ctx context.Context, task *schema.BusinessRuleTask) Constructor
func NewCallActivity ¶
func NewCallActivity(ctx context.Context, task *schema.CallActivity) Constructor
func NewManualTask ¶
func NewManualTask(ctx context.Context, task *schema.ManualTask) Constructor
func NewReceiveTask ¶
func NewReceiveTask(ctx context.Context, task *schema.ReceiveTask) Constructor
func NewScriptTask ¶
func NewScriptTask(ctx context.Context, task *schema.ScriptTask) Constructor
func NewSendTask ¶
func NewSendTask(ctx context.Context, task *schema.SendTask) Constructor
func NewServiceTask ¶
func NewServiceTask(ctx context.Context, task *schema.ServiceTask) Constructor
func NewSubProcess ¶
func NewSubProcess(ctx context.Context, eventDefinitionBuilder event.IDefinitionInstanceBuilder, idGenerator id.IGenerator, tracer tracing.ITracer, subProcess *schema.SubProcess) Constructor
func NewUserTask ¶
func NewUserTask(ctx context.Context, task *schema.UserTask) Constructor
type DeterminationMadeTrace ¶
type DeterminationMadeTrace struct {
Node schema.FlowNodeInterface
}
func (DeterminationMadeTrace) Element ¶
func (t DeterminationMadeTrace) Element() any
type DoOption ¶
type DoOption func(*DoResponse)
func DoWithErrHandle ¶ added in v2.2.0
func DoWithErrHandle(err error, ch <-chan ErrHandler) DoOption
func DoWithObjects ¶ added in v2.2.0
func DoWithResults ¶ added in v2.2.0
func DoWithValue ¶ added in v2.2.0
type DoResponse ¶
type EndEvent ¶
type EndEvent struct {
*Wiring
// contains filtered or unexported fields
}
func NewEndEvent ¶
func (*EndEvent) Element ¶
func (evt *EndEvent) Element() schema.FlowNodeInterface
func (*EndEvent) NextAction ¶
type ErrHandleMode ¶
type ErrHandleMode int
const ( RetryMode ErrHandleMode = iota + 1 SkipMode ExitMode )
type ErrHandler ¶
type ErrHandler struct {
Mode ErrHandleMode
Retries int32
}
type ErrorTrace ¶
type ErrorTrace struct {
Error error
}
func (ErrorTrace) Element ¶
func (t ErrorTrace) Element() any
type EventBasedGateway ¶
type EventBasedGateway struct {
*Wiring
// contains filtered or unexported fields
}
func NewEventBasedGateway ¶
func NewEventBasedGateway(ctx context.Context, wiring *Wiring, eventBasedGateway *schema.EventBasedGateway) (gw *EventBasedGateway, err error)
func (*EventBasedGateway) Element ¶
func (gw *EventBasedGateway) Element() schema.FlowNodeInterface
func (*EventBasedGateway) NextAction ¶
func (gw *EventBasedGateway) NextAction(flow T) chan IAction
type EventObservedTrace ¶
type EventObservedTrace struct {
Node *schema.CatchEvent
Event event.IEvent
}
EventObservedTrace signals the fact that a particular event has been in fact observed by the node
func (EventObservedTrace) Element ¶
func (t EventObservedTrace) Element() any
type ExclusiveGateway ¶
type ExclusiveGateway struct {
*Wiring
// contains filtered or unexported fields
}
func NewExclusiveGateway ¶
func NewExclusiveGateway(ctx context.Context, wiring *Wiring, exclusiveGateway *schema.ExclusiveGateway) (gw *ExclusiveGateway, err error)
func (*ExclusiveGateway) Element ¶
func (gw *ExclusiveGateway) Element() schema.FlowNodeInterface
func (*ExclusiveGateway) NextAction ¶
func (gw *ExclusiveGateway) NextAction(flow T) chan IAction
type ExclusiveNoEffectiveSequenceFlows ¶
type ExclusiveNoEffectiveSequenceFlows struct {
*schema.ExclusiveGateway
}
func (ExclusiveNoEffectiveSequenceFlows) Error ¶
func (e ExclusiveNoEffectiveSequenceFlows) Error() string
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
Flow Represents a flow
func NewFlow ¶
func NewFlow(definitions *schema.Definitions, current IFlowNode, tracer tracing.ITracer, flowNodeMapping *FlowNodeMapping, flowWaitGroup *sync.WaitGroup, idGenerator id.IGenerator, actionTransformer ActionTransformer, locator data.IFlowDataLocator, ) *Flow
NewFlow creates a new flow from a flow node
The flow does nothing until it is explicitly started.
func (*Flow) SequenceFlow ¶
func (flow *Flow) SequenceFlow() *SequenceFlow
func (*Flow) SetTerminate ¶
type FlowAction ¶
type FlowAction struct {
Response *FlowActionResponse
SequenceFlows []*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 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 FlowTrace ¶
type FlowTrace struct {
Source schema.FlowNodeInterface
Flows []Snapshot
}
type Harness ¶
type Harness struct {
*Wiring
// contains filtered or unexported fields
}
func NewHarness ¶
func NewHarness(ctx context.Context, wiring *Wiring, idGenerator id.IGenerator, constructor Constructor) (node *Harness, err error)
func (*Harness) ConsumeEvent ¶
func (*Harness) Element ¶
func (node *Harness) Element() schema.FlowNodeInterface
func (*Harness) NextAction ¶
type IFlowNode ¶
type IFlowNode interface {
IOutgoing
Element() schema.FlowNodeInterface
}
type InclusiveGateway ¶
type InclusiveGateway struct {
*Wiring
// contains filtered or unexported fields
}
func NewInclusiveGateway ¶
func NewInclusiveGateway(ctx context.Context, wiring *Wiring, inclusiveGateway *schema.InclusiveGateway) (gw *InclusiveGateway, err error)
func (*InclusiveGateway) Element ¶
func (gw *InclusiveGateway) Element() schema.FlowNodeInterface
func (*InclusiveGateway) NextAction ¶
func (gw *InclusiveGateway) NextAction(flow T) chan IAction
type InclusiveNoEffectiveSequenceFlows ¶
type InclusiveNoEffectiveSequenceFlows struct {
*schema.InclusiveGateway
}
func (InclusiveNoEffectiveSequenceFlows) Error ¶
func (e InclusiveNoEffectiveSequenceFlows) Error() string
type IncomingFlowProcessedTrace ¶
type IncomingFlowProcessedTrace struct {
Node *schema.ParallelGateway
Flow T
}
IncomingFlowProcessedTrace signals that a particular flow has been processed. If any action have been taken, it already happened
func (IncomingFlowProcessedTrace) Element ¶
func (t IncomingFlowProcessedTrace) Element() any
type Instance ¶
type Instance struct {
*Options
// contains filtered or unexported fields
}
func NewInstance ¶
func (*Instance) ConsumeEvent ¶
func (*Instance) FlowNodeMapping ¶
func (ins *Instance) FlowNodeMapping() *FlowNodeMapping
func (*Instance) Locator ¶
func (ins *Instance) Locator() data.IFlowDataLocator
func (*Instance) RegisterEventConsumer ¶
func (*Instance) StartAll ¶
StartAll explicitly starts the instance by triggering all start events, if any
type InstanceTrace ¶
InstanceTrace wraps any trace with process instance id
func (InstanceTrace) Element ¶
func (t InstanceTrace) Element() any
func (InstanceTrace) Unwrap ¶
func (t InstanceTrace) Unwrap() tracing.ITrace
type InstantiationTrace ¶
InstantiationTrace denotes instantiation of a given process
func (InstantiationTrace) Element ¶
func (i InstantiationTrace) Element() any
type LeaveTrace ¶
type LeaveTrace struct {
Node schema.FlowNodeInterface
}
func (LeaveTrace) Element ¶
func (t LeaveTrace) Element() any
type ManualTask ¶
type ManualTask struct {
*Wiring
// contains filtered or unexported fields
}
func (*ManualTask) Cancel ¶
func (task *ManualTask) Cancel() <-chan bool
func (*ManualTask) Element ¶
func (task *ManualTask) Element() schema.FlowNodeInterface
func (*ManualTask) NextAction ¶
func (task *ManualTask) NextAction(T) chan IAction
func (*ManualTask) Type ¶
func (task *ManualTask) Type() Type
type NewFlowNodeTrace ¶
type NewFlowNodeTrace struct {
Node schema.FlowNodeInterface
}
func (NewFlowNodeTrace) Element ¶
func (t NewFlowNodeTrace) Element() any
type NewFlowTrace ¶
func (NewFlowTrace) Element ¶
func (t NewFlowTrace) Element() any
type Option ¶
type Option func(*Options)
Option allows to modify configuration of an instance in a flexible fashion (as it's just a modification function)
func WithContext ¶
WithContext will pass a given context to a new instance instead of implicitly generated one
func WithDataObjects ¶
func WithEventDefinitionInstanceBuilder ¶
func WithEventDefinitionInstanceBuilder(builder event.IDefinitionInstanceBuilder) Option
func WithEventEgress ¶
func WithEventIngress ¶
func WithIdGenerator ¶
func WithIdGenerator(builder id.IGeneratorBuilder) Option
func WithLocator ¶
func WithLocator(locator data.IFlowDataLocator) Option
func WithTracer ¶
WithTracer overrides instance's tracer
func WithVariables ¶
type ParallelGateway ¶
type ParallelGateway struct {
*Wiring
// contains filtered or unexported fields
}
func NewParallelGateway ¶
func NewParallelGateway(ctx context.Context, wiring *Wiring, parallelGateway *schema.ParallelGateway) (gateway *ParallelGateway, err error)
func (*ParallelGateway) Element ¶
func (gw *ParallelGateway) Element() schema.FlowNodeInterface
func (*ParallelGateway) NextAction ¶
func (gw *ParallelGateway) NextAction(flow T) chan IAction
type ProbeAction ¶
type ProbeAction struct {
SequenceFlows []*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 Process ¶
type Process struct {
*Options
Element *schema.Process
Definitions *schema.Definitions
// contains filtered or unexported fields
}
func MakeProcess ¶
func NewProcess ¶
func (*Process) Instantiate ¶
type ProcessLandMarkTrace ¶
type ProcessLandMarkTrace struct {
Node schema.FlowNodeInterface
}
ProcessLandMarkTrace denotes instantiation of a given sub process
func (ProcessLandMarkTrace) Element ¶
func (t ProcessLandMarkTrace) Element() any
type ProcessTrace ¶
ProcessTrace wraps any trace within a given process
func (ProcessTrace) Element ¶
func (t ProcessTrace) Element() any
func (ProcessTrace) Unwrap ¶
func (t ProcessTrace) Unwrap() tracing.ITrace
type ReceiveTask ¶
type ReceiveTask struct {
*Wiring
// contains filtered or unexported fields
}
func (*ReceiveTask) Cancel ¶
func (task *ReceiveTask) Cancel() <-chan bool
func (*ReceiveTask) Element ¶
func (task *ReceiveTask) Element() schema.FlowNodeInterface
func (*ReceiveTask) NextAction ¶
func (task *ReceiveTask) NextAction(t T) chan IAction
func (*ReceiveTask) Type ¶
func (task *ReceiveTask) Type() Type
type Retry ¶
type Retry struct {
// contains filtered or unexported fields
}
Retry describes the retry handler for Flow
func (*Retry) IsContinue ¶
type ScriptTask ¶
type ScriptTask struct {
*Wiring
// contains filtered or unexported fields
}
func (*ScriptTask) Cancel ¶
func (task *ScriptTask) Cancel() <-chan bool
func (*ScriptTask) Element ¶
func (task *ScriptTask) Element() schema.FlowNodeInterface
func (*ScriptTask) NextAction ¶
func (task *ScriptTask) NextAction(t T) chan IAction
func (*ScriptTask) Type ¶
func (task *ScriptTask) Type() Type
type SendTask ¶
type SendTask struct {
*Wiring
// contains filtered or unexported fields
}
func (*SendTask) Element ¶
func (task *SendTask) Element() schema.FlowNodeInterface
func (*SendTask) NextAction ¶
type SequenceFlow ¶
type SequenceFlow struct {
*schema.SequenceFlow
// contains filtered or unexported fields
}
func AllSequenceFlows ¶
func AllSequenceFlows(sequenceFlows *[]SequenceFlow, exclusion ...func(*SequenceFlow) bool) (result []*SequenceFlow)
func MakeSequenceFlow ¶
func MakeSequenceFlow(sf *schema.SequenceFlow, process schema.Element) SequenceFlow
func NewSequenceFlow ¶
func NewSequenceFlow(sf *schema.SequenceFlow, process schema.Element) *SequenceFlow
func (*SequenceFlow) Source ¶
func (sf *SequenceFlow) Source() (schema.FlowNodeInterface, error)
func (*SequenceFlow) Target ¶
func (sf *SequenceFlow) Target() (schema.FlowNodeInterface, error)
func (*SequenceFlow) TargetIndex ¶
func (sf *SequenceFlow) TargetIndex() (index int, err error)
type ServiceTask ¶
type ServiceTask struct {
*Wiring
// contains filtered or unexported fields
}
func (*ServiceTask) Cancel ¶
func (task *ServiceTask) Cancel() <-chan bool
func (*ServiceTask) Element ¶
func (task *ServiceTask) Element() schema.FlowNodeInterface
func (*ServiceTask) NextAction ¶
func (task *ServiceTask) NextAction(T) chan IAction
func (*ServiceTask) Type ¶
func (task *ServiceTask) Type() Type
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func (*Snapshot) SequenceFlow ¶
func (s *Snapshot) SequenceFlow() *SequenceFlow
type StartEvent ¶
type StartEvent struct {
*Wiring
// contains filtered or unexported fields
}
func NewStartEvent ¶
func NewStartEvent(ctx context.Context, wiring *Wiring, startEvent *schema.StartEvent, idGenerator id.IGenerator, ) (evt *StartEvent, err error)
func (*StartEvent) ConsumeEvent ¶
func (evt *StartEvent) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)
func (*StartEvent) Element ¶
func (evt *StartEvent) Element() schema.FlowNodeInterface
func (*StartEvent) NextAction ¶
func (evt *StartEvent) NextAction(flow T) chan IAction
func (*StartEvent) Trigger ¶
func (evt *StartEvent) Trigger()
type SubProcess ¶
type SubProcess struct {
*Wiring
// contains filtered or unexported fields
}
func (*SubProcess) Cancel ¶
func (p *SubProcess) Cancel() <-chan bool
func (*SubProcess) ConsumeEvent ¶
func (p *SubProcess) ConsumeEvent(ev event.IEvent) (result event.ConsumptionResult, err error)
func (*SubProcess) Element ¶
func (p *SubProcess) Element() schema.FlowNodeInterface
func (*SubProcess) NextAction ¶
func (p *SubProcess) NextAction(T) chan IAction
func (*SubProcess) RegisterEventConsumer ¶
func (p *SubProcess) RegisterEventConsumer(ev event.IConsumer) (err error)
func (*SubProcess) Type ¶
func (p *SubProcess) Type() Type
type T ¶
type T interface {
// Id returns flow's unique identifier
Id() id.Id
// SequenceFlow returns an inbound sequence flow this flow
// is currently at.
SequenceFlow() *SequenceFlow
}
T specifies an interface for BPMN flows
type Task ¶
type Task struct {
*Wiring
// contains filtered or unexported fields
}
func (*Task) Element ¶
func (task *Task) Element() schema.FlowNodeInterface
func (*Task) NextAction ¶
type TaskTrace ¶
type TaskTrace struct {
// contains filtered or unexported fields
}
TaskTrace describes common channel handler for all tasks
func (*TaskTrace) GetActivity ¶
func (*TaskTrace) GetDataObjects ¶
func (*TaskTrace) GetHeaders ¶
func (*TaskTrace) GetProperties ¶
type TaskTraceBuilder ¶
type TaskTraceBuilder struct {
// contains filtered or unexported fields
}
func NewTaskTraceBuilder ¶
func NewTaskTraceBuilder() *TaskTraceBuilder
func (*TaskTraceBuilder) Activity ¶
func (b *TaskTraceBuilder) Activity(activity Activity) *TaskTraceBuilder
func (*TaskTraceBuilder) Build ¶
func (b *TaskTraceBuilder) Build() *TaskTrace
func (*TaskTraceBuilder) Context ¶
func (b *TaskTraceBuilder) Context(ctx context.Context) *TaskTraceBuilder
func (*TaskTraceBuilder) DataObjects ¶
func (b *TaskTraceBuilder) DataObjects(dataObjects map[string]any) *TaskTraceBuilder
func (*TaskTraceBuilder) Headers ¶
func (b *TaskTraceBuilder) Headers(headers map[string]any) *TaskTraceBuilder
func (*TaskTraceBuilder) Properties ¶
func (b *TaskTraceBuilder) Properties(properties map[string]any) *TaskTraceBuilder
func (*TaskTraceBuilder) Timeout ¶ added in v2.0.2
func (b *TaskTraceBuilder) Timeout(timeout time.Duration) *TaskTraceBuilder
func (*TaskTraceBuilder) Value ¶
func (b *TaskTraceBuilder) Value(key, value any) *TaskTraceBuilder
type TerminationTrace ¶
type TerminationTrace struct {
FlowId id.Id
Source schema.FlowNodeInterface
}
func (TerminationTrace) Element ¶
func (t TerminationTrace) Element() any
type Type ¶
type Type string
const ( TaskType Type = "Task" ServiceType Type = "ServiceTask" ScriptType Type = "ScriptTask" UserType Type = "UserTask" ManualType Type = "ManualTask" CallType Type = "CallActivity" BusinessRuleType Type = "BusinessRuleTask" SendType Type = "SendTask" ReceiveType Type = "ReceiveTask" SubprocessType Type = "Subprocess" )
type UserTask ¶
type UserTask struct {
*Wiring
// contains filtered or unexported fields
}
func (*UserTask) Element ¶
func (task *UserTask) Element() schema.FlowNodeInterface
func (*UserTask) NextAction ¶
type VisitTrace ¶
type VisitTrace struct {
Node schema.FlowNodeInterface
}
func (VisitTrace) Element ¶
func (t VisitTrace) Element() any
type Wiring ¶
type Wiring struct {
ProcessInstanceId id.Id
FlowNodeId schema.Id
Definitions *schema.Definitions
Incoming []SequenceFlow
Outgoing []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)
Source Files
¶
- activity.go
- event_catch.go
- event_end.go
- event_start.go
- flow.go
- flow_action.go
- flow_interface.go
- flow_mapping.go
- flow_node.go
- flow_wiring.go
- gateway.go
- gateway_event_based.go
- gateway_exclusive.go
- gateway_inclusive.go
- gateway_parallel.go
- process.go
- process_instance.go
- retry.go
- sequence_flow.go
- subprocess.go
- task.go
- task_business_rule.go
- task_call_activity.go
- task_manual.go
- task_receive.go
- task_script.go
- task_send.go
- task_service.go
- task_user.go
- traces.go
- version.go
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
|
|
|
properties
command
|
|
|
subprocess
command
|
|
|
user_task
command
|
|
|
pkg
|
|
|
logic
Package logic provides commonly shared "logic units" (or algorithms)
|
Package logic provides commonly shared "logic units" (or algorithms) |
|
tracing
Package tracing is a capability to get an ordered stream of structured records of what has happened.
|
Package tracing is a capability to get an ordered stream of structured records of what has happened. |