Documentation ¶
Index ¶
- Variables
- func AlternateSchema() ent.Option
- type DbExport
- func (e *DbExport) ClaimUserTask(ctx context.Context, input *ent.CreateIdentityLinkInput) (added bool, err error)
- func (e *DbExport) CreateUserTask(ctx context.Context, pi *api.InstanceRequest, taskEle *bpmn.UserTask) (tk *ent.Task, err error)
- func (e *DbExport) GetDecisionReqDef(ctx context.Context, req *api.GetDecisionReqDefRequest) (*ent.DecisionReqDef, error)
- func (e *DbExport) GetGroupIDs(ctx context.Context, req *api.GetGroupIDsRequest) (*api.GetGroupIDResponse, error)
- func (e *DbExport) GetGroupUsers(ctx context.Context, req *api.GetGroupUserRequest) (*api.GetGroupUserResponse, error)
- func (e *DbExport) GetProcDef(ctx context.Context, req *api.GetProcDefRequest) (*ent.ProcDef, error)
- func (e *DbExport) GetUserIDs(ctx context.Context, req *api.GetUserIDsRequest) (*api.GetUserIDResponse, error)
- func (e *DbExport) Review(ctx context.Context, input *ent.UpdateIdentityLinkInput, lastUndone int) error
- type Definition
- type Service
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AlternateSchema ¶
Types ¶
type DbExport ¶
type DbExport struct {
Service *Service
}
func (*DbExport) ClaimUserTask ¶
func (e *DbExport) ClaimUserTask(ctx context.Context, input *ent.CreateIdentityLinkInput) (added bool, err error)
ClaimUserTask 用户主动认领任务,并更新任务统计后,将任务数据返回给工作流引擎.
在创建用户任务时 CreateUserTask会默认的更新任务人数统计,因此在本方法执行时,只有候选组或参考人主动认领任务时,才会再次更新任务人数统计. 需要注意added返回值的处理.
func (*DbExport) CreateUserTask ¶
func (e *DbExport) CreateUserTask(ctx context.Context, pi *api.InstanceRequest, taskEle *bpmn.UserTask) (tk *ent.Task, err error)
CreateUserTask 创建用户任务,并更新任务统计后,将任务数据返回给工作流引擎.
任务统计:
1.如果任务已经明确指了Assignee,则将成员数+1; 2.如果只设定了候选组,则成员数+1; 3.如果是指定了候选人且任务为多实例,则成员数及未完成数初始化总数;
func (*DbExport) GetDecisionReqDef ¶
func (e *DbExport) GetDecisionReqDef(ctx context.Context, req *api.GetDecisionReqDefRequest) (*ent.DecisionReqDef, error)
func (*DbExport) GetGroupIDs ¶
func (e *DbExport) GetGroupIDs(ctx context.Context, req *api.GetGroupIDsRequest) (*api.GetGroupIDResponse, error)
func (*DbExport) GetGroupUsers ¶
func (e *DbExport) GetGroupUsers(ctx context.Context, req *api.GetGroupUserRequest) (*api.GetGroupUserResponse, error)
func (*DbExport) GetProcDef ¶
func (*DbExport) GetUserIDs ¶
func (e *DbExport) GetUserIDs(ctx context.Context, req *api.GetUserIDsRequest) (*api.GetUserIDResponse, error)
GetUserIDs 根据用户名称获取用户ID
type Definition ¶
Definition temporal workflow definition.
func (*Definition) BPMNWorkflowDef ¶
func (def *Definition) BPMNWorkflowDef(ctx workflow.Context, pi api.InstanceRequest) error
BPMNWorkflowDef is entry point of workflow.
type Service ¶
type Service struct { Db *ent.Client Client client.Client TaskQueue string WorkflowType string // 资源根目录 ResourceDir string }
func NewService ¶
func NewService(cnf *conf.AppConfiguration) (*Service, error)
func (*Service) BuildEngine ¶
BuildEngine 构建流程引擎
func (*Service) CreateAndRunProcessInstance ¶
func (s *Service) CreateAndRunProcessInstance(ctx context.Context, input model.StartProcessInput) (wfr *types.WorkflowRun, err error)
CreateAndRunProcessInstance 启动流程实例,如果实例已经在执行过程则返回工作流ID,否则将创新流程.对于调用方需要控制状态.
Click to show internal directories.
Click to hide internal directories.