對(duì)于spring-modules-jbpm31對(duì)jbpm的支持。我開(kāi)篇就想說(shuō)一個(gè)"暈"字??赐炅藄pringmodules自己的說(shuō)明文檔。進(jìn)行配置后。再查看源碼。發(fā)現(xiàn)很多配置華而不實(shí)。比如:jbpmTemplate的配置。
bean id="jbpmTemplate" class="org.springmodules.workflow.jbpm31.JbpmTemplate">
<constructor-arg index="0" ref="jbpmConfiguration"/>
<constructor-arg index="1" ref="websaleWorkflow"/>
</bean>
而且jbpmTemplate對(duì)獲取jbpmcontext的封裝做的不好。在web程序里面??偸菚?huì)出現(xiàn)錯(cuò)誤。不是session關(guān)閉就是session不能提交。獲取不能很好的獲取流程對(duì)象。
個(gè)還好。還有地方需要部署的文件根本就沒(méi)部署上去
<bean id="websaleWorkflow" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean">
<property name="definitionLocation" value="classpath:com/telemd/jbpm/processdefinition.xml"/>
</bean>
這里只部署了配置文件。圖形文件沒(méi)有部署上去。結(jié)果流程圖根本顯示不出來(lái)。調(diào)試了好久。
不過(guò)整體來(lái)說(shuō)還有一點(diǎn)好處是:
<handler config-type="bean" class="org.springmodules.workflow.jbpm31.JbpmHandlerProxy">
<targetBean>aduitDecide</targetBean>
<factoryKey>jbpmConfiguration</factoryKey>
</handl>
可以把jbpm的action類(lèi)、handle類(lèi)。通過(guò)spring容器來(lái)管理。而不是直接部署到數(shù)據(jù)庫(kù)端??梢愿玫母鷺I(yè)務(wù)相結(jié)合