workflow

package
v0.0.0-...-c498848 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowHelper

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

------------------------------------------------------------

func New_FLowHelper

func New_FLowHelper(constr string, topic string) (*FlowHelper, error)

初始化

func (*FlowHelper) AbandonCase

func (f *FlowHelper) AbandonCase(enterprise, usernumber, caseid, choice, remark string, itemid int32,
	appdata string) error

作废流程实列

func (*FlowHelper) AddCase

func (f *FlowHelper) AddCase(enterprise, caseid, flowid, flowname, usernumber, username, biz1, biz2,
	appid, handeruserid, handerusername string, copyuser []int,
	appdata, remark string) (string, string, error)

新发起一个流程, 返回caseid

func (*FlowHelper) AddFlow

func (f *FlowHelper) AddFlow(flow *FlowInfo, appid string) error

保存一个新的流程定义

func (*FlowHelper) CommitCase

func (f *FlowHelper) CommitCase(enterprise, usernumber, caseid, choice, remark string, itemid int32,
	flowuser *FlowUser,
	appdata string) (string, error)

处理待办项, 返回进入的状态名称

func (*FlowHelper) DeleteFlow

func (f *FlowHelper) DeleteFlow(flowid string) error

删除一个流程定义

func (*FlowHelper) DisableFlow

func (f *FlowHelper) DisableFlow(flow *FlowInfo) error

停用流程

func (*FlowHelper) EnableFlow

func (f *FlowHelper) EnableFlow(flow *FlowInfo) error

启用流程

func (*FlowHelper) FallbackCase

func (f *FlowHelper) FallbackCase(caseid, choice, remark string, itemid int32,
	appdata string) error

流程实列, 退回给上一个步骤

func (*FlowHelper) FinishCase

func (f *FlowHelper) FinishCase(caseid, choice, remark string, itemid int32,
	appdata string) error

结束流程实列

func (*FlowHelper) GetCaseDetail

func (f *FlowHelper) GetCaseDetail(caseid string) (*FlowCaseList, error)

流程实例详情

func (*FlowHelper) GetDynamicSel

func (f *FlowHelper) GetDynamicSel(flowid, stepname string) ([]*Choice, error)

动态获取审批选项

func (*FlowHelper) GetFlow

func (f *FlowHelper) GetFlow(flowid string) (*FlowInfo, error)

流程定义详情

func (*FlowHelper) GetMyCases

func (f *FlowHelper) GetMyCases(usernumber string, finishstate, filter, pageindex, pagesize int32,
	flowid, keyword, begintime, endtime, createtime, handletime, sorttype string) (*CaseList, error)

获取用户事务列表

func (*FlowHelper) GetTodoCases

func (f *FlowHelper) GetTodoCases(flowname, usernumber string,
	pageindex, pagesize int32) (*CaseList, error)

获取用户的代办列表---flowname查询条件

func (*FlowHelper) GetWorkFlowDetail

func (f *FlowHelper) GetWorkFlowDetail(flowid string) (*FlowInfo, error)

func (*FlowHelper) GetWorkFlowStatus

func (f *FlowHelper) GetWorkFlowStatus(appid, bizids string, wfstatus int32) (*PluginWorkFlowInfoList, error)

func (*FlowHelper) GetWorkFlows

func (f *FlowHelper) GetWorkFlows(status, flowname string, pageindex, pagesize int32) (*FlowList, error)

func (*FlowHelper) GetWorkFlowsForMobile

func (f *FlowHelper) GetWorkFlowsForMobile(status, flowname string,
	pageindex, pagesize int32) (*FlowList, error)

func (*FlowHelper) GetWorkFlowsForWeb

func (f *FlowHelper) GetWorkFlowsForWeb(status, flowname string,
	pageindex, pagesize int32) (*FlowList, error)

func (*FlowHelper) PreAddCase

func (f *FlowHelper) PreAddCase(flowid, usernumber, username, appdata string) (*NextStatuInfo, error)

预新发起一个流程, 返回步骤和人

func (*FlowHelper) PreCommitCase

func (f *FlowHelper) PreCommitCase(caseid, choice string, itemid int32,
	appdata string) (nsif *NextStatuInfo, err error)

预提交, 选择审批选项, 返回下一步去到的步骤和可选审批人

func (*FlowHelper) Readed

func (f *FlowHelper) Readed(itemid int32, caseid, usernumber string) error

标记流程步骤为已读

func (*FlowHelper) SendbackCase

func (f *FlowHelper) SendbackCase(enterprise, usernumber, caseid, choice, remark string, itemid int32,
	appdata string) error

流程实列, 退回到发起人

func (*FlowHelper) SetAgent

func (f *FlowHelper) SetAgent(userid, agentid string) error

设置代理人

func (*FlowHelper) UnsetAgent

func (f *FlowHelper) UnsetAgent(userid string) error

取消代理人

func (*FlowHelper) UpdateFlow

func (f *FlowHelper) UpdateFlow(flow *FlowInfo) error

修改一个流程定义

func (*FlowHelper) WBStepStatus

func (f *FlowHelper) WBStepStatus(itemid int32, caseid, usernumber string) error

func (*FlowHelper) WorkFlows

func (f *FlowHelper) WorkFlows(status, flowname string, pageindex, pagesize int32,
	dynamic_sql string) (*FlowList, error)

获取流程定义列表

type FlowPgProvider

type FlowPgProvider struct {
	ConnCfg *pgx.ConnConfig //数据库连接串
}

--------------------流程定义提供者类----------------------------------------

func New_FlowPgProvider

func New_FlowPgProvider(connstr string) (*FlowPgProvider, error)

func (*FlowPgProvider) ComitFlow

func (f *FlowPgProvider) ComitFlow(ca *Case, ci *CaseItem, ni *CaseItem) error

在一个事务中提交流程数据

func (*FlowPgProvider) FindAgent

func (f *FlowPgProvider) FindAgent(userid string) (user *FlowUser, find bool)

找到步骤处理人的代理人

func (*FlowPgProvider) GetCaseItems

func (f *FlowPgProvider) GetCaseItems(caseid string) (map[int32]*CaseItem, error)

func (*FlowPgProvider) GetFlow

func (f *FlowPgProvider) GetFlow(flowid string) (*Flow, error)

获得流程的定义keys:flowid, name, descript, flowxml

func (*FlowPgProvider) GetFlowByVersionNo

func (f *FlowPgProvider) GetFlowByVersionNo(flowid string, versionno int32) (*Flow, error)

func (*FlowPgProvider) LoadFlowCase

func (f *FlowPgProvider) LoadFlowCase(caseid string) (*FlowCase, error)

加载一个流程的完整信息

func (*FlowPgProvider) SaveNewCase

func (f *FlowPgProvider) SaveNewCase(fc *FlowCase, versionno int32) (string, error)

保存一个新的流程实例

func (*FlowPgProvider) StepHandled

func (f *FlowPgProvider) StepHandled(ca *Case, ci *CaseItem, ni *CaseItem) error

记录步骤进入,退出的消息

func (*FlowPgProvider) WriteBackSendTime

func (f *FlowPgProvider) WriteBackSendTime(caseinfo *CaseInfo) error

回写流程发送时间

type OrgPgProvider

type OrgPgProvider struct {
	ConnCfg *pgx.ConnConfig //数据库连接串
}

-----------------------------------------------------

func New_OrgPgProvider

func New_OrgPgProvider(connstr string) (*OrgPgProvider, error)

func (*OrgPgProvider) FindUser

func (o *OrgPgProvider) FindUser(role, departid string) ([]*FlowUser, error)

func (*OrgPgProvider) FindUserByDept

func (o *OrgPgProvider) FindUserByDept(departid string) (us []*FlowUser, err error)

func (*OrgPgProvider) FindUserByRole

func (o *OrgPgProvider) FindUserByRole(role string) (us []*FlowUser, err error)

func (*OrgPgProvider) FindUserDept

func (o *OrgPgProvider) FindUserDept(userid string) (string, error)

func (*OrgPgProvider) FindUserParentDept

func (o *OrgPgProvider) FindUserParentDept(userid string) (string, error)

func (*OrgPgProvider) GetUser

func (o *OrgPgProvider) GetUser(userid string) (us []*FlowUser, err error)

type PluginWorkFlowInfo

type PluginWorkFlowInfo struct {
	BizID          string `json:"bizid"`          //业务id
	WorkFlowStatus string `json:"workflowstatus"` //流程审批状态 0审批中1通过2不通过
}

插件流程对象

type PluginWorkFlowInfoList

type PluginWorkFlowInfoList struct {
	Items      []*PluginWorkFlowInfo
	TotalItems int32
}

Jump to

Keyboard shortcuts

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