[rules-users] Deactivate rule automatically activated via KnowledgeAgent

2012-04-20 Thread FlyingEagle
Hi,

I want to adminstrate and deploy my rules with Guvnor. The deployment is
done with a binary file (.pkg). On my target system, a KnowledgeAgent with
defned change-set is running and activates automatically the rules defined
in the pkg file. Up to this point everything is fine.

How can I  now deactivate a rule (remove it from the KnowledgeBase)?
Is there a standard mechanism available to undeploy via Guvnor?
Or must I deploy a new pkg file, which does not contain the rule to be
deactivated?
Are rules automatically deactivated, when the pkg file is deleted on the
target system?
Is this an approach for solution?
 
What is the best way to solve the problem?

Thanks a lot for your help! 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Deactivate-rule-automatically-activated-via-KnowledgeAgent-tp3925302p3925302.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Problem with logging using Drools 5.3.0

2012-04-24 Thread FlyingEagle
Hello,

I am debugging my drools application with Eclipse. Using Drools runtime
5.1.0 I've got automatically log entries from Drools on the console window.
Now I am using the 5.3.0 runtime and no log entries are available.
I have defined a log4j.properties and put it in the classpath. As trace
level I have defined ALL.
Own log entries are produced and shown on the console, but no entries from
Drools are shown.

Has anybody an idea, what I can do to get the log entries?

Thx 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-logging-using-Drools-5-3-0-tp3934918p3934918.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problem with logging using Drools 5.3.0

2012-04-24 Thread FlyingEagle
Thx Ingo for your reply, but logging with KnowledgeRuntimeLogger is not my
problem.
This works fine.

Drools itself uses log4j for logging of its activites. These log entries are
very helpful for analyzing, what happens in Drools.

For example, I had the following output with the runtime 5.1.0, while
creating a new KnowledgeAgent:
[2012:04:115 14:04:889:info] ResourceChangeNotification created
[2012:04:115 14:04:889:info] ResourceChangeScanner created with default
interval=60
[2012:04:115 14:04:889:debug] ResourceChangeNotification monitor added
monitor=org.drools.io.impl.ResourceChangeScannerImpl@7f5580
[2012:04:115 14:04:889:debug] KnowledgeAgent building resource map
[2012:04:115 14:04:889:info] KnowledgeAgent created, with configuration:
monitorChangeSetEvents=true scanResources=true scanDirectories=true
newInstance=true
[2012:04:115 14:04:889:info] KnowledegAgent has started listening for
ChangeSet notifications

Using now the runtime 5.3.0 I have no such entries anymore.






--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-logging-using-Drools-5-3-0-tp3934918p3935165.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problem with logging using Drools 5.3.0

2012-04-25 Thread FlyingEagle
Thx, Mark for your advice.
I use my own implementation of SystemEventListener now, which uses the log4j
Logger for logging.
This works fine.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-logging-using-Drools-5-3-0-tp3934918p3937481.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Guvnor - validate a rule results in "Unable to Analyse Expression"

2012-04-25 Thread FlyingEagle
Hi folks,

I have defined some rules in Eclipse and tested with JUnit tests and
everything was fine.
Now I defined the rules in Guvnor and while validating I get the following
error:

[CardTrapping] Unable to Analyse Expression Fraud fraud = new
Fraud(Fraud.CARD_TRAPPING, new SSTEvent[] { $event1, $event2, $event3,
$event4 }); fraudControl.handleFraud(fraud);: [Error: expected type:
com.wn.fraud.droolstest.model.SSTEvent; but found:
com.wn.fraud.droolstest.model.SSTEvent] [Near : {... SSTEvent[] { $event1,
$event2, $event3, $event4 }) }] ^ [Line: 1, Column: 70]

I have imported my data model, before creating the rules, therefor for the
type SSTEvent an import is defined. But it seems, that the type SSTEvent
exists with different versions?

I have this problem for each rule, when I'm using the SSTEvent type in the
"then" case.

Here the complete rule defintion:

package com.wn.fraud.droolstest

import com.wn.fraud.droolstest.model.Fraud;
import com.wn.fraud.droolstest.model.FraudControl;
import com.wn.fraud.droolstest.model.SSTEvent;

global FraudControl fraudControl;

rule "CardTrapping"
when
$event1 : SSTEvent ( eventNumber == SSTEvent.CARD_JAMMED ) from
entry-point "device-event-stream"
$event2 : SSTEvent ( this after [ 0s, 30s ] $event1, 
 eventNumber == SSTEvent.IN_SERVICE,
 deviceId == $event1.deviceId,
 branchName == $event1.branchName ) from entry-point
"device-event-stream"
$event3 : SSTEvent ( this after [ 0s, 30s ] $event2, 
 eventNumber == SSTEvent.CARD_JAMMED,
 deviceId == $event1.deviceId,
 branchName == $event1.branchName ) from entry-point
"device-event-stream"
$event4 : SSTEvent ( this after [ 0s, 30s ] $event3, 
 eventNumber == SSTEvent.IN_SERVICE,
 deviceId == $event1.deviceId,
 branchName == $event1.branchName ) from entry-point
"device-event-stream"
then
// inform fraud control
Fraud fraud = new Fraud(Fraud.CARD_TRAPPING, new SSTEvent[] {
$event1, $event2, $event3, $event4 });
fraudControl.handleFraud(fraud);
end 


Thx a lot for help!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Guvnor-validate-a-rule-results-in-Unable-to-Analyse-Expression-tp3938096p3938096.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] NullPointerException while loading pkg by KnowledgeAgent

2012-05-03 Thread FlyingEagle
Hello,

I have this exception in my Drools application and I don't know what's
happening.
I try to load a pkg by applying a defined change set by the KnowledgeAgent.
If I load the pkg by the KnowledgeBuilder, everything is fine, but I want to
use the KnowledgeAgent, so that changes are automatically recognized.

Can anybody help me?

Thx

http://drools.46999.n3.nabble.com/file/n3959482/CardTrapping.drl
CardTrapping.drl 
http://drools.46999.n3.nabble.com/file/n3959482/EngineStarter.java
EngineStarter.java 

java.lang.NullPointerException at
org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.getInterval(AfterEvaluatorDefinition.java:272)
at
org.drools.rule.VariableRestriction.getInterval(VariableRestriction.java:132)
at
org.drools.rule.VariableConstraint.getInterval(VariableConstraint.java:133)
at
org.drools.reteoo.builder.BuildUtils.gatherTemporalRelationships(BuildUtils.java:334)
at
org.drools.reteoo.builder.BuildUtils.calculateTemporalDistance(BuildUtils.java:298)
at
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:108)
at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:441)
at
org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:821)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:555)
at
org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:458)
at
org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1016)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:785)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:657)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:190)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:169)
at
com.wn.fraud.droolstest.starter.EngineStarter.initializeKnowledgeBase(EngineStarter.java:67)
at
com.wn.fraud.droolstest.starter.EngineStarter.(EngineStarter.java:46)
at
com.wn.fraud.droolstest.starter.EngineStarter.getInstance(EngineStarter.java:33)
at
com.wn.fraud.droolstest.BaseFraudTest_UsingEngineStarter.createKnowledgeBase(BaseFraudTest_UsingEngineStarter.java:8)
at
com.wn.fraud.droolstest.BaseFraudTest.initialize(BaseFraudTest.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
 

--
View this message in context: 
http://drools.46999.n3.nabble.com/NullPointerException-while-loading-pkg-by-KnowledgeAgent-tp3959482.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5.4.0 final

2012-05-08 Thread FlyingEagle
Hi,

can anybody tell me, when Drools 5.4.0 will be available as final version?

Thx

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-0-final-tp3970794.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Start of Guvnor 5.4.0.CR1 results in javax.naming.NamingException

2012-05-09 Thread FlyingEagle
Hi,

I try to start Guvnor 5.4.0.CR1 under JBoss 7.0.0.
I used the guvnor-5.4.0.CR1-jboss-as-7.0.war from the
guvnor-distribution-5.4.0.CR1.
The guvnor.war was deployed successfully on the app server, but when I try
to start Guvnor via Firefox, I get the following exception:

javax.naming.NamingException: Failed to get context with name comp
at
org.jboss.as.naming.context.NamespaceObjectFactory.getObjectInstance(NamespaceObjectFactory.java:71)
at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:283)
[:1.6.0_12]
at javax.naming.spi.NamingManager.getContext(NamingManager.java:422)
[:1.6.0_12]
at
javax.naming.spi.ContinuationContext.getTargetContext(ContinuationContext.java:38)
[:1.6.0_12]
at
javax.naming.spi.NamingManager.getContinuationContext(NamingManager.java:770)
[:1.6.0_12]
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:175)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207)
at javax.naming.InitialContext.lookup(InitialContext.java:392) 
[:1.6.0_12]
at
org.jboss.seam.transaction.DefaultSeamTransaction.getEJBContext(DefaultSeamTransaction.java:165)
[seam-transaction-3.1.0.Final.jar:]
at
org.jboss.seam.transaction.DefaultSeamTransaction.createCMTTransaction(DefaultSeamTransaction.java:132)
[seam-transaction-3.1.0.Final.jar:]
at
org.jboss.seam.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:116)
[seam-transaction-3.1.0.Final.jar:]

It seems, that anything with naming is missing or wrong. I have read, that
Guvnor 5.4.0 uses seam 3, instead of seam 2. May that be the cause?
Or is something wrong with the xml files in \WEB-INF? I have found there
some "TODO" comments in the web.xml.

Has anybody an idea, what the problem is?

Thx for each idea


--
View this message in context: 
http://drools.46999.n3.nabble.com/Start-of-Guvnor-5-4-0-CR1-results-in-javax-naming-NamingException-tp3973383.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Start of Guvnor 5.4.0.CR1 results in javax.naming.NamingException

2012-05-10 Thread FlyingEagle
I have found the solution for the problem!

The problem is solved with JBOSS AS 7.0.2.
So don't use for deployment of Guvnor 5.4.0, the JBOSS AS 7.0.0, but JBOSS
AS 7.0.2. 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Start-of-Guvnor-5-4-0-CR1-results-in-javax-naming-NamingException-tp3973383p3976392.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Does Guvnor support calendar definitions

2012-05-10 Thread FlyingEagle
Hi,

I have a rule, which only may be fired at night.
So I have defined in the drl the following:

rule "MyRule"
calendars "night-hours" // defines daily interval from 0am to 6am
when
...
then
...
end

How can I define this in Guvnor?

Thx

--
View this message in context: 
http://drools.46999.n3.nabble.com/Does-Guvnor-support-calendar-definitions-tp3977363.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] unable to write a function in guvnor with generic List as a parameter

2012-05-10 Thread FlyingEagle
Hi Sumatheja,

bad news...
Guvnor doesn't support generics. I had the same problem and now I am working
without type safe definitions.
I am working with the newest version 5.4.0, but this feature is missing.

Sorry for not having better news.




--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-unable-to-write-a-function-in-guvnor-with-generic-List-as-a-parameter-tp3977450p3977475.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users