近来因为项目需要,我也参与了jbmp的工作流的开发,底层java代码开发就参与不多,主要做了一个流程展示器。网上看了一下其他朋友的流程编辑器,感觉效果不错。但是总觉得差点什么,真实的jbpm流程编辑效果出不来。flex做为现在pc端成熟的解决方案,不过太少人开发到一个成熟和功能全面的流程编辑器。
首先看看我展示的效果:
xml数据源的设计:
<?xml version="1.0" encoding="UTF-8"?><process name="IncidentProcess"> <start g="276,12,136,52"> <transition to="evaluatePosition" /> </start> <decision g="276,84,48,48" name="evaluatePosition" > <transition g="-76,-22" name="toLeaderFirstApprove" to="leaderFirstApprove" description="职位<正科"> <condition expr="#{owner.dutyId>3}"/> </transition> <transition g="-88,-22" name="toTechAccept" to="techAccept" description="职位>=正科"/> </decision> <task assignee="#{leader}" g="462,135,86,52" name="leaderFirstApprove" description="科长审批"> <transition g="-88,-22" name="toTechAccept" to="techAccept" description="同意"/> <transition g="-78,-22" name="toEndReject" to="endReject" description="退回"/> </task> <task candidate-groups="tech-dept" g="47,180,95,52" name="techAccept" description="技术科受理"> <transition g="-117,-22" name="toEvaluateExpense" to="evaluateExpense" description="费用预算"/> </task> <decision g="279,305,136,52" name="evaluateExpense"> <transition g="-76,-22" name="toLeaderSecondApprove" to="leaderSecondApprove" description="费用>0且职位<正科"> <condition expr="#{expense>0 && owner.dutyId>3}"/> </transition> <transition g="-93,-22" name="toTechLeaderApprove" to="techLeaderApprove" description="费用>0且职位>=正科"> <condition expr="#{expense>0 && owner.dutyId<3}"/> </transition> <transition g="-81,-22" name="toTechHandle" to="techHandle" description="费用=0"/> </decision> <task assignee="#{leader}" g="465,261,86,52" name="leaderSecondApprove" description="科长审批"> <transition g="88,22" name="toTechLeaderApprove" to="techLeaderApprove" description="同意"/> <transition g="-78,-22" name="toEndReject" to="endReject" description="退回"/> </task> <task assignee="#{techLeader}" g="462,365,98,52" name="techLeaderApprove" description="技术科长审批"> <transition g="-93,-22" name="toFinanceLeaderApprove" to="financeLeaderApprove" description="同意"/> <transition g="-78,-22" name="toEndReject" to="endReject" description="退回"/> </task> <task assignee="#{financeLeader}" g="465,485,98,52" name="financeLeaderApprove" description="计财科长审批"> <transition g="-142,-52" name="toEvaluateExpensive" to="evaluateExpensive" description="同意"/> <transition g="-78,-22" name="toEndReject" to="endReject" description="退回"/> </task> <decision g="289,477,136,52" name="evaluateExpensive"> <transition g="-81,-22" name="toPresidentApprove" to="presidentApprove" description="费用>=500"> <condition expr="#{expense>=500}"/> </transition> <transition g="-81,-22" name="toTechHandle" to="techHandle" description="费用<500"/> </decision> <task assignee="#{president}" g="473,641,91,52" name="presidentApprove" description="检察长审批"> <transition g="-81,-22" name="toTechHandle" to="techHandle" description="同意"/> <transition g="-78,-22" name="toEndReject" to="endReject" description="退回"/> </task> <task candidate-groups="tech-dept" g="42,480,101,52" name="techHandle" description="技术科处理"> <transition g="-81,-22" name="toApplyerConfirm" to="applyerConfirm" /> </task> <task candidate-groups="#{owner.account}" g="41,603,104,52" name="applyerConfirm" description="申请人确认" > <transition g="-61,-22" name="toEndOK" to="endOK" description="结束"/> </task> <end g="70,718,136,52" name="endOK"/> <end g="680,320,136,52" name="endReject"/></process>
flex如果只是做展示就太失败了。
第一,jbpm是一个自定义工作流的开发组件,flex因为为jbpm的流程做出自定义效果,可以实施工程师现场实施并且部署相关适合用户的工作流;
第二,flex应该要承担一个巨大的工作任务,就自定form的操作,因为自定义表单是一个工作流最核心的部分,我们要学会利用flex定位和定义自定义表单,并且执行相关操作;
第三,flex应该具备更加强大的交互性,可以做出播放,或者更多效果;
第四,做出多流程互动的效果;