关于传阅

WikeFlow2.0演示地址:http://workflow2.wikesoft.com

你可以将某条流程传阅给某个人


  WikeFlow2.0 传阅



  传阅代码

 parms.UserId = User.Identity.GetLoginUserId().ToUpper();
 parms.UserName = User.Identity.GetTrueName();
 InstanceMessage message = _workFlowInstanceService.WorkflowCirculate(parms);


  CirculateParms

using System.Collections.Generic;
using WikeSoft.WorkFlowEngine.Models;

namespace WikeSoft.WorkFlowEngine.Parms
{
    /// <summary>
    /// 流程传阅参数
    /// </summary>
    public class CirculateParms
    {
        /// <summary>
        /// 流程实例ID
        /// </summary>
        public string InstanceId { get; set; }

        /// <summary>
        /// 转办目标用户列表
        /// </summary>

        public List<ExecUser> TargetUsers { get; set; }

        /// <summary>
        /// 审批语
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 当前处理用户Id
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// 当前处理用户名称
        /// </summary>
        public string UserName { get; set; }
    }
}

提示:传阅、转办调用的是存储过程Proc_AllUser,你需要定义该存储过程,该存储过程返回你业务系统的用户列表。

SQL Server
CREATE PROC Proc_AllUser
@instanceId VARCHAR(50),--实例Id
@userId VARCHAR(50),--当然用户ID
@query VARCHAR(50)--查询条件
AS
BEGIN
	    
        SELECT Id AS UserId,TrueName AS  UserName FROM Sys_User WHERE  UserName LIKE @query
END

MySQL

CREATE PROCEDURE Proc_AllUser(in p_instanceId VARCHAR(50),in p_userId VARCHAR(50),in p_query VARCHAR(50)) 
BEGIN 
	SELECT Id AS UserId,TrueName as UserName FROM Sys_User where TrueName like p_query;   
END

Oracle

CREATE OR REPLACE PROCEDURE PROC_ALLUSER
(
  P_INSTANCEID IN VARCHAR2
, P_USERID IN VARCHAR2
, P_QUERY IN VARCHAR2
,V_CUR out sys_refcursor
) AS
BEGIN
 open V_CUR for  SELECT Id AS UserId,TrueName AS  UserName FROM Sys_User WHERE  UserName LIKE P_QUERY;
END PROC_ALLUSER;