HUI LIU [
http://community.jboss.org/people/brianlh] created the discussion
"Re: why to use drools rules and not Java code?"
To view the discussion, visit:
http://community.jboss.org/message/581512#581512
--------------------------------------------------------------
In fact, in the source code of krisv-jbpm, I find the test code about Java constraint and
MVEL(rule) constraint in
jbpm-flow-build/src/test/java/org/jbpm/integrationtests/processSplitTest.java, in this
file, there is no difference between MVEL constraint and java constraint, see
public void testSplitWithMVELContextConstraint() and
public void testSplitWithJavaContextConstraint()
the two kinds of constraints are the same:
in the first function:
<constraint toNodeId="6" toType="DROOLS_DEFAULT"
priority="1" type="code" dialect="*mvel*" >return
context.getVariable("name") != null && ((String)
context.getVariable("name")).length() > 0;</constraint>
in the second function:
<constraint toNodeId="6" toType="DROOLS_DEFAULT"
priority="1" type="code" dialect="*java*" >return
context.getVariable("name") != null && ((String)
context.getVariable("name")).length() > 0;</constraint>
I don't know why?
By the way, in this test case file, there is also the comparison between context and
kcontext, I don't know their difference and in the testcase file, their only
difference is their name. Can you explain it?
Thanks.
Hui
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/581512#581512]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]