コード例 #1
0
 /// <summary>
 /// 根据工作流名称创建一个过程对象
 /// </summary>
 /// <param name="workflowName">工作流名称</param>
 /// <param name="rules">审批规则</param>
 /// <param name="userIdentity">用户省份</param>
 public ApprovalProcess(string workflowName, IApprovalRules rules, IUserIdentity userIdentity)
 {
     this.approvalService        = WorkflowRuntime.Current.GetService <IApprovalSaveService>();
     this.workflowPersistService = WorkflowRuntime.Current.GetService <IWorkflowPersistService>();
     this.workflow     = (StateMachineWorkflow)WorkflowRuntime.Current.GetService <IWorkFlowDefinePersistService>().GetWorkflowDefine(workflowName);
     this.rules        = rules;
     this.userIdentity = userIdentity;
     this.unitCode     = userIdentity.GetUserUnitCode();
     this.userId       = userIdentity.GetUserId();
 }
コード例 #2
0
 /// <summary>
 /// 根据工作流名称创建一个过程对象
 /// </summary>
 /// <param name="workflowName">工作流名称</param>
 /// <param name="rules">审批规则</param>
 /// <param name="userIdentity">用户省份</param>
 public CNPCApprovalProcess(string workflowName, IApprovalRules rules, IUserIdentity userIdentity)
     : base(workflowName, rules, userIdentity)
 {
 }