convert

package
v0.0.0-...-c4618b4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OrApproval type
	OrApproval = "OR_APPROVAL" // 或签
	// AndApproval type
	AndApproval = "AND_APPROVAL" // 会签
	// OrFillIn type
	OrFillIn = "OR_FILLIN" // 任填
	// AndFillIn type
	AndFillIn = "AND_FILLIN" // 全填
	// START type
	START = "START" // 开始
	// END type
	END = "END" // 结束

	// AssigneeList dynamic user list key
	AssigneeList = "assigneeList"
)
View Source
const (
	Start            = "Start"
	User             = "User"
	MultiUser        = "MultiUser"
	ParallelGateway  = "ParallelGateway"
	InclusiveGateway = "InclusiveGateway"
	End              = "End"
	Service          = "Service"
	Script           = "Script"
	SubProcess       = "SubProcess"
)

Process Node Type

View Source
const (
	DelayTypeOfTableColumn = "tableColumn"
	DelayTypeOfaTime       = "aTime"
	DelayTypeOfSpecTime    = "specTime"
)

延时节点的延时类型

View Source
const (
	// EmailTypeOfField 人员选择字段(1.1.1版本前默认)
	EmailTypeOfField = "field"
	// EmailTypeOfMultipleField 多个字段
	EmailTypeOfMultipleField = "multipleField"
	// EmailTypeOfSuperior 上级领导
	EmailTypeOfSuperior = "superior"
	// EmailTypeOfLeadOfDepartment 部门负责人
	EmailTypeOfLeadOfDepartment = "leadOfDepartment"
	// EmailTypeOfProcessInitiator 发起人
	EmailTypeOfProcessInitiator = "processInitiator"
	// EmailTypeOfPerson 人员
	EmailTypeOfPerson = "person"
)

邮件节点类型

View Source
const (
	// CompOfUserPicker 人员选择器
	CompOfUserPicker = "UserPicker"
	// CompOfRadioGroup 单选
	CompOfRadioGroup = "RadioGroup"
	// CompOfTextarea 多行文本
	CompOfTextarea = "Textarea"
	// CompOfCheckboxGroup 复选框
	CompOfCheckboxGroup = "CheckboxGroup"
	// CompOfInput input输入框
	CompOfInput = "Input"
	// CompOfSelect 下拉框
	CompOfSelect = "Select"
	// CompOfMultipleSelect 下拉复选框
	CompOfMultipleSelect = "MultipleSelect"
)

前端组件字段类型

View Source
const (
	// CallbackOfDelay 延时
	CallbackOfDelay = "delayed"
	// CallbackOfUrge 催单
	CallbackOfUrge = "urge"
	// CallbackOfCron 定时
	CallbackOfCron = "cron"
)

dispatcher回调类型

View Source
const (
	FormData = "formData"

	FormTime = "FORM_TIME"
	// Approve task
	Approve = "approve"
	// FillIn task
	FillIn = "fillIn"
	// Email service task
	Email = "email"
	// Autocc service task
	Autocc = "autocc"
	// Letter service task
	Letter = "letter"
	// ProcessVariableAssignment service task
	ProcessVariableAssignment = "processVariableAssignment"
	// TableDataCreate service task
	TableDataCreate = "tableDataCreate"
	// TableDataUpdate service task
	TableDataUpdate = "tableDataUpdate"
	// WebHook service task
	WebHook = "webhook"
	// Delayed 延时节点
	Delayed = "delayed"

	PauseExecution = "pauseExecution"
)

LowCode flow Chart Type

View Source
const (
	// ReviewTask 审批任务
	ReviewTask = "REVIEW"
	// WriteTask 填写任务
	WriteTask = "WRITE"
	// ReadTask 阅示任务
	ReadTask = "READ"
	// CcTask 抄送任务
	CcTask = "CC"
	// SendBackTask 打回重填任务
	SendBackTask = "SEND_BACK"
)

Process task type

View Source
const (
	Person           = "person"
	Field            = "field"
	Position         = "position"
	Superior         = "superior"
	LeadOfDepartment = "leadOfDepartment"
)

人员'person' | 表单字段'field' | 岗位'position' | 上级领导'superior' | 部门负责人'leadOfDepartment'

View Source
const (
	Body   = "body"
	Path   = "path"
	Header = "header"
	Query  = "query"
)

webHook inputs type

Variables

This section is empty.

Functions

func FindNextNode

func FindNextNode(currentNode *ShapeModel, chartJSON string) (string, bool)

FindNextNode func

func GetBusinessDataByType

func GetBusinessDataByType(text string, nodeType string) (*map[string]interface{}, error)

GetBusinessDataByType func

func GetCurrentNodeType

func GetCurrentNodeType(t string, multiplePersonWay string) string

GetCurrentNodeType func

func GetFormInfoFromShapes

func GetFormInfoFromShapes(shapes []ShapeModel) string

GetFormInfoFromShapes get form info

func GetValueFromBusinessData

func GetValueFromBusinessData(s ShapeModel, keyInfo string) interface{}

GetValueFromBusinessData func

Types

type ApprovePersonsModel

type ApprovePersonsModel struct {
	// 人员'person' | 表单字段'field' | 岗位'position' | 上级领导'superior' | 部门负责人'leadOfDepartment'
	Type         string                   `json:"type"`
	Users        []map[string]interface{} `json:"users"`
	Roles        []map[string]interface{} `json:"roles"`
	Departments  []map[string]interface{} `json:"departments"`
	Positions    []string                 `json:"positions"` // 岗位id集合
	Fields       []string                 `json:"fields"`    // 表单字段集合
	VariablePath string                   `json:"variablePath"`
}

ApprovePersonsModel struct

type DayHourMinuteModel

type DayHourMinuteModel struct {
	Day     int `json:"day"`
	Hours   int `json:"hours"`
	Minutes int `json:"minutes"`
}

DayHourMinuteModel struct

type DeadLineModel

type DeadLineModel struct {
	DayHourMinuteModel
	// entry进入该节点后,firstEntry首次进入该节点后,flowWorked工作流开始后
	BreakPoint string    `json:"breakPoint"`
	Urge       UrgeModel `json:"urge"`
}

DeadLineModel struct

type FieldPermissionModel

type FieldPermissionModel struct {
	FieldName    string             `json:"fieldName"`
	XInternal    XInternalModel     `json:"x-internal"`
	InitialValue FieldValueSetModel `json:"initialValue"`
	SubmitValue  FieldValueSetModel `json:"submitValue"`
}

FieldPermissionModel field permission model

type FieldValueSetModel

type FieldValueSetModel struct {
	Variable    interface{} `json:"variable"`
	StaticValue interface{} `json:"staticValue"`
}

FieldValueSetModel struct

type Input

type Input struct {
	Type      string      `json:"type"`
	FieldType string      `json:"fieldType"`
	Name      string      `json:"name"`
	Data      interface{} `json:"data"`
	In        string      `json:"in"`
	Title     string      `json:"title"`
	FieldName string      `json:"fieldName"`
	TableID   string      `json:"tableID"`
}

Input struct

type NodeDataModel

type NodeDataModel struct {
	Name                  string   `json:"name"`
	BranchTargetElementID string   `json:"branchTargetElementID"`
	ChildrenID            []string `json:"childrenID"`
}

NodeDataModel info

type OperatorPermissionItemModel

type OperatorPermissionItemModel struct {
	Enabled        bool   `json:"enabled"`
	Changeable     bool   `json:"changeable"`
	Name           string `json:"name"`
	DefaultText    string `json:"defaultText"`
	Text           string `json:"text"`
	Only           string `json:"only"`
	ReasonRequired bool   `json:"reasonRequired"`
	Value          string `json:"value"`
}

OperatorPermissionItemModel struct

type OperatorPermissionModel

type OperatorPermissionModel struct {
	Custom []OperatorPermissionItemModel `json:"custom"`
	System []OperatorPermissionItemModel `json:"system"`
}

OperatorPermissionModel struct

type ProcessModel

type ProcessModel struct {
	Version string       `json:"version"`
	Shapes  []ShapeModel `json:"shapes"`
}

ProcessModel struct

func ToProcessModel

func ToProcessModel(chartJSON string) (*ProcessModel, error)

ToProcessModel func

type ProcessNextNodeModel

type ProcessNextNodeModel struct {
	ID        string `json:"id"`
	Condition string `json:"condition"`
}

ProcessNextNodeModel info

type ProcessNodeModel

type ProcessNodeModel struct {
	ID        string                  `json:"id"`
	Name      string                  `json:"name"`
	Type      string                  `json:"type"`
	Desc      string                  `json:"desc"`
	Variable  string                  `json:"variable"`
	UserIds   []string                `json:"userIds"`
	GroupIds  []string                `json:"groupIds"`
	NextNodes []*ProcessNextNodeModel `json:"nextNodes"`
}

ProcessNodeModel info

func GenProcessNodes

func GenProcessNodes(text string) ([]*ProcessNodeModel, interface{}, error)

GenProcessNodes info

type ShapeDataModel

type ShapeDataModel struct {
	NodeData     NodeDataModel          `json:"nodeData"`
	BusinessData map[string]interface{} `json:"businessData"`
}

ShapeDataModel info

type ShapeModel

type ShapeModel struct {
	ID     string         `json:"id"`
	Type   string         `json:"type"`
	Data   ShapeDataModel `json:"data"`
	Source string         `json:"source"`
	Target string         `json:"target"`
}

ShapeModel struct

func GetShapeByChartType

func GetShapeByChartType(chartJSON string, chartType string) (*ShapeModel, error)

GetShapeByChartType func

func GetShapeByTaskDefKey

func GetShapeByTaskDefKey(flowJSON string, taskDefKey string) (*ShapeModel, error)

GetShapeByTaskDefKey func

type TaskBasicConfigModel

type TaskBasicConfigModel struct {
	ApprovePersons    ApprovePersonsModel `json:"approvePersons"`    // 审批人
	MultiplePersonWay string              `json:"multiplePersonWay"` // 多人审批时
	// 无审批人时whenNoPerson:自动跳过该节点skip,转交给管理员transferAdmin
	WhenNoPerson string `json:"whenNoPerson"`
	// 自动审批通过规则autoRules:审批人为发起人时origin,审批人与上一节点审批人相同时parent,审批人与前置节点(非上一节点审批人相同时)previous
	AutoRules []string `json:"autoRules"`
	// 审批用时限制
	TimeRule TaskTimeRuleModel `json:"timeRule"`
}

TaskBasicConfigModel struct

func GetTaskBasicConfigModel

func GetTaskBasicConfigModel(shape *ShapeModel) *TaskBasicConfigModel

GetTaskBasicConfigModel get shape basic config model

type TaskTimeRuleModel

type TaskTimeRuleModel struct {
	Enabled     bool              `json:"enabled"`
	DeadLine    DeadLineModel     `json:"deadLine"`
	WhenTimeout TypeAndValueModel `json:"whenTimeout"`
}

TaskTimeRuleModel struct

type TypeAndValueModel

type TypeAndValueModel struct {
	// noDealWith不处理,autoDealWith自动处理,jump跳转至其他节点
	Type  string `json:"type"`
	Value string `json:"value"`
}

TypeAndValueModel struct

type UrgeModel

type UrgeModel struct {
	DayHourMinuteModel
	Repeat DayHourMinuteModel `json:"repeat"`
}

UrgeModel struct

type XInternalModel

type XInternalModel struct {
	//  editable hidden write read 4位二进制表示,后端关注write和read
	Permission int8 `json:"permission"`
}

XInternalModel permission

Jump to

Keyboard shortcuts

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