码迷,mamicode.com
首页 > 其他好文 > 详细

流向过滤

时间:2014-07-07 11:48:00      阅读:377      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   java   color   数据   

1.通过配置数据字典进行流向的过滤

(1)字典表中增加【bpm_transition_rule】

  字典项表中增加净值总额字典项【total_money】

(2)流程图中在流向上(通常是两个以上流向)配置逻辑运算

bubuko.com,布布扣

表示当净值总额大于100时候显示该流向,如果配置两个维度则不用写值了,两个维度如果都配置值表示两个维度进行比较来进行逻辑运算

该值在页面隐藏域中进行传递,隐藏域中传值  就是拿定义好的数据字典项的CODE值 作为隐藏域的 name属性 ,例如:

<div id="bizArgs">
	<input type="hidden" id="TOTAL_MONEY" name="TOTAL_MONEY" value="${BaseForm.money}" /><!-- 净值总额 -->
</div>

 


 

2. 通过自定类进行流向过滤

(1)增加过滤器继承TransitionFilter 并覆盖filter方法,在该方法中获得业务id,通过业务id判断应该返回下一节点的名字,参考代码

public class SupTrans implements TransitionFilter {

    @Override
    public String[] filter(TransitionFilterInfo arg0) {
        FASWorkflowlService fasWorkflowlService =(FASWorkflowlService) SpringBeanFactory.getBean("fasWorkflowlService");
        SupplierService supplierService = (SupplierService) SpringBeanFactory.getBean("supplierService");
        String businessId = "";
        String orderType = "";
        try {
            JbpmWorkflowHistory his = WorkflowServiceUtil.getJbpmWorkflowHistory(arg0.getProcessInstanceId(), arg0.getTaskInstanceId());
             businessId = his.getBusinessId();
             orderType = his.getOrderType();
        } catch (Exception e) {
            e.printStackTrace();
        }
        WorkOrder oper = fasWorkflowlService.getWorkOrderByWoNo(orderType,businessId);
        String impDeg = supplierService.findByPrimaryKey(oper.getBusinessId()).getImportanceDegree();
        if("1".equals(impDeg)){
            return new String[]{"采购部审批"};
        }
        return new String[]{"财务部审批"};
    }
}

(2)数据字典配置过滤器

字典表中增加字典【bpm_transition_class】

字典项表中增加

insert into arch_dic_item (RID, KIND, CODE, PARENT_ID, DETAIL, SPELL, WHOLE_SPELL, REMARK, SORT, FLAG, CREATED_BY, LAST_UPDATED_BY, CREATED_DATE, LAST_UPDATED_DATE, CUST_TEXT01, CUST_TEXT02, CUST_TEXT03, CUST_TEXT04, CUST_TEXT05, CUST_TEXT06, CUST_TEXT07, CUST_TEXT08, CUST_TEXT09, CUST_NUMBER01, CUST_NUMBER02, CUST_DATE01, CUST_DATE02)
values (‘402886ef449521a30144969d7d99000d‘, ‘bpm_transition_class‘, ‘com.pccw.business.fas.supplier.filter.SupTrans‘, ‘‘, ‘供应商重要程度判断‘, ‘‘, ‘‘, ‘‘, 0, ‘Y‘, ‘1‘, ‘2c9082c2454ebaab01454ecbcbfe031c‘, ‘06-3月 -14 04.58.27.609000 下午‘, ‘28-4月 -14 05.57.41.968000 下午‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, null, null, ‘‘, ‘‘);

 (3)流程图中配置数据字典

 bubuko.com,布布扣

流向过滤,布布扣,bubuko.com

流向过滤

标签:style   blog   http   java   color   数据   

原文地址:http://www.cnblogs.com/rigid/p/3820288.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!