Re: [rules-users] Seeing Working Memory View, Agenda View, etc in Eclipse editor
by VijayK
Weily,
Were you able to find a solution to this problem? I have been trying to get
working memory view, agenda view working in eclipse 3.4.2 with Drools plugin
5.0 but they are always blank. I am not really sure if there are any other
configuration changes that I should be making in order for them to work. The
documentation does not have any trouble shooting tips too.
Regards,
Vijay
weily li wrote:
>
> Yes, My Env:
> Jboss IDE 2.0.0 Beta 2
> Drools plug-in: 3.0.4
>
> I inserted four views from windows > show views > Others...
> When debugging, nothing is shown at these views.
>
> Thanks
> rgds
> Weily
>
>
> On 11/6/06, Joj <jojpm(a)yahoo.com> wrote:
>>
>>
>> hi,
>>
>> in ur documentation it's written tht:
>>
>> "When debugging an application using a Drools engine, three new views can
>> be
>> used to check the state of the Drools engine itself: the Working Memory
>> View, the Agenda View and the Global Data View. To be able to use these
>> views, create breakpoints in your code invoking the working memory. For
>> example, the line where you call workingMemory.fireAllRules() is a good
>> candidate. If the debugger halts at that joinpoint, you should select the
>> working memory variable in the debug variables view."
>>
>>
>> but these views are always blank when debugging.
>> should i have to enter this view from the line:
>> workingMemory.fireAllRules(); ??
>> but how can i?
>>
>> plz reply A.S.A.P.
>>
>> thanx in advance
>> jojan
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Seeing-Working-Memory-View%2C-Agenda-View%2C-etc-in...
>> Sent from the drools - user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
>
--
View this message in context: http://old.nabble.com/Seeing-Working-Memory-View%2C-Agenda-View%2C-etc-in...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
update a shadow object in working memory
by DeepakA
All,
I was investigating why the
my rule was running into a loop, even though I had a "no-loop true".
I was doing an session.update to update the fact in the
working memory, the fact was updated (removed and added) in the working
memory.
I tried commenting the session.update and I can see that the shadow object
in the working memory still got updated and reflected the latest value set
within the java code.
The looping has also stopped.
Can some one clarify if its possible to update the object in working memory
without calling the update method.
--
View this message in context: http://old.nabble.com/update-a-shadow-object-in-working-memory-tp26338645...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Drools Flow :Persistence Problem : Restore StatefulKnowledgeSession from database
by Pardeep.Ruhil@lntinfotech.com
Hi,
I have a query regarding Drools Persistence.
I have a scenario in which I want to know whether drool persistence will
work or not.
Lets say I am in between a workflow and suddenly my server creashes.
Suppose my workFlow was completed upto 3 steps with lets say 2 more steps
to go.
As I am using drools-persistence Api methods so my data regarding the
session , variable and process will go into the database specified by me
in the tables 'SessionInfo', VaraibleInstanceInfo', and
ProcessInstanceInfo and 'WorkItemInfo' tables of the database.
Now as my server crashed and I restarted my application.
So now I will restore the session object as my application got crashed
from the database using the below code.
this.ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id, kbase
, null, env);
Now as I have restarted the server, KnowledgeBase object i.e. 'kbase' will
become null and so as Environment Class object 'env'.
Are KnowledgeBase object are stored as well in the database ???
or I have to create a new KnowledgeBase to load the previous
StatefulKnowledgeSession object.
So in short how can I restore the previous session or If I cann't restore
it can I do that by storing the Knowledgebase object and Environment
Object in the database as well.
Please help me how can this be achieved.
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
15 years
Booleans in DSLs
by Gary Lamperillo
I have the following DSL:
[when]This Security is Ratable {bool:BOOLEAN:checked}=ratable:Ratable(ratableValue =="{bool}")
The following BRL:
rule "Ratable"
dialect "mvel"
when
ratable:Ratable(ratableValue =="checked")
then
end
When I create a test scenario in BRMS that looks for a "true" value for ratable, the rule does not fire. If I change the test condition to "false" the rule fires.
Any suggestions would be appreciated.
Thanks,
Gary
--
Gary Lamperillo
JBoss Solutions Architect
glamperi(a)redhat.com | 310.591.7516
--
Gary Lamperillo
JBoss Solutions Architect
glamperi(a)redhat.com | 310.591.7516
15 years
Guvnor Test Scenario - value equality
by Libor Nenadál
Hello,
I came to a problem when scenario fails because field values do not equal to
those expected although they actually do. Here is the result after scenario
run:
[TransactionBatch] field [otherPartyAccountNumber] was [12345678] expected
[12345678].
[TransactionBatch] field [otherPartyAccountSuffix] was [1234].
Both fields are of int type and the first does not match although it should.
Can you please point me to where the problem can be?
Thank you,
Libor
--
View this message in context: http://old.nabble.com/Guvnor-Test-Scenario---value-equality-tp26336990p26...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Help with StatefulSession and Stream Mode
by richarda
Hi all,
I am stuck trying to understand how to setup my drools system..
I am using Stream mode, with some negative rules, and a continuous stream
of facts.
Facts are evaluated and will in turn insert events into the memory if
required.
I thought it would be like this:
First, setup,
KnowledgeBaseConfiguration conf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
conf.setOption(EventProcessingOption.STREAM);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(conf);
kbase.addKnowledgePackages(builder.getKnowledgePackages());
ksession = kbase.newStatefulKnowledgeSession();
Then we have ksession...
The code that handles an incoming message will have a reference to
ksession..
and it will run:
WorkingMemoryEntryPoint eStream =
ksession.getWorkingMemoryEntryPoint("MessageStream");
eStream.insert(msg);
ksession.fireAllRules();
but here is my problem...
as some rules have things like not(Event(this after [0s,90m] $a))
then the fireAllRules can wait for the 90minutes to pass before completing..
How do I do it so that there is one WorkingMemory,
and I can pump facts into that memory and the engine just keeps running and
my 'inputter' doesn't hang..?
Thanks
Ric
--
View this message in context: http://old.nabble.com/Help-with-StatefulSession-and-Stream-Mode-tp2633520...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Re: [rules-users] Drools Flow :Persistence Problem : Restore StatefulKnowledgeSession from database
by Pardeep.Ruhil@lntinfotech.com
Hi Mauricio,
Thanks for you reply. I have one more doubt in this.
Will the drool-persistence will work for two or more workflow running
simultaneously ?
Also these workflow will use the same schema for all the workflows.
Looking from the table that are generated in the database, it seems that
database design is done keeping only one workflow running at a time.
Am I thinking correct ?
Please help me to get the solution.
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
15 years
Re: [rules-users] Drools solver info => provide DSL instead of DRL to Drools Solver
by Geoffrey De Smet
Hi Marco,
[I've send this answer to the drools user list,
please post any follow ups on the user list instead of mailing it
directly to me.
You can use nntp://news.gmane.org #gmane.comp.java.drools.user if you
want to keep your mailbox clean.]
Drools Solver's xml configuration doesn't support <scoreDsl> entry's yet
That shouldn't be to much work. I just created a JIRA for it:
https://jira.jboss.org/jira/browse/JBRULES-2333
Patch welcome (attached to that jira) and I would apply it within a week
on trunk.
Short of doing the patch on trunk, you can do this workaround:
- build the Solver directly yourself (basically just fisheye.jboss.org
for XmlSolverConfigurer's code). Not recommended.
- supply a an empty drl to <scoreDrl>, build the Solver, cast it to
DefaultLocalSearchSolver and replace the rulebase.
Both are not ideal in the long run though.
With kind regards,
Geoffrey De Smet
Marco caminiti schreef:
> Hi Geoffrey,
> I'm Marco Caminiti an Italian student of computer engineering. I'm
> using drools solver for my thesis and I have a problem.
>
> For the thesis I made a model of bin packing writing the rules on a
> drl file, and thus far, so good.
>
> Now I want to rewrite the rules that must use the solver in a specific
> language, but if I put in the configuration file of the solver the URL
> of the file DSL (or file DSLR) the solver crashes because it can not
> be configured.
>
> I ask whether you can use the solver with DSL tool and if so how could
> I do.
>
> Sorry to bother you but on this argument I have not found
> documentation on the Internet, more than anything else I'm sorry for
> my English.
>
> Thanks from now for the answer.
> Marco Caminiti
>
>
15 years
ConcurrentModificationException at org.drools.reteoo.ClassObjectTypeConf.getMatchingObjectTypes
by karthizap
I am using Drools-core.jar(version-5.0.0.CR1) and getting the following
exception. I could see similar stacktrace reported with
JIRA-1888(https://jira.jboss.org/jira/browse/JBRULES-1888) and its marked as
closed. Fix related to this Jira is not available (Rete.java) in the Drools
5.0.1 and 5.1.0 source code/drools-core jar files.
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
entryPoints = Collections.synchronizedMap((Map<EntryPoint,
EntryPointNode>) in.readObject());
ruleBase = ((DroolsObjectInputStream)in).getRuleBase();
super.readExternal( in );
}
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$ValueIterator.next(HashMap.java:871)
at
org.drools.reteoo.ClassObjectTypeConf.getMatchingObjectTypes(ClassObjectTypeConf.java:171)
at
org.drools.reteoo.ClassObjectTypeConf.getObjectTypeNodes(ClassObjectTypeConf.java:163)
at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:143)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1066)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1022)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:810)
Please let me know the correct fix for this problem.
--
View this message in context: http://old.nabble.com/ConcurrentModificationException-at-org.drools.reteo...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Java beans inheritance
by Zohar Etzioni
Hi,
I have a class hierarchy of objects that I'm inserting as facts. Lets
say X, Y extends X and Z extends Y. I have a rule that is defined on X
and therefore applies to all of them, however in the rule I want to
ask about the class name and I'm referring to it as
class.name=="some.class". This should work as far as I understand coz
it keeps the java beans format, however it is not directly defined in
the class X but rather in Object. The error I'm getting is "Error:
could not access: name". Any idea what I'm doing wrong?
Thanks,
Dawg
15 years