在JBPM4.3中,如何将流程与规则器(drools)结合一起?如何部署。
<?xml version="1.0" encoding="UTF-8"?>
<process name="RulesDecision"> <start>
<transition to="isImportant" />
</start> <rules-decision name="isImportant">
<transition name="dunno" to="analyseManually" />
<transition name="important" to="processWithPriority" />
<transition name="irrelevant"
to="processWhenResourcesAvailable" />
</rules-decision> <state name="analyseManually" />
<state name="processWithPriority" />
<state name="processWhenResourcesAvailable" /></process>
程序为啥就在rules-decision节点,无法再继续了?其中执行到
/**
* @author Tom Baeyens
*/
public class RulesDecisionActivity extends JpdlActivity { private static final long serialVersionUID = 1L; public void execute(ActivityExecution execution) throws Exception {
String deploymentId = ((ExecutionImpl)execution).getProcessDefinition().getDeploymentId();
KnowledgeBase knowledgeBase = RulesDeployer.getKnowledgeBase(deploymentId); StatelessKnowledgeSession knowledgeSession =
knowledgeBase.newStatelessKnowledgeSession();
ExecutionGlobals executionGlobals = new ExecutionGlobals(execution);
knowledgeSession.getGlobals().setDelegate(executionGlobals);
knowledgeSession.execute(execution);
if (!executionGlobals.getOutcome().isDefined()) {
execution.takeDefaultTransition();
} else {
execution.take(executionGlobals.getOutcome().get());
}
}
}这里时KnowledgeBase knowledgeBase = RulesDeployer.getKnowledgeBase(deploymentId);为空。有知道的朋友么?
<?xml version="1.0" encoding="UTF-8"?>
<process name="RulesDecision"> <start>
<transition to="isImportant" />
</start> <rules-decision name="isImportant">
<transition name="dunno" to="analyseManually" />
<transition name="important" to="processWithPriority" />
<transition name="irrelevant"
to="processWhenResourcesAvailable" />
</rules-decision> <state name="analyseManually" />
<state name="processWithPriority" />
<state name="processWhenResourcesAvailable" /></process>
程序为啥就在rules-decision节点,无法再继续了?其中执行到
/**
* @author Tom Baeyens
*/
public class RulesDecisionActivity extends JpdlActivity { private static final long serialVersionUID = 1L; public void execute(ActivityExecution execution) throws Exception {
String deploymentId = ((ExecutionImpl)execution).getProcessDefinition().getDeploymentId();
KnowledgeBase knowledgeBase = RulesDeployer.getKnowledgeBase(deploymentId); StatelessKnowledgeSession knowledgeSession =
knowledgeBase.newStatelessKnowledgeSession();
ExecutionGlobals executionGlobals = new ExecutionGlobals(execution);
knowledgeSession.getGlobals().setDelegate(executionGlobals);
knowledgeSession.execute(execution);
if (!executionGlobals.getOutcome().isDefined()) {
execution.takeDefaultTransition();
} else {
execution.take(executionGlobals.getOutcome().get());
}
}
}这里时KnowledgeBase knowledgeBase = RulesDeployer.getKnowledgeBase(deploymentId);为空。有知道的朋友么?
解决方案 »
- StringBuffer.append里的斜杠是做什么用的?
- 支付宝接口的疑问
- [求助]Eclipse调试模式下,如何观察request的parameterMap?
- 在同一个jsp页面提交表单并将数据显示
- [200分]如何能把jsp页面textarea输入框中输入内容的回车和段前的空格[排版]在提交后都保存到数据库[急等]
- 网页中数据库的换行问题
- 用户登录
- 在cmd编辑器中用java运行已编译的文件运行不成功怎样解决
- 大家帮看看,请教一个关于WEB应用中用APPLET做数据录入和用JSP做数据录入的可行性比较问题!
- 怎么这段代码在tomcat3.2中完全正确,但是在tomcat4.0中会报空指针错误呢???
- <error-page>乱码
- 各位!我刚学ABAP怎么才能在半个月左右熟悉好呀!
addResourceFromClasspath("isImportant.drl")