[jboss-jira] [JBoss JIRA] (DROOLS-5486) CEP doesn't evaluate correctly when a bind variable is used as the first temporal parameter in executable model
Toshiya Kobayashi (Jira)
issues at jboss.org
Thu Aug 6 05:19:00 EDT 2020
[ https://issues.redhat.com/browse/DROOLS-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Toshiya Kobayashi updated DROOLS-5486:
--------------------------------------
Story Points: 5 (was: 3)
> CEP doesn't evaluate correctly when a bind variable is used as the first temporal parameter in executable model
> ---------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-5486
> URL: https://issues.redhat.com/browse/DROOLS-5486
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.39.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> With the below test, standard-drl fires but executable-model doesn't.
> {code:java}
> @Test
> public void testAfterOnLongFields2() throws Exception {
> String str =
> "import " + StockTick.class.getCanonicalName() + ";\n" +
> "declare StockTick @timestamp(timeFieldAsLong) end\n" +
> "rule R when\n" +
> " $a : StockTick( company == \"DROO\" )\n" +
> " $b : StockTick( company == \"ACME\", $a.timeFieldAsLong after[5,8] timeFieldAsLong )\n" +
> "then\n" +
> " System.out.println(\"fired\");\n" +
> "end\n";
> KieSession ksession = getKieSession(getCepKieModuleModel(), str);
> SessionPseudoClock clock = ksession.getSessionClock();
>
> ReteDumper.dumpRete(ksession);
> ksession.insert( new StockTick( "ACME" ).setTimeField( 0 ) );
> ksession.insert( new StockTick( "DROO" ).setTimeField( 6 ) );
> assertEquals( 1, ksession.fireAllRules() );
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list