Starting with Drools and EMF
by ordoabchao
Hi! i´m starting with Drools and EMF, so i decided to do a simple Drools
example and a simple EMF example.I tested it for separate and all worked
fine, so I tried to integrate both things. I added the path of the Drools
example to the EMF´s, but when I try to run i receive this message error:
Problems occurred when invoking code from plug-in: "org.eclipse.jface".
java.lang.NoClassDefFoundError: com/sample/Adapter
at Libreria.impl.clienteImpl.setNombre(clienteImpl.java:106)
at Libreria.impl.clienteImpl.eSet(clienteImpl.java:152)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1071)
at
org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand.doExecuteWithResult(SetValueCommand.java:74)
......
I don´t know what I´m doing wrong and I can´t find any example or practical
documentation to learn how to do Drools/EMF integration fine.
Could any one help me? salutes and thanks for all
--
View this message in context: http://drools.46999.n3.nabble.com/Starting-with-Drools-and-EMF-tp4020404....
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
can't start jboss with enable=true option for resource-change-scanner
by eselis
Hello,
I have an application that use Guvnor 5.4.0 final as a process repository,
processes are designed with Orix (v2.3.0), both are running in a
JBOSS-EAPv6.
In addition I have another app which consumes processes from Guvnor. I want
that my app gets the new processes without restarting the container (another
Jboos-EAPv6).
I found that the solution should be to add this to my configuration xml
/<drools:resource-change-scanner id="scanner" interval="10" enabled="true"
/> /
I added it, but when I want to startup my app, I have the following mistake
related to the line wrote above.
/nested exception is org.xml.sax.SAXParseException; lineNumber: 18;
columnNumber: 77; cvc-complex-type.3.2.2: Attribute 'enabled' is not allowed
to appear in element 'drools:resource-change-scanner'/
I tried to use without the option enable="true" but I didn't get the new
processes unless I restart jboss. Does anybody have any idea to help me?
Thanks in advance,
--
View this message in context: http://drools.46999.n3.nabble.com/can-t-start-jboss-with-enable-true-opti...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Nurse rostering configuration with competition.xsd schema
by adc
I am modelling a personnel rostering based on Nurse Rostering.
I am toying with the *.xml samples based on the competition.xsd schema. The
schema is in general very clear, but there are so many configuration
parameters that I am not sure how to properly configure each of them. For
instance, I cannot figure out how to correctly set up the patterns and their
usage in the contracts tags.
The aim is to correctly model my scenario .xml file in order to avoid
unnecessary contraints and to correctly weight the useful ones.
So, I am looking for some detailed references about the competition.xsd
schema, and maybe a tutorial about the usage of the schema.
Any clue?
Thanks, Alberto
--
View this message in context: http://drools.46999.n3.nabble.com/Nurse-rostering-configuration-with-comp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Re: [rules-users] Unexpected java.lang.NullPointerException at org.drools.core.util.RightTupleIndexHashTable.removeAdd(RightTupleIndexHashTable.java:353)
by Mark Proctor
You were not subscribed to the mailing list at the time, so this post did not
make it through to the main list. If you could make a self contained unit
test, we'll fix it asap. Follow details here:
http://docs.jboss.org/drools/release/5.4.0.Final/droolsjbpm-introduction-...
Take a look at MiscTest in drools-compiler to get an idea of how to write
tests.
Mark
ru wrote
> Dear drools-users and team!
>
> My working for years code cease to work after switching from Drools
> 5.3.0Final to 5.4.0Final.
>
> Here is a rule of interest:
> ..........................................................................
> rule "Subscenario-Start"
> dialect "java"
> when
> act: Subscenario( status == "START", $super_run: super_run, $run: run )
> then
> Scenario scenario = (Scenario) DroolsTab.mapInstance( act.sub_scenario );
> scenario.run = new Integer ( runcount.intValue() + 1 );
> scenario.super_run = $super_run;
> scenario.caller = $run;
> scenario.status = "START";
> if ( traceLevel.intValue() > 0 )
> System.out.println( "STARTING SUB-SCENARIO "+scenario.title+"
> "+scenario.run );
> Map acm = contexToMap( act.context );
> Map scm = contexToMap( scenario.context );
> Map rmp = replace( act.ctxmap, acm );
> scenario.ctxmap = replace( scm, rmp );
> System.out.println( "1" );
> if ( act.repeat != null )
> {
> if ( act.step == null )
> act.step = new Integer( 0 );
> repeatStep( act, scenario.ctxmap, act.step.intValue() );
> }
> System.out.println( "2" );
> insert( scenario );
> System.out.println( "3 "+act.wait_subscenario );
> if ( act.wait_subscenario != null && act.wait_subscenario.booleanValue() )
> act.status = "REPEAT";
> else
> act.status = "DONE";
> System.out.println( "4 "+act.status );
> act.sub_run = scenario.run;
> update( act );
> System.out.println( "5" );
> DroolsTab.getWorkingMemory().setGlobal( "runcount", scenario.run );
> System.out.println( "6" );
> end
> ..........................................................................
>
> Here is a trace (Please note: The first time it worked, and the second
> gave an error):
>
> ..........................................................................
> ru@ru-desktop ~ $ DroolsTabScene-5.2/run_protege.sh
> WARNING: missing bundle: protege_text -- BundleHelper.
> <init>
> ()
> Loaded 5000 instances: Scenario_ProjectKB_Class20011
> OpenMap(tm) Version 5.0
> Copyright (C) BBNT Solutions LLC. All rights reserved.
> See http://openmap.bbn.com/ for details.
>
> OpenMapTab scenario = ru.oogis.dro.DroolsTab evaluateScript "Run Scenario"
> Load time for file:/home/ru/DroolsTabScene-5.2/projects/Sea.pprj = 2 sec
> (project) + 1 sec (ui)
> DroTimer clock: ru.oogis.util.DroClock < second: 0 >
> Run scenario: ru.oogis.dro.DroolsTab evaluateScript "Run Scenario"
> FIRE: Start Scenario Command
> FIRE: Scenario Null
> STARTING SCENARIO s1.Collision 1
> FIRE: Scenario Start
> start TASK s1.Watch 1
> FIRE: Task Start s1.Watch
> start ACTION s1.Ports on Map 1
> start ACTION s1.Wait Collision 1
> FIRE: Interim Action Done s1.Ports on Map
> start ACTION s1.Start Cruise from Primorsk 1
> STARTING SUB-SCENARIO c1.Cruise from Primorsk 2
> 1
> 2
> 3 false
> 4 DONE
> 5
> 6
> FIRE: Interim Action Done s1.Start Cruise from Primorsk
> start ACTION s1.Cruise Shift 1
> FIRE: Scenario Start
> start TASK c1.Cruise from Primorsk 2
> FIRE: Task Start c1.Cruise from Primorsk
> start ACTION c1.Launch at Primorsk 2
> FIRE: Interim Action Done c1.Launch at Primorsk
> start ACTION c1.Mooring 2
> FIRE: Retract Done Activity c1.Launch at Primorsk
> FIRE: Retract Done Activity s1.Start Cruise from Primorsk
> FIRE: Retract Done Activity s1.Ports on Map
> FIRE: Interim Action Done c1.Mooring
> start ACTION Cargo Loading Message 2
> FIRE: Interim Action Done Cargo Loading Message
> start ACTION c1.Cargo Loading 2 2
> FIRE: Retract Done Activity Cargo Loading Message
> FIRE: Retract Done Activity c1.Mooring
> FIRE: Interim Action Done s1.Cruise Shift
> start ACTION s1.Second Cruise 1
> STARTING SUB-SCENARIO c1.Cruise to Primorsk 3
> 1
> 2
> 3 true
> 4 REPEAT
> Exception in thread "AWT-EventQueue-0" Exception executing consequence for
> rule "Subscenario-Start" in ActionExecutor: java.lang.NullPointerException
> at
> org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
> at
> org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1283)
> at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1209)
> at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1442)
> at
> org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
> at
> org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
> at
> org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
> at org.drools.runtime.rule.StatefulRuleSession$fireAllRules.call(Unknown
> Source)
> at DroTimer.repeat(Script1.groovy:25)
> at ru.igis.omtab.RuNA.repeatSecondActions(RuNA.java:177)
> at ru.igis.omtab.Clock.manageClock(Clock.java:82)
> at ru.igis.omtab.Clock.actionPerformed(Clock.java:59)
> at javax.swing.Timer.fireActionPerformed(Timer.java:313)
> at javax.swing.Timer$DoPostEvent.run(Timer.java:244)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
> at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
> at java.awt.EventQueue.access$000(EventQueue.java:96)
> at java.awt.EventQueue$1.run(EventQueue.java:608)
> at java.awt.EventQueue$1.run(EventQueue.java:606)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
> at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
> at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
> Caused by: java.lang.NullPointerException
> at
> org.drools.core.util.RightTupleIndexHashTable.removeAdd(RightTupleIndexHashTable.java:353)
> at org.drools.reteoo.JoinNode.modifyRightTuple(JoinNode.java:212)
> at org.drools.reteoo.BetaNode.modifyObject(BetaNode.java:531)
> at org.drools.reteoo.JoinNode.modifyObject(JoinNode.java:446)
> at
> org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
> at
> org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
> at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
> at
> org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
> at
> org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:421)
> at org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
> at org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
> at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:470)
> at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:370)
> at
> org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:317)
> at
> org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:312)
> at
> ActionExecutor.Rule_Subscenario_Start_a83c5a15cccb436f8a66818ffd048e7c.defaultConsequence(Rule_Subscenario_Start_a83c5a15cccb436f8a66818ffd048e7c.java:34)
> at
> ActionExecutor.Rule_Subscenario_Start_a83c5a15cccb436f8a66818ffd048e7cDefaultConsequenceInvokerGenerated.evaluate(Unknown
> Source)
> at
> ActionExecutor.Rule_Subscenario_Start_a83c5a15cccb436f8a66818ffd048e7cDefaultConsequenceInvoker.evaluate(Unknown
> Source)
> at
> org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1273)
> ... 26 more
> ..........................................................................
>
> Any help would be greatly appreciated.
> Sincerely,
> Ru
--
View this message in context: http://drools.46999.n3.nabble.com/Unexpected-java-lang-NullPointerExcepti...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months