[jboss-jira] [JBoss JIRA] (DROOLS-1416) DRL Dumper Not Printing the content of ConditionalBranch
Siyad Theyparambil Mohammed (JIRA)
issues at jboss.org
Thu Jan 19 11:11:00 EST 2017
Siyad Theyparambil Mohammed created DROOLS-1416:
---------------------------------------------------
Summary: DRL Dumper Not Printing the content of ConditionalBranch
Key: DROOLS-1416
URL: https://issues.jboss.org/browse/DROOLS-1416
Project: Drools
Issue Type: Bug
Components: tools
Affects Versions: 6.4.0.Final
Reporter: Siyad Theyparambil Mohammed
Assignee: Mario Fusco
Priority: Blocker
While trying to use conditionalbranch api for handling multiple if-then blocks, the DRL dumper is not printing the content we have used for conditionalbranch. Please find the sample code below and the restuls
*+Code+*
PackageDescr pkg = DescrFactory.newPackage()
.name( "org.drools.compiler" )
.newRule().name( "test" )
.lhs()
.pattern("Cheese").constraint( "type == \"stilton\"" ).end()
.conditionalBranch()
.condition().constraint("price < 10").end()
.consequence().name("c1").end()
.end()
.pattern("Cheese").constraint( "type == \"cheddar\"" ).end()
.conditionalBranch()
.condition().constraint("price > 10").end()
.consequence().name("c2").end()
.end()
.end()
.rhs( "// do something" )
.namedRhs( "c1", "// do something else\n" )
.end()
.getDescr();
return new DrlDumper().dump( pkg );
*+Output+*
package org.drools.compiler
rule "test"
when
Cheese( type == "stilton" )
Cheese( type == "cheddar" )
then
// do something
then[c1]
// do something else
end
In the above example the content "price < 10" and "price > 10" which we have used for conditionalBranch is not getting printed. On further investigation we found the drl.mvel template does not have the import org.drools.compiler.lang.descr.ConditionalBranchDescr.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list