[rules-users] Deep Links in Guvnor

2010-03-25 Thread Jörg Herbst
Hi,

I'm currently evaluating Guvnor. The application is really great for
managing rools for none developers. But I've got a special requirement.
Is it possible to provide deep links for editing assets or a list of
assets?  I'm looking for a way to create something like a bookmarkable URL
when using the navigator which can be used in another web application.
The background is, I've got different usergroups editing different rules and
I'm looking for a way linking to guvnor and displaying their rules.
Their can be defined by a package or some naming convention.

Any ideas?
Joerg
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools-guvnor, problem when creating test scenarios based on referenced domain model

2010-03-25 Thread kicho

Hi Nicolas!

Thank you for your quick answer! But, i was kind of hoping that that's not
the solution...

I'll attach screen shots of rule configuration and test scenario so that we
could all see what am i doing wrong.

Rule screen:

http://n3.nabble.com/file/n519577/business_rule.jpg 

Rule source:

http://n3.nabble.com/file/n519577/business_rule_src.jpg 

Test scenario:

http://n3.nabble.com/file/n519577/test_scenario.jpg 

When i choose Run scenario: this is what i get:

http://n3.nabble.com/file/n519577/test_scenario_fail.jpg 

As you can see, i get a blank screen with no info at all, which points me to
conclusion that something (not good) happend.

In server log i found this:

2010-03-25 09:27:17,684 INFO  [STDOUT] ERROR 25-03 09:27:17,684
(ServiceImplementation.java:runScenario:1942)[Error: could not
access/write property (roleAttr) in: comExpert01.User]
[Near : {... __fact__.roleAttr = __val_ }]
   ^
[Line: 1, Column: 0]

I've tried to google this but with no success.
I'm running guvnor as a standalone dist downloaded from jboss site, version
5.0.1 on jbossAS 4.2.3, for repository instead of derby i'm using mysql 5.x

I should also mention that if i don't declare roleAttr in test scenario
(something like this):

http://n3.nabble.com/file/n519577/test_scenario_no_roleAttr.jpg 

I get another blank screen after running test with this exception in log
file:

2010-03-25 09:49:38,295 INFO  [STDOUT] ERROR 25-03 09:49:38,295
(ServiceImplementation.java:runScenario:1942)   
org.drools.RuntimeDroolsException: Exception executing predicate
roleAttr.roleName == ADMIN

Since there is no documentation about managing test scenarios i don't know
what is wrong here.

If you could give me some more directions or hints i would be very grateful.
-- 
View this message in context: 
http://n3.nabble.com/drools-guvnor-problem-when-creating-test-scenarios-based-on-referenced-domain-model-tp471099p519577.html
Sent from the Drools - User 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] drools-guvnor, problem when creating test scenarios based on referenced domain model

2010-03-25 Thread david_nabble

Hi !


kicho wrote:
 
 As you can see, i get a blank screen with no info at all, which points me
 to conclusion that something (not good) happend.
 
 In server log i found this:
 
 2010-03-25 09:27:17,684 INFO  [STDOUT] ERROR 25-03 09:27:17,684
 (ServiceImplementation.java:runScenario:1942)  [Error: could not
 access/write property (roleAttr) in: comExpert01.User]
 [Near : {... __fact__.roleAttr = __val_ }]
^
 [Line: 1, Column: 0]
 

Does your model declare a setRoleAttr(Role r) Method for the user class?


kicho wrote:
 
  http://n3.nabble.com/file/n519577/test_scenario_no_roleAttr.jpg 
 
 I get another blank screen after running test with this exception in log
 file:
 
 2010-03-25 09:49:38,295 INFO  [STDOUT] ERROR 25-03 09:49:38,295
 (ServiceImplementation.java:runScenario:1942) 
 org.drools.RuntimeDroolsException: Exception executing predicate
 roleAttr.roleName == ADMIN
 
 
no idea on this so far..

Could you provide your (test-)model?


-- 
View this message in context: 
http://n3.nabble.com/drools-guvnor-problem-when-creating-test-scenarios-based-on-referenced-domain-model-tp471099p519650.html
Sent from the Drools - User 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] drools-guvnor, problem when creating test scenarios based on referenced domain model

2010-03-25 Thread Nicolas Héron
Hello
you must set to RoleAttr =rr and not just rr
In the new 5.1, you will have a guided way to set bound variables to each
other
Regards
Nicolas

2010/3/25 kicho goli...@gmail.com


 Hi Nicolas!

 Thank you for your quick answer! But, i was kind of hoping that that's not
 the solution...

 I'll attach screen shots of rule configuration and test scenario so that we
 could all see what am i doing wrong.

 Rule screen:

 http://n3.nabble.com/file/n519577/business_rule.jpg

 Rule source:

 http://n3.nabble.com/file/n519577/business_rule_src.jpg

 Test scenario:

 http://n3.nabble.com/file/n519577/test_scenario.jpg

 When i choose Run scenario: this is what i get:

 http://n3.nabble.com/file/n519577/test_scenario_fail.jpg

 As you can see, i get a blank screen with no info at all, which points me
 to
 conclusion that something (not good) happend.

 In server log i found this:

 2010-03-25 09:27:17,684 INFO  [STDOUT] ERROR 25-03 09:27:17,684
 (ServiceImplementation.java:runScenario:1942)[Error: could not
 access/write property (roleAttr) in: comExpert01.User]
 [Near : {... __fact__.roleAttr = __val_ }]
   ^
 [Line: 1, Column: 0]

 I've tried to google this but with no success.
 I'm running guvnor as a standalone dist downloaded from jboss site, version
 5.0.1 on jbossAS 4.2.3, for repository instead of derby i'm using mysql 5.x

 I should also mention that if i don't declare roleAttr in test scenario
 (something like this):

 http://n3.nabble.com/file/n519577/test_scenario_no_roleAttr.jpg

 I get another blank screen after running test with this exception in log
 file:

 2010-03-25 09:49:38,295 INFO  [STDOUT] ERROR 25-03 09:49:38,295
 (ServiceImplementation.java:runScenario:1942)
 org.drools.RuntimeDroolsException: Exception executing predicate
 roleAttr.roleName == ADMIN

 Since there is no documentation about managing test scenarios i don't know
 what is wrong here.

 If you could give me some more directions or hints i would be very
 grateful.
 --
 View this message in context:
 http://n3.nabble.com/drools-guvnor-problem-when-creating-test-scenarios-based-on-referenced-domain-model-tp471099p519577.html
 Sent from the Drools - User 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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools-guvnor, problem when creating test scenarios based on referenced domain model

2010-03-25 Thread kicho

Nicolas!

Thank you very very much! It works now! 
-- 
View this message in context: 
http://n3.nabble.com/drools-guvnor-problem-when-creating-test-scenarios-based-on-referenced-domain-model-tp471099p519882.html
Sent from the Drools - User 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] how can we find next nodes from current node in rule flow

2010-03-25 Thread KiranP

suppose i have a rule flow which has a split node and before that split there
is action node as below

start -- action1 -- Split -- ** --END

now if i want to find all transitions after split that can happen then is
tere some api available

if not please provide some workaround.waiting eagerly for
response.

thanks


-
Keep Working :working:
KiranP
-- 
View this message in context: 
http://n3.nabble.com/how-can-we-find-next-nodes-from-current-node-in-rule-flow-tp519949p519949.html
Sent from the Drools - User 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-Gunvor

2010-03-25 Thread srikar.jillela

Hi, 
  
  I am new to Drools.I have installed Drools-Gunvor in weblogic.

  Can you please help in creating packages and rules

 Thanks in advance

Thanks
Sreekar
-- 
View this message in context: 
http://n3.nabble.com/Drools-Gunvor-tp519975p519975.html
Sent from the Drools - User 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] Call class method from LHS of a rule

2010-03-25 Thread HafeezurRehman

/* pass a hibernate session to the working memory as a 
global */
session = factory.openSession();
workingMemory.setGlobal(hibernateSession, session);

Login login = new Login();
workingMemory.insert(login);


the isssue was that i was doing it the wrong way that was 

Login login = new Login();
workingMemory.insert(login);

/* pass a hibernate session to the working memory as a 
global */
session = factory.openSession();
workingMemory.setGlobal(hibernateSession, session);


the order was wrong
-- 
View this message in context: 
http://n3.nabble.com/Call-class-method-from-LHS-of-a-rule-tp108383p519993.html
Sent from the Drools - User 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] how can we find next nodes from current node in rule flow

2010-03-25 Thread Mauricio Salatino
With the following code snippet you can see how you can get the first next
node. You only need to iterate and create a recursive method to find out the
full path:

 RuleFlowProcessInstance processInstance = (RuleFlowProcessInstance)
ksession.startProcess(org.plugtree.XXX);

NodeInstance node =
processInstance.getNodeInstances().iterator().next();
long id = node.getNodeId();
NodeImpl nodeDef =
(NodeImpl)((RuleFlowProcess)processInstance.getProcess()).getNode(id);
ListConnection connections =
nodeDef.getOutgoingConnections().get(0);
Connection connection = connections.get(0);
Node firstNodeAfterTheCurrentNodeInstance = connection.getTo();

Greetings.

On Thu, Mar 25, 2010 at 8:47 AM, KiranP phadatareki...@gmail.com wrote:


 suppose i have a rule flow which has a split node and before that split
 there
 is action node as below

 start -- action1 -- Split -- ** --END

 now if i want to find all transitions after split that can happen then is
 tere some api available

 if not please provide some workaround.waiting eagerly for
 response.

 thanks


 -
 Keep Working :working:
 KiranP
 --
 View this message in context:
 http://n3.nabble.com/how-can-we-find-next-nodes-from-current-node-in-rule-flow-tp519949p519949.html
 Sent from the Drools - User mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino Salaboy Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Fosdem 50 minute introduction into Drools

2010-03-25 Thread Mark Proctor
http://blog.athico.com/2010/03/fosdem-50-minute-introduction-into.html
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Persitence configuration issue in Drools Flow 5.1.M1 (PersistenceException/AnnotationException)

2010-03-25 Thread Nol de Wit
Hi,

(using Droolw Flow 5.1.M1)

I've made a reasonably simple Drool Flow model, containing a ForEach,
a split and  and a couple of actions. Without Persistence it works
nicely: I start it with one variable/parameter, a class I call Report
with 4 Lines of data . Each of the lines get's worked on correctly in
the ForEach.

Next I want to add Persistence to the model; I made a persistence.xml,
which is based on the one as shown in chapter 5 of the online Drools
Flow documentation. See below.

I changed the H2 db to a mysql DB.

The firs call (after creating the datasource) in my test now gives an
exception. See the call and exception below.

1) what's wrong? I think my persistence.xml is correct. So what is the
error trying to tell me? Is saying that I should map my parameters
data (Report and Line)? I just read an article from salaboy about
variable persistence 5.1, but I'm not using that...

2) What puzzles me is the link between the persistence.xml (containing
mapping info), and the datasource (containing the credentials of the
DB). In the doc and PerformanceTest.java class in the examples I don't
see any link. Is creating the DataSource enough to get it in JNDI?

Thanks,
Nol


Some of my code and config:

// See makeDataSource() below
PoolingDataSource ds = makeDataSource();

// this call gives an exception:
EntityManagerFactory emf =
Persistence.createEntityManagerFactory( nl.dnb.avb.drools.jpa );


25-mrt-2010 14:30:00 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class:
org.drools.persistence.processinstance.WorkItemInfo
25-mrt-2010 14:30:00 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity org.drools.persistence.processinstance.WorkItemInfo
on table WorkItemInfo
javax.persistence.PersistenceException: [PersistenceUnit:
nl.dnb.avb.drools.jpa] Unable to configure EntityManagerFactory
at 
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
at 
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at 
pilot.tests.DroolFlowPersistenceTest.main(DroolFlowPersistenceTest.java:41)
Caused by: org.hibernate.AnnotationException: Use of @OneToMany or
@ManyToMany targeting an unmapped class:
org.drools.persistence.processinstance.ProcessInstanceInfo.variables[org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo]
at 
org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.java:1071)
at 
org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:602)
at 
org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:79)


Persistence.xml:

?xml version=1.0 encoding=UTF-8 standalone=yes?
persistence
  version=1.0
  xsi:schemaLocation=
http://java.sun.com/xml/ns/persistence
 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
 http://java.sun.com/xml/ns/persistence/orm
 http://java.sun.com/xml/ns/persistence/orm_1_0.xsd;
  xmlns:orm=http://java.sun.com/xml/ns/persistence/orm;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns=http://java.sun.com/xml/ns/persistence;

  persistence-unit name=nl.dnb.avb.drools.jpa
providerorg.hibernate.ejb.HibernatePersistence/provider
jta-data-sourcejdbc/processInstanceDS/jta-data-source
classorg.drools.persistence.session.SessionInfo/class
classorg.drools.persistence.processinstance.ProcessInstanceInfo/class

classorg.drools.persistence.processinstance.ProcessInstanceEventInfo/class
classorg.drools.persistence.processinstance.WorkItemInfo/class

properties
  !--  property name=hibernate.dialect
value=org.hibernate.dialect.H2Dialect/ --
  property name=hibernate.dialect
value=org.hibernate.dialect.MySQLDialect/
  property name=hibernate.max_fetch_depth value=3/
  property name=hibernate.hbm2ddl.auto value=update/
  property name=hibernate.show_sql value=true/
  property name=hibernate.transaction.manager_lookup_class
value=org.hibernate.transaction.BTMTransactionManagerLookup/
/properties
  /persistence-unit
/persistence



private static PoolingDataSource makeDataSource() {

PoolingDataSource ds = new PoolingDataSource();
ds.setUniqueName(jdbc/processInstanceDS);

ds.setClassName(com.mysql.jdbc.jdbc2.optional.MysqlXADataSource);
ds.setMaxPoolSize(3);
ds.setAllowLocalTransactions(true);
ds.getDriverProperties().put(user, drools);
ds.getDriverProperties().put(password, drools);
ds.getDriverProperties().put(URL, 
jdbc:mysql://DNB35362:3306/drools);
ds.init();


[rules-users] Activated rule not firing eventhough was never cancelled

2010-03-25 Thread H.C.

I have about a dozen rules across various ruleflow groups orchestrated
through a ruleflow. I am trying to troubleshoot why a particular rule in a
downstream ruleflow group is not firing. 

I see an activation created for this particular rule as facts are added to
working memory (by looking at the audit log). My ruleflow starts and I
insepct all cancelled activations for all subsequent fact
inserts/updates/retracts and don't see the rule's activation ever being
cancelled before it reaches the rule's ruleflow group activation. The rule's
ruleflow group is activated but the rule's activation isn't executed.

I would think I would see a cancellation of the rule if a prior fact change
had rendered the rule uneligible.

Why might this happen?
-- 
View this message in context: 
http://n3.nabble.com/Activated-rule-not-firing-eventhough-was-never-cancelled-tp526882p526882.html
Sent from the Drools - User 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] Persitence configuration issue in Drools Flow 5.1.M1 (PersistenceException/AnnotationException)

2010-03-25 Thread Nol de Wit
I got a bit further on this: it appears that for 5.1 there are a couple of
extra mapped classes:

classorg.drools.persistence.processinstance.variabletypes.VariableInstanceInfo/class
classorg.drools.persistence.processinstance.variabletypes.JPAPersistedVariable/class

This got me much further, but no success yet: the tables are created in the
database, but apparently at the point some data is inserted an error occurs,
see below.
I've updated BTM to 1.3.3, but that didn't help.

Any ideas?
Thanks,
Nol

Mar 25, 2010 11:00:33 PM bitronix.tm.journal.DiskJournal open
WARNING: active log file is unclean, previous server crash ?
Mar 25, 2010 11:00:33 PM bitronix.tm.recovery.Recoverer run
INFO: recovery committed 0 dangling transaction(s) and rolled back 0 aborted
transaction(s) on 1 resource(s) [jdbc/processInstanceDS] (restricted to
serverId '192.168.178.32')
line 2:47 mismatched character 'EOF' expecting '\n'
Hibernate: insert into SessionInfo (dirty, lastModificationDate,
rulesByteArray, startDate) values (?, ?, ?, ?)
Mar 25, 2010 11:00:35 PM bitronix.tm.BitronixTransaction
fireAfterCompletionEvent
WARNING: Synchronization.afterCompletion() call failed for a
DeferredReleaseSynchronization of a JdbcPooledConnection from datasource
jdbc/processInstanceDS in state NOT_ACCESSIBLE wrapping
com.mysql.jdbc.jdbc2.optional.jdbc4mysqlxaconnect...@1d3c66d8
java.lang.IllegalArgumentException: null source
at java.util.EventObject.init(EventObject.java:38)
at javax.sql.StatementEvent.init(StatementEvent.java:39)
at
com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
at
bitronix.tm.resource.jdbc.JdbcPooledConnection.stateChanging(JdbcPooledConnection.java:205)
at
bitronix.tm.resource.common.AbstractXAStatefulHolder.fireStateChanging(AbstractXAStatefulHolder.java:61)
at
bitronix.tm.resource.common.AbstractXAStatefulHolder.setState(AbstractXAStatefulHolder.java:30)
at
bitronix.tm.resource.common.DeferredReleaseSynchronization.afterCompletion(DeferredReleaseSynchronization.java:33)
at
bitronix.tm.BitronixTransaction.fireAfterCompletionEvent(BitronixTransaction.java:416)
at
bitronix.tm.BitronixTransaction.rollback(BitronixTransaction.java:227)
at
bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:104)
at
org.drools.persistence.session.SingleSessionCommandService.init(SingleSessionCommandService.java:128)
at
org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl.newStatefulKnowledgeSession(JPAKnowledgeServiceProviderImpl.java:44)
at
org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:93)
at
pilot.tests.DroolFlowPersistenceTest.main(DroolFlowPersistenceTest.java:60)
java.lang.RuntimeException: Could not commit session
at
org.drools.persistence.session.SingleSessionCommandService.init(SingleSessionCommandService.java:133)
at
org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl.newStatefulKnowledgeSession(JPAKnowledgeServiceProviderImpl.java:44)
at
org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:93)
at
pilot.tests.DroolFlowPersistenceTest.main(DroolFlowPersistenceTest.java:60)
Caused by: java.lang.IllegalArgumentException: null source
at java.util.EventObject.init(EventObject.java:38)
at javax.sql.StatementEvent.init(StatementEvent.java:39)
at
com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
at
org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:563)
at
org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:291)
at
org.hibernate.id.insert.AbstractReturningDelegate.releaseStatement(AbstractReturningDelegate.java:82)
at
org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:60)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2186)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2666)
at
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
at
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
at
org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49)
at
org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154)
at
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110)
 

[rules-users] Sliding Windows - Error

2010-03-25 Thread Paul R.
Hi,

I'm using an accumulate on a sliding window to count the number of events,
which occur in a 30 second window;
the events are inserted every 5 seconds - so with a 30 second window, I
would expect 6 events to occur.

The rule below never fires, though from the log output, it looks as though
the condition has matched successfully?

declare Foo
@role ( event )
@expires ( 60s )
@timestamp ( date )
end

rule Count Foo
when
c : Number(intValue  5) from accumulate
$f : Foo()
over window:time ( 30s )
from entry-point ChannelDataStream,
count($f))
then
System.out.println(Count [30s] =  + c);
end

OBJECT ASSERTED value:com.test.droolstest$...@c52200 factId: 1
OBJECT ASSERTED value:com.test.droolstest$...@128edf2 factId: 3
OBJECT ASSERTED value:com.test.droolstest$...@1dddba factId: 4
OBJECT ASSERTED value:com.test.droolstest$...@c7e8a7 factId: 5
OBJECT ASSERTED value:com.test.droolstest$...@7b4703 factId: 6
ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0]
declarations: c=6(2)
OBJECT ASSERTED value:com.test.droolstest$...@1732ed2 factId: 7
ACTIVATION CANCELLED rule:Count Foo activationId:Count Foo [2, 0]
declarations: c=6(2)
ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0]
declarations: c=6(2)
OBJECT ASSERTED value:com.test.droolstest$...@be76c7 factId: 8
ACTIVATION CANCELLED rule:Count Foo activationId:Count Foo [2, 0]
declarations: c=6(2)
ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0]
declarations: c=6(2)


Can anybody explain why this is happening? I've attached a test case, which
demonstrates the problem.

Thanks in advance.

- Paul


DroolsTest.java
Description: Binary data
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Sliding Windows - Error

2010-03-25 Thread Paul R.
Meant to say: using drools 5.0.1.

- Paul

On Fri, Mar 26, 2010 at 1:22 AM, Paul R. reverselo...@gmail.com wrote:

 Hi,

 I'm using an accumulate on a sliding window to count the number of events,
 which occur in a 30 second window;
 the events are inserted every 5 seconds - so with a 30 second window, I
 would expect 6 events to occur.

 The rule below never fires, though from the log output, it looks as though
 the condition has matched successfully?

 declare Foo
 @role ( event )
 @expires ( 60s )
 @timestamp ( date )
 end

 rule Count Foo
 when
 c : Number(intValue  5) from accumulate
 $f : Foo()
 over window:time ( 30s )
 from entry-point ChannelDataStream,
 count($f))
 then
 System.out.println(Count [30s] =  + c);
 end

 OBJECT ASSERTED value:com.test.droolstest$...@c52200 factId: 1
 OBJECT ASSERTED value:com.test.droolstest$...@128edf2 factId: 3
 OBJECT ASSERTED value:com.test.droolstest$...@1dddba factId: 4
 OBJECT ASSERTED value:com.test.droolstest$...@c7e8a7 factId: 5
 OBJECT ASSERTED value:com.test.droolstest$...@7b4703 factId: 6
 ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0]
 declarations: c=6(2)
 OBJECT ASSERTED value:com.test.droolstest$...@1732ed2 factId: 7
 ACTIVATION CANCELLED rule:Count Foo activationId:Count Foo [2, 0]
 declarations: c=6(2)
 ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0]
 declarations: c=6(2)
 OBJECT ASSERTED value:com.test.droolstest$...@be76c7 factId: 8
 ACTIVATION CANCELLED rule:Count Foo activationId:Count Foo [2, 0]
 declarations: c=6(2)
 ACTIVATION CREATED rule:Count Foo activationId:Count Foo [2, 0]
 declarations: c=6(2)


 Can anybody explain why this is happening? I've attached a test case, which
 demonstrates the problem.

 Thanks in advance.

 - Paul

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow Spring Integration

2010-03-25 Thread tolitius

really? nobody is using Drools Flow with Spring? Or nobody really knows the
answer?
-- 
View this message in context: 
http://n3.nabble.com/Drools-Flow-Spring-Integration-tp467383p594037.html
Sent from the Drools - User 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] Can we works on fact of dynamic Map instead of POJO?

2010-03-25 Thread 王在祥
I have a requirement of run rules on dynamic map instead of POJO, for
example:

*when
Map(* TransCode == LOGIN , userName == wangzx, password == 123456
)
*then
doSth1()

when
   Map( *TransCode = SaveOrder userName == wangzx category == Book)
*then
  doSth2()

*
the Fact is not a Java Bean, but a dynamic mapString, Object, so the
TransCode == Login is what we means map(TransCode) == Login.

By using map insteam of POJO, we can build a rules run on the message
dispatch, since there is a lot of Message Types, and each message type has
different schema, so using dynamic types is more flexible than POJO.

Can someone tell me how can it be supported in drools? Very thanks.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Resuming the Flow: SESSION_ID, PROCESS_INSTANCE_ID, WORKITEM_ID

2010-03-25 Thread tolitius

Hi Flow Crew,

This is about reloading the session and resuming the flow.

Let's say the flow reached one of its wait states, and was persisted.

Two days later an assigned actor does his/her duties, and the flow can
be resumed.

At this point, we need to call something, let's call it a
WorkflowService, that would have a resumeFlow( someBusinessId ) method that
will be called.

Here is where the question starts...

I understand there are three pieces in this puzzle: SESSION_ID,
PROCESS_INSTANCE_ID and WORKITEM_ID

I also understand that in order to resume the flow, I need to get a hold
of that certain work item that is ready to be completed, and let the flow
know it is completed.

But at the point, where I should resume the flow, I have no reference to
neither SESSION_ID, PROCESS_INSTANCE_ID or WORKFLOW_ID.

1.  How are these three related to each other?

2.  How do I find these three associated IDs?

2.  Which one(s) do I need to resume the flow?

3.  If I (somehow) get the reference to SESSION and PROCESS_INSTANCE
ids, how do I know which work item is ready to be completed?

Thank you,
/Anatoly
-- 
View this message in context: 
http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p607507.html
Sent from the Drools - User 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] Resuming the Flow: SESSION_ID, PROCESS_INSTANCE_ID, WORKITEM_ID

2010-03-25 Thread KiranP

hello tolitius,

  i know its a bit complicated here. but still you must have
sorted it out yourself the three things are as follows

when a process waits for some HumanTask or WorkItem 
WorkItem is available in ExceuteWorkItem parameter as 

workItem.getId();

form workItem itself u can also get processinstance id as

workItem.getProcessInstanceId();

and the sessionId is what i m keeping u as homework

feel free to ask more questions

regards



-
Keep Working :working:
KiranP
-- 
View this message in context: 
http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p617906.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users