How do I insert into an entry point on RHS?
From Mastering JBoss Drools 6 book
rule "Routing.."
when
...
then entryPoints["Stream Y"].insert(t)
end
I'm trying to make this work using Drools 7 but I get an error Unable to build KieBaseModel
.
EDIT: Full message:
Unable to Analyse Expression drools.entryPoints["Stream Y"].insert(t);:
[Error: unable to resolve method using strict-mode: org.drools.core.spi.KnowledgeHelper.entryPoints()]
[Near : {... drools.entryPoints["Stream Y"].insert ....}]
Note: I've not defined any global called entrypoints
.
Apparently, the entryPoints
automagic variable is not there anymore in Drools 7.
You can try something like this though:
rule "Routing.."
when
...
then
drools.getEntryPoint("Stream Y").insert(t)
end
Hope it helps,