easyflow

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemPass          = 3
	SystemReject        = 4
	UserRevoke          = 5
	SystemPassComment   = "其余节点审批通过,系统判定无法继续审批"
	SystemRejectComment = "其余节点进行驳回,系统判定无法继续审批"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FeishuNotify added in v1.6.0

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

func NewFeishuNotify added in v1.6.0

func NewFeishuNotify(lark *lark.Client) (*FeishuNotify, error)

type NotificationService added in v1.6.0

type NotificationService interface {
	Send(ctx context.Context, instanceId int, userIDs []string) (bool, error)
}

type NotifierIntegration added in v1.6.0

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

type Notify added in v1.6.0

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

func NewNotify added in v1.6.0

func NewNotify(engineSvc engineSvc.Service, templateSvc templateSvc.Service, orderSvc order.Service,
	userSvc user.Service, workflowSvc workflow.Service, integrations []NotifyIntegration) (*Notify, error)

func (*Notify) Send added in v1.6.0

func (n *Notify) Send(ctx context.Context, instanceId int, userIDs []string) (bool, error)

type NotifyIntegration added in v1.6.0

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

func BuildReceiverIntegrations added in v1.6.0

func BuildReceiverIntegrations(larkC *lark.Client) ([]NotifyIntegration, error)

BuildReceiverIntegrations 整合消息通知渠道

func NewNotifyIntegration added in v1.6.0

func NewNotifyIntegration(n NotifierIntegration, name string) NotifyIntegration

type ProcessEvent

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

func NewProcessEvent

func NewProcessEvent(producer producer.OrderStatusModifyEventProducer, engineSvc engineSvc.Service,
	taskSvc task.Service, notify NotificationService, orderSvc order.Service) (*ProcessEvent, error)

func (*ProcessEvent) EventAutomation

func (e *ProcessEvent) EventAutomation(ProcessInstanceID int, CurrentNode *model.Node, PrevNode model.Node) error

EventAutomation 自动化任务处理(创建任务)

func (*ProcessEvent) EventClose

func (e *ProcessEvent) EventClose(ProcessInstanceID int, CurrentNode *model.Node, PrevNode model.Node) error

EventClose 流程结束,修改 Order 状态为已完成 Deprecated 废弃 不再通过 Kafka 修改状态,使用 EventNotify 直接调用接口进行修改

func (*ProcessEvent) EventEnd

func (e *ProcessEvent) EventEnd(ProcessInstanceID int, CurrentNode *model.Node, PrevNode model.Node) error

EventEnd 节点结束事件

func (*ProcessEvent) EventNotify

func (e *ProcessEvent) EventNotify(ProcessInstanceID int, CurrentNode *model.Node, PrevNode model.Node) error

EventNotify 通知

func (*ProcessEvent) EventNotifyV1 added in v1.6.0

func (e *ProcessEvent) EventNotifyV1(ProcessInstanceID int, CurrentNode *model.Node, PrevNode model.Node) error

EventNotifyV1 通知

func (*ProcessEvent) EventRevoke

func (e *ProcessEvent) EventRevoke(ProcessInstanceID int, RevokeUserID string) error

EventRevoke 流程撤销

func (*ProcessEvent) EventStart

func (e *ProcessEvent) EventStart(ProcessInstanceID int, CurrentNode *model.Node, PrevNode model.Node) error

EventStart 节点结束事件

func (*ProcessEvent) EventTaskInclusionNodePass

func (e *ProcessEvent) EventTaskInclusionNodePass(TaskID int, CurrentNode *model.Node, PrevNode model.Node) error

EventTaskInclusionNodePass 用户任务并行包容处理事件 当处于并行 或 包容网关的时候,其中一个节点驳回,其余并行节点并不会修改状态

func (*ProcessEvent) EventTaskParallelNodePass

func (e *ProcessEvent) EventTaskParallelNodePass(TaskID int, CurrentNode *model.Node, PrevNode model.Node) error

EventTaskParallelNodePass 用户任务并行处理事件 当处于并行 或 包容网关的时候,其中一个节点驳回,其余并行节点并不会修改状态

type Rule added in v1.6.0

type Rule struct {
	Type  string `json:"type"`
	Field string `json:"field"`
	Title string `json:"title"`
}

type Rules added in v1.6.0

type Rules []Rule

Jump to

Keyboard shortcuts

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