behavior

package
v0.0.0-...-8b75618 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Stack list.List
)

Functions

func ConvertXMLToElement

func ConvertXMLToElement(model *Definitions)

设置元素的出入口

func Converter

func Converter(bytes []byte) Process

func ConverterBpmn

func ConverterBpmn(bytes model.Bytearry) Process

func FindCurrentTask

func FindCurrentTask(bytearries model.Bytearry, taskDefineKey string) FlowElement

func GetAgenda

func GetAgenda() engine.ActivitiEngineAgenda

func GetBpmn

func GetBpmn(bytes model.Bytearry) Process

func GetProcessInstanceManager

func GetProcessInstanceManager() ProcessInstanceManager

func SetCommandContext

func SetCommandContext(commandContext CommandContext)

func SetServiceImpl

func SetServiceImpl(service ServiceImpl)

Types

type AbstractCommandInterceptor

type AbstractCommandInterceptor struct {
	Next CommandInterceptor
}

type AbstractOperation

type AbstractOperation struct {
	CommandContext CommandContext
	Execution      engine.ExecutionEntity
}

type Command

type Command interface {
	Execute(interceptor CommandContext) (interface{}, error)
}

type CommandContext

type CommandContext struct {
	Command                    Command
	Agenda                     engine.ActivitiEngineAgenda
	ProcessEngineConfiguration ProcessEngineConfiguration
}

func GetCommandContext

func GetCommandContext() (CommandContext, error)

type CommandContextFactory

type CommandContextFactory struct {
}

func (CommandContextFactory) CreateCommandContext

func (factory CommandContextFactory) CreateCommandContext(command Command) CommandContext

type CommandContextInterceptor

type CommandContextInterceptor struct {
	Next                       CommandInterceptor
	ProcessEngineConfiguration *ProcessEngineConfiguration
	CommandContextFactory      CommandContextFactory
}

func (CommandContextInterceptor) Execute

func (commandContext CommandContextInterceptor) Execute(command Command) (interface{}, error)

func (*CommandContextInterceptor) SetNext

func (commandContext *CommandContextInterceptor) SetNext(next CommandInterceptor)

type CommandExecutor

type CommandExecutor interface {
	Exe(conf Command) (interface{}, error)
}

type CommandExecutorImpl

type CommandExecutorImpl struct {
	First CommandInterceptor
}

func (CommandExecutorImpl) Exe

func (comm CommandExecutorImpl) Exe(conf Command) (interface{}, error)

type CommandInterceptor

type CommandInterceptor interface {
	Execute(command Command) (interface{}, error)

	SetNext(next CommandInterceptor)
}

type CommandInvoker

type CommandInvoker struct {
	Next CommandInterceptor
}

func (CommandInvoker) Execute

func (commandInvoker CommandInvoker) Execute(command Command) (result interface{}, err error)

func (*CommandInvoker) SetNext

func (commandInvoker *CommandInvoker) SetNext(next CommandInterceptor)

type Context

type Context struct {
}

type ContinueProcessOperation

type ContinueProcessOperation struct {
	AbstractOperation
}

func (*ContinueProcessOperation) Run

func (cont *ContinueProcessOperation) Run() (err error)

type DefaultActivitiEngineAgenda

type DefaultActivitiEngineAgenda struct {
	Operations list.List
}

func (*DefaultActivitiEngineAgenda) GetNextOperation

func (agenda *DefaultActivitiEngineAgenda) GetNextOperation() engine.Operation

func (*DefaultActivitiEngineAgenda) IsEmpty

func (agenda *DefaultActivitiEngineAgenda) IsEmpty() bool

判断是否为空

func (*DefaultActivitiEngineAgenda) PlanContinueProcessOperation

func (agenda *DefaultActivitiEngineAgenda) PlanContinueProcessOperation(execution engine.ExecutionEntity)

连线继续执行

func (*DefaultActivitiEngineAgenda) PlanEndExecutionOperation

func (agenda *DefaultActivitiEngineAgenda) PlanEndExecutionOperation(execution engine.ExecutionEntity)

任务结束

func (*DefaultActivitiEngineAgenda) PlanOperation

func (agenda *DefaultActivitiEngineAgenda) PlanOperation(operation engine.Operation)

设置后续操作

func (*DefaultActivitiEngineAgenda) PlanTakeOutgoingSequenceFlowsOperation

func (agenda *DefaultActivitiEngineAgenda) PlanTakeOutgoingSequenceFlowsOperation(execution engine.ExecutionEntity, valuateConditions bool)

连线出口设置

func (*DefaultActivitiEngineAgenda) PlanTriggerExecutionOperation

func (agenda *DefaultActivitiEngineAgenda) PlanTriggerExecutionOperation(execution engine.ExecutionEntity)

任务出口执行

type EndExecutionOperation

type EndExecutionOperation struct {
	AbstractOperation
}

func (*EndExecutionOperation) Run

func (end *EndExecutionOperation) Run() (err error)

type ExclusiveGatewayActivityBehavior

type ExclusiveGatewayActivityBehavior struct {
}

func (ExclusiveGatewayActivityBehavior) Execute

func (exclusive ExclusiveGatewayActivityBehavior) Execute(execution engine.ExecutionEntity) (err error)

排他网关

func (ExclusiveGatewayActivityBehavior) Leave

func (exclusive ExclusiveGatewayActivityBehavior) Leave(execution engine.ExecutionEntity) (err error)

type FlowNodeActivityBehavior

type FlowNodeActivityBehavior interface {
	Leave(execution engine.ExecutionEntity) error
}

type InclusiveGatewayActivityBehavior

type InclusiveGatewayActivityBehavior struct {
}

func (InclusiveGatewayActivityBehavior) Execute

func (exclusive InclusiveGatewayActivityBehavior) Execute(execution engine.ExecutionEntity) error

包容网关

func (InclusiveGatewayActivityBehavior) Leave

func (exclusive InclusiveGatewayActivityBehavior) Leave(execution engine.ExecutionEntity) error

执行逻辑:获取当前所有执行的节点,判断是否可达当前网关可以停止执行,等待完成

type ProcessEngineConfiguration

type ProcessEngineConfiguration struct {
	CommandInvoker        CommandInterceptor
	CommandInterceptors   []CommandInterceptor
	EventListeners        []ActivitiEventListener
	Service               ServiceImpl
	CommandExecutor       CommandExecutor
	CommandContextFactory CommandContextFactory
	VariableTypes         VariableTypes
	EventDispatcher       ActivitiEventDispatcher
}

func GetProcessEngineConfiguration

func GetProcessEngineConfiguration() *ProcessEngineConfiguration

func (ProcessEngineConfiguration) AddEventListeners

func (processEngineConfiguration ProcessEngineConfiguration) AddEventListeners(eventListeners []ActivitiEventListener)

type ProcessUtils

type ProcessUtils struct {
	ProcessId int64
}

func (*ProcessUtils) GetCurrentTask

func (processUtil *ProcessUtils) GetCurrentTask(taskId int) (FlowElement, error)

func (*ProcessUtils) GetFlowElement

func (processUtil *ProcessUtils) GetFlowElement(flowElementId string) (FlowElement, error)

func (*ProcessUtils) LoadProcess

func (processUtil *ProcessUtils) LoadProcess() error

type ServiceImpl

type ServiceImpl struct {
	CommandExecutor CommandExecutor
}

func GetServiceImpl

func GetServiceImpl() ServiceImpl

func (*ServiceImpl) SetCommandExecutor

func (serviceImpl *ServiceImpl) SetCommandExecutor(commandExecutor CommandExecutor)

type TakeOutgoingSequenceFlowsOperation

type TakeOutgoingSequenceFlowsOperation struct {
	AbstractOperation
	EvaluateConditions bool
}

func (TakeOutgoingSequenceFlowsOperation) Run

func (task TakeOutgoingSequenceFlowsOperation) Run() (err error)

type TransactionContextInterceptor

type TransactionContextInterceptor struct {
	Next CommandInterceptor
}

func (TransactionContextInterceptor) Execute

func (transactionContextInterceptor TransactionContextInterceptor) Execute(command Command) (value interface{}, err error)

func (*TransactionContextInterceptor) SetNext

func (transactionContextInterceptor *TransactionContextInterceptor) SetNext(next CommandInterceptor)

type TriggerExecutionOperation

type TriggerExecutionOperation struct {
	AbstractOperation
}

func (TriggerExecutionOperation) Run

func (trigger TriggerExecutionOperation) Run() (err error)

type TriggerableActivityBehavior

type TriggerableActivityBehavior interface {
	Trigger(entity engine.ExecutionEntity)
}

type UserAutoTaskActivityBehavior

type UserAutoTaskActivityBehavior struct {
	UserTask   engine.UserTask
	ProcessKey string
}

func (UserAutoTaskActivityBehavior) Execute

func (user UserAutoTaskActivityBehavior) Execute(execution engine.ExecutionEntity) (err error)

自动通过用户节点处理

func (UserAutoTaskActivityBehavior) Leave

func (user UserAutoTaskActivityBehavior) Leave(execution engine.ExecutionEntity)

func (UserAutoTaskActivityBehavior) Trigger

func (user UserAutoTaskActivityBehavior) Trigger(execution engine.ExecutionEntity)

普通用户节点处理

type UserTaskActivityBehavior

type UserTaskActivityBehavior struct {
	UserTask   engine.UserTask
	ProcessKey string
}

func (UserTaskActivityBehavior) Execute

func (user UserTaskActivityBehavior) Execute(execution engine.ExecutionEntity) (err error)

普通用户节点处理

func (UserTaskActivityBehavior) Leave

func (user UserTaskActivityBehavior) Leave(execution engine.ExecutionEntity)

func (UserTaskActivityBehavior) Trigger

func (user UserTaskActivityBehavior) Trigger(execution engine.ExecutionEntity)

普通用户节点处理

Jump to

Keyboard shortcuts

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