easyflow

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const AutomationApproval = "automation"

Variables

This section is empty.

Functions

func ToNodeProperty added in v1.7.0

func ToNodeProperty[T any](node Node) (T, error)

ToNodeProperty node节点字段解析

Types

type AutomationProperty

type AutomationProperty struct {
	Name          string `json:"name"`
	CodebookUid   string `json:"codebook_uid"`
	Tag           string `json:"tag"`
	IsNotify      bool   `json:"is_notify"`
	Unit          uint8  `json:"unit"`
	Quantity      int64  `json:"quantity"`
	ExecMethod    string `json:"exec_method"`
	TemplateId    int64  `json:"template_id"`
	TemplateField string `json:"template_field"`
	IsTiming      bool   `json:"is_timing"`
	NotifyMethod  int64  `json:"notify_method"`
}

type ConditionProperty

type ConditionProperty struct {
	Name string `json:"name"`
}

type Edge

type Edge struct {
	Type         string                   `json:"type"`
	SourceNodeId string                   `json:"sourceNodeId"`
	TargetNodeId string                   `json:"targetNodeId"`
	Properties   interface{}              `json:"properties"`
	ID           string                   `json:"id"`
	StartPoint   map[string]interface{}   `json:"startPoint"`
	EndPoint     map[string]interface{}   `json:"endPoint"`
	PointsList   []map[string]interface{} `json:"pointsList"`
	Text         map[string]interface{}   `json:"text"`
}

Edge 定义线字段

type EdgeProperty

type EdgeProperty struct {
	Name       string `json:"name"`
	Expression string `json:"expression"`
	IsPass     bool   `json:"is_pass"`
}

func ToEdgeProperty added in v1.7.0

func ToEdgeProperty(edges Edge) (EdgeProperty, error)

ToEdgeProperty edge连线字段解析

type EndProperty

type EndProperty struct {
	Name string `json:"name"`
}

type LogicFlow

type LogicFlow struct {
	Edges []map[string]interface{} `json:"edges"`
	Nodes []map[string]interface{} `json:"nodes"`
}

type Node

type Node struct {
	Type       string      `json:"type"`
	Properties interface{} `json:"properties"`
	ID         string      `json:"id"`
}

Node 节点定义

type ProcessEngineConvert

type ProcessEngineConvert interface {
	Deploy(workflow Workflow) (int, error)
	Edge(workflow Workflow, tasks []model.Task) ([]string, error)
	GetAutomationProperty(workflow Workflow, nodeId string) (AutomationProperty, error)
}

func NewLogicFlowToEngineConvert

func NewLogicFlowToEngineConvert() ProcessEngineConvert

type Rule added in v1.8.0

type Rule string
const (
	// APPOINT 指定内部人员
	APPOINT Rule = "appoint"
	// FOUNDER 工单创建人
	FOUNDER Rule = "founder"
	// TEMPLATE 根据模版字段提取用户
	TEMPLATE Rule = "template"
	// LEADER 部门领导
	LEADER Rule = "leaders"
	// MAIN_LEADER 分管领导
	MAIN_LEADER Rule = "main_leader"
)

func (Rule) ToString added in v1.8.0

func (s Rule) ToString() string

type StartProperty

type StartProperty struct {
	Name string `json:"name"`
}

type UserProperty

type UserProperty struct {
	Name          string   `json:"name"`
	Approved      []string `json:"approved"`
	Rule          Rule     `json:"rule"`
	TemplateField string   `json:"template_field"`
	IsCosigned    bool     `json:"is_cosigned"`
	IsCC          bool     `json:"is_cc"`
}

type Workflow

type Workflow struct {
	Id       int64
	Name     string
	Owner    string
	FlowData LogicFlow
}

Jump to

Keyboard shortcuts

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