ruleEventProcessingType=STREAM not working with DRL resource from Gunvor
by mredhat
Platform:JBoss SOAP 5.2 for ESB deploymetn with BRMS Standalone 5.3 for
authoring and retrieving rules from Guvnor.I am executing CEP logic with the
BusinessRulesProcess ESB aciton. I pass it the following
properties:<property name="<b>ruleAgentProperties*"
value="kie-agent/ChangeSet.xml" /><property
name="ruleEventProcessingType" value="<b>STREAM*" />where
the ChangeSet.xml is as below. If I use the file-based url for the DRL
resource shown below, my CEP logic :not $rp2: DataResponse(id== "CEP-001",
this after [2m] $rq) from entry-point "Event Processing stream"works as
expected. However, if I pull the DRL resource from Guvnor using the http
resource below, this rule fires immediately as if the
ruleEventProcessingType of STREAM is being ignored.If you notice, I am using
the LATEST.drl and not LATEST.pkg do to an issue that seemed to be related
to different versions of MVEL from my SOA server and the BRMS server hosting
Guvnor. For what I am trying to test I hoped this would be an acceptable
workaround. I thought the SOA server would now parse the rules obtained
from Guvnor in the same way as when they are file based (i.e, same runtime
MVEL, drools core, etc.) If anyone has had a similar problem or see
something glaringly wrong please let me know!ChangeSet.xml:
--
View this message in context: http://drools.46999.n3.nabble.com/ruleEventProcessingType-STREAM-not-work...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
Tracking documentation changes
by Edson Tirelli
As we approach final release, many of us will be working on
documentation. I would like to ask anyone committing changes to docs to use
the BZ-916448 on your commit message to make it easier to track these
commits.
Thank you
--
Edson Tirelli
Principal Software Engineer
Red Hat Business Systems and Intelligence Group
11 years, 4 months
How to set drools.dialect.mvel.strict = false?
by jeetendray
Hi,
Snippet of my DRL .
rule "Rev: Start Time < 2 Hours in Future"
when
$obj : eval(compareDatesWithTime(startDateTime, -2, 2, "<"))
then
$obj.addFailedRule("Rev: Start Time < 2 Hours in Future");
end
This fails during compilation and throws error:
org.drools.rule.InvalidRulePackage: Unable to Analyse Expression
(eval(compareDatesWithTime(startDateTime, -2, 2, "<")) ):
[Error: unable to resolve method using strict-mode: myObject.eval(boolean)]
[Near : {... (eval(compareDatesWithTime(star ....}]
^
[Line: 6, Column: 2] : [Rule name='Proposal - Start time is after current +
2 hour']
I am using Drools 5.5 and I found the cause that my code runs in strict
mode.. so If I set strict mode to false then this would work. Now I am not
sure how to make it to false.
Here's the code I am using:
PackageBuilderConfiguration packageBuilderConfiguration = new
PackageBuilderConfiguration();
PackageBuilder packageBuilder = new
PackageBuilder(packageBuilderConfiguration);
packageBuilder.addPackageFromDrl(drl.getCharacterStream());
Can someone please suggest me how to do that??
Thanks!!!
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-set-drools-dialect-mvel-strict-f...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
Guvnor 5.5 POJO upload error when there is dependency
by maunakea
Guvnor 5.5.0 on Tomcat 7
I have 2 model jars:
x.jar
y.jar
Both contain our domain pojos. y.jar does not have any dependencies. x.jar
has a reference to a class in y.jar
When I upload y.jar, no errors
When I upload x.jar after y.jar is already uploaded, I get this error for
the class that is in y.jar
Caused by: java.lang.NoClassDefFoundError: com/classFromY.jar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at
org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:85)
at
org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:103)
at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
at
org.drools.guvnor.server.contenthandler.ModelContentHandler.isClassVisible(ModelContentHandler.java:184)
at
org.drools.guvnor.server.contenthandler.ModelContentHandler.getImportsFromJar(ModelContentHandler.java:149)
at
org.drools.guvnor.server.contenthandler.ModelContentHandler.onAttachmentRemoved(ModelContentHandler.java:87)
at
org.drools.guvnor.server.RepositoryAssetService.archiveOrUnarchiveAsset(RepositoryAssetService.java:489)
Due to project/organization, I am not able to merge both jars.
So question...
Does the Guvnor pojo jar require that it cannot have any dependencies
outside the jar? even if the other jar is also uploaded?
thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-5-POJO-upload-error-when-there...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
Manage dynamically rules in KnowledgeBase
by tiahdomoina
Hello :)
How can I manage dynamically rules in KnowledgeBase ? I mean remove, add or
update rules without rebuilding a new KnowledgeBase or a new
KnowledgeSession. Is it possible ?
I tried with a basic example:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("rule.DRL"),
ResourceType.DRL);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
// insertion of facts
ksession.fireAllRules();
kbase.removeRule("package", "myRule");
ksession.fireAllRules();
But the rules don't seem to be fired the second time. I also tried to create
a new session but the result is the same.
I don't wanna use a KnowledgeAgent because the modification of the rules is
not very frequent.
But when there is one, it has to be applied immediately and shouldn't wait
for the interval of time of the scan.
If anyone has an idea :)
Thank you !
--
View this message in context: http://drools.46999.n3.nabble.com/Manage-dynamically-rules-in-KnowledgeBa...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months