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, 4 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, 4 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, 4 months
Event-based Drools jBPM example?
by dunnlow
Hi,
I am struggling with using a process with *rule-based* flow. I have seen
looked at the canned ("evaluation") example but it is not rule-based. The
other examples I have found are really simple (like a print "HELLO" example)
where they just set up the "process," issue a fireallrules, then the node
triggers and process ends (basically just making a *decision *vice *process
*diagram -- but I could do that just using a few rules (rather than relying
on a process).
I envision setting up a true, event-based process flow to track a long
running business process. Basically, a system generates events, sends them
to a jBPM process and that state (active node?) of that process changes as
appropriate. (I will be making queries to determine the state of the
process - also will probably use jBPM console)
This seems like an obvious use-case, but I have been unable to find a simple
example of a *rule based* jBPM process that uses ONLY events. For example
start -> wait for event Message where message text = "HELLO", print "HELLO
received"
-> wait for event Message where message text = "THERE", print "THERE
received"
-> wait for event Message where message text = "JOE", print "JOE
received"
-> print "DONE"
Thus, I'd have a start and end node and three intermediate business rule
nodes. I want this to be a true sequential process such that the second
node (ie the printing of "THERE") is not reached (doesn't activate?) before
an event is received where the text="HELLO".
I've tried setting this up and got an earlier recommendation of using a
"condition" in the metadata - but this seems a bit like a kludge when a
Business Rule node exists (https://community.jboss.org/thread/205952).
Also, in reality I'd like to be able to have some slightly complex business
rules in those nodes.
Can someone PLEASE point me to an example of this (or make a suggestion on
how to implement it)?
I'm also confused about how the fireallrules works. When my system sends an
event and I insert it into my process, doesn't fireallnodes do just that -
send to all nodes thus basically breaking the whole "process flow"
methodology?
I thought I could add a rule that would ensure that the rule node was
"active" (thus per documentation not allowing the process to continue) by
putting a rule on node1 with a condition like
"when Message(text!="HELLO")"
But that still doesn't keep the second node from firing.
Sorry for the lengthy post. Any other information/writeup about using rules
with a process I'd GREATLY appreciate. (Obviously, I've been through the
JBoss web site documentation, 10 min tutorials, etc etc.)
Thanks!
-J
--
View this message in context: http://drools.46999.n3.nabble.com/Event-based-Drools-jBPM-example-tp40204...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months
how to read guvnor package through changeset.xml from client application?
by sainadh
hi,
i am trying to read the guvnor package from my client application...
but i am getting exceptions like below, i think these are the exceptions
caused, because of unable to read the package
i want to access the brl's in my guvnor package... my changeset.xml is
<?xml version="1.0" encoding="UTF-8"?>
<change-set xmlns="http://drools.org/drools-5.0/change-set"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...">
<add>
<resource
source='http://localhost:8080/guvnor/rest/packages/mypackage/'
type='PKG' basicAuthentication="enabled" username="admin"
password="admin" />
</add>
</change-set>
please anyone help me
java.lang.RuntimeException: KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:776)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1071)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:824)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:673)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:182)
at
com.org.alert.test.SampleTestClass.createKnowledgeBase(SampleTestClass.java:80)
at com.org.alert.test.SampleTestClass.main(SampleTestClass.java:26)
Caused by: java.io.StreamCorruptedException: invalid stream header: 3C656E74
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at
org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStream.java:68)
at
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:205)
at
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:174)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:749)
... 7 more
Exception in thread "main" java.lang.NullPointerException
at java.util.AbstractCollection.addAll(Unknown Source)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1077)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:824)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:673)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:182)
at
com.org.alert.test.SampleTestClass.createKnowledgeBase(SampleTestClass.java:80)
at com.org.alert.test.SampleTestClass.main(SampleTestClass.java:26)
thanks in advance
and
regards
sai
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-read-guvnor-package-through-chan...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months