[jboss-jira] [JBoss JIRA] (DROOLS-1416) DRL Dumper Not Printing the content of ConditionalBranch
Mario Fusco (JIRA)
issues at jboss.org
Fri Jan 20 02:42:00 EST 2017
[ https://issues.jboss.org/browse/DROOLS-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13351453#comment-13351453 ]
Mario Fusco commented on DROOLS-1416:
-------------------------------------
We don't provide patch releases for community projects. This fix will be available with Drools 7.
> 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
> Fix For: 7.0.0.CR1
>
>
> 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