工作流流程条件配置

① 工作流流程环节 组合条件配置:

 

1. SELECT  NAME FROM owf_mgr.wf_item_types_tl查出该项目对应的编码

 

2. 在wf_amber.indysp_cond_type中插入一条记录,cond_type为上面查出的NAME

 

3.添加一个流程条件:

    insert into wf_amber.indysp_cond_common (ORG_NO, COND_TYPE, COND_SQL, COND_NAME, COND_ID)

values ('', '85', 'UNCONDITIONAL_JUMP', '无条件跳转发送', -1);

 

4.后台维护 流程条件设置,需要维护两张表,例子如下:

  ①:插入indysp_cond_main 主表:

insert into wf_amber.indysp_cond_main (COND_ID, ORG_NO, COND_TYPE, PROCESS_NO, ACT_NAME, COND_SQL, COND_NAME, COND_MAIN_TAB, PROCESS_TYPE, COND_LEVEL, SET_COND_ORG_NO, EXEC_INDEX)

values (7001, '33101', '85', '8503', '市专责审核', 'UNCONDITIONAL_JUMP', '无条件跳转发送', '', '85', 2, '33101', 1);


insert into wf_amber.indysp_cond_main (COND_ID, ORG_NO, COND_TYPE, PROCESS_NO, ACT_NAME, COND_SQL, COND_NAME, COND_MAIN_TAB, PROCESS_TYPE, COND_LEVEL, SET_COND_ORG_NO, EXEC_INDEX)

values (7002, '33101', '85', '8503', '省专责审核', 'UNCONDITIONAL_JUMP', '无条件跳转发送', '', '85', 2, '33101', 1);


insert into wf_amber.indysp_cond_main (COND_ID, ORG_NO, COND_TYPE, PROCESS_NO, ACT_NAME, COND_SQL, COND_NAME, COND_MAIN_TAB, PROCESS_TYPE, COND_LEVEL, SET_COND_ORG_NO, EXEC_INDEX)

values (6504, '33101', '85', '8503', '市主任审核', 'UNCONDITIONAL_JUMP', '无条件跳转发送', '', '85', 2, '33101', 1);

 

  ②插入indysp_cond_dept 从表(此表就是指流程环节的权限分配给某个部门):

 

insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (6008, '33101', '0000003619', '33101');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (6008, '33101', '0000017637', '33401');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (6008, '33101', '0000023007', '33402');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (6501, '3340250', '0000023007', '33402');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (6502, '33101', '0000026681', '33401');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (6502, '33101', '0000023007', '33402');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (6504, '33101', '0000026681', '33401');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (7001, '33101', '0000017637', '33401');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (7001, '33101', '0000026685', '33401');


insert into wf_amber.indysp_cond_dept (COND_ID, ORG_NO, COND_DEPT_NO, COND_ORG_NO)

values (7002, '33101', '0000003619', '33101');

 

其中流程发起成功,出现wf_amber.indywf_worklist_cur 和 wf_amber.indysp_task_user_cur同一个工单的taskID不一致的错误,并且发送失败提示:ProccessNoUser的异常时,可能是因为以下原因:

indysp_cond_dept 中所分配的部门,在相应的v_o_dept或者v_o_org中不存在。

 

 

5.通过流程环节的权限条件设置,将流程条件分配给某个部门。查看环节权限是否分配成功(查到记录则成功):

 

SELECT *

  FROM wf_amber.indysp_cond_main t

 WHERE t.org_no ='3340250' ---流程管理单位

       AND t.process_type ='85'---流程分类

       AND t.process_no = '8503'---流程编号

       AND t.act_name like  '%市专责%'---环节中文名称

 ORDER BY t.cond_level, t.exec_index; 

 

② 查看当前流程环节某用户是否有操作权限:

 

 一:SELECT a.* FROM wf_amber.indysp_task_user_cur a WHERE  a.app_no ='120817008001' AND a.ta1skid='342'; --indysp_task_user_cur 当前环节的处理用户

 

二:SELECT * FROM amber.indy_user_action a WHERE a.user_name ='00181199A' AND  a.action_name='/pmbs/idxSystem/data/zjCountyIndexApp.do?action=audit4CityExpert'  ;

  --indy_user_action 用户的操作权限

两个都查到相同用户的权限,则说明此用户确实有处理权限。

 

查看用户的单位和部门信息:

 

select a.* from sgpm.p_sys_user a WHERE a.org_no IN(SELECT b.ORG_NO FROM sgpm.o_org  b  

      start with b.org_no = '33101' 

  connect by b.p_org_no = prior b.org_no )

  AND a.user_name like '%陈芳%';

 

你可能感兴趣的:(工作流)