Retrieve rule names fired from StatefulknowledgeSession
by G3
Hi
I have retrieved the package from guvnor url and fired the rules using
statefulsession.fireallrules()
I can get the number of rules fired, all the rule names from the guvnor for
the model
but how can I get the names of the rules that is fired.Is there any way to
get it from the session? As my requirement needs that many users may run the
application (not the guvnor application )at the same time so each set of
rules will vary depending on the user who has logged in.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Retrieve-rule-names-f...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
JMS Fusion entry point
by Maurizio Dosso
Hi,
we'd like to use Drools Fusion for processing RFID messages coming from vehicles to be remotely monitored.
I'm quite new to Drools and I'm looking for an example/sample code showing how to define and use a JMS topic as an event entry point for Drools Fusion rules. Can anybody point me to or provide a working code sample ?
Any help would be greatly appreciated.
Thanks a lot for helping.
Maurizio
14 years, 5 months
FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object
by Vijay K Pandey
Hi @Salaboy,
I am not sure if you received the email below. Thanks for looking into this.
Vijay
From: Vijay K Pandey
Sent: Tuesday, July 13, 2010 8:53 AM
To: 'Mauricio Salatino'
Subject: RE: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object
Thanks for a quick response. I added the Transaction Manager piece of code but the problem still persists. Also it uses the attached persistence.xml file which is placed under META-INF directory that has the correct transaction manager look up class.
Thanks
Vijay
From: Mauricio Salatino [mailto:salaboy@gmail.com]
Sent: Tuesday, July 13, 2010 6:40 AM
To: Vijay K Pandey
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object
I've just take a quick look to your file and I notice (without running it) that you didn't set the TransactionManager property to your Environment:
env.set( EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager() );
You also need to have the reference to bitronix inside your persistence.xml file:
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.BTMTransactionManagerLookup"/>
Can you try this and let me know if it fix your problem?
Greetings
On Tue, Jul 13, 2010 at 12:43 AM, Vijay K Pandey <VPandey(a)mdes.ms.gov<mailto:VPandey@mdes.ms.gov>> wrote:
Thanks Salaboy for looking into this.
Here is the Junit Test case(java file attached) I created for this problem.
Line # 129 fails.
Please do let me know if I am doing something wrong or the fix has some issues or maybe there is some other way out to get hold of the "WorkItem" object in the process event listener.
Thanks
Vijay
From: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org> [mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>] On Behalf Of Salaboy
Sent: Friday, July 09, 2010 11:11 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
I would like to take a look on this issue. Can you provide me a test case that show the problem?
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Mauricio "Salaboy" Salatino -
On Jul 9, 2010, at 12:43, Vijay K Pandey <VPandey(a)mdes.ms.gov<mailto:VPandey@mdes.ms.gov>> wrote:
I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the correct behavior? If yes how do we get hold of "WorkItem" instance in the attached listeners?
http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/jav...
Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 15, 2010 9:20 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
Any one on this issue? Any Drools Flow expert?
Appreciate your time for taking a look at it.
Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
Should I log this as a JIRA ticket.
Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
Hi,
There is a change done in Drools 5.1.0.M2 - org.drools.workflow.instance.node.WorkItemNodeInstance class in the method
public void triggerCompleted(WorkItem workItem) at line 196 which is setting the workItemId as -1
this.workItemId = -1;
Due to the above change the listeners which are attached to the "complete" event of the work item - such as the method below
public void beforeNodeLeft(ProcessNodeLeftEvent event) are not able to get hold of the associated workitem object as it returns null.
Is there any specific reason that workItemId is set to -1 even before the associated listeners get triggered or is this a bug?
If it was an intended change then how do I get hold of the "WorkItem" object in the attached listeners.
Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was earlier working on. Above is the only change in this class from the snapshot of 18th April and 5.1.0.M2
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
--
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
14 years, 5 months
Error while executing business Rule
by Puneet duggal
Hi friends,
Some times i gets the error while executing rules so after that
Rules accross entire screen stops working ..
So can anyone tell me what can be the cause
why it becomes unstable after that.
Thanks
Puneet
14 years, 5 months
orm.xml for 5.1.0.M2?
by retoy
Is the orm.xml in drools-persistence-jpa-5.1.0.M2.jar still correct?
I'm getting the exception:
Error in named query: ProcessInstancesWaitingForEvent
org.hibernate.QueryException: cannot dereference scalar collection element:
name [select processInstanceInfo.processInstanceId from
org.drools.persistence.processinstance.ProcessInstanceInfo
processInstanceInfo where :type in (processInstanceInfo.eventTypes.name)]
And the query in orm.xml in fact doesn't seem to reflect the latest changes
in ProcessInstanceInfo.java (?)
--- org.drools.persistence.processinstance.ProcessInstanceInfo.java
// @OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
// @JoinColumn(name = "processInstanceId")
// private Set<EventType> eventTypes = new HashSet<EventType>();
private @CollectionOfElements
@JoinTable(name = "EventTypes", joinColumns = @JoinColumn(name =
"InstanceId"))
Set<String> eventTypes = new HashSet<String>();
--- orm.xml:
<query>
select
processInstanceInfo.processInstanceId
from
ProcessInstanceInfo processInstanceInfo
where
:type in (processInstanceInfo.eventTypes.name)
</query>
(Removing the .name in the query didn't help...)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/orm-xml-for-5-1-0-M2-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Help Needed in Drools Flow
by santosh mukherjee
Hi,
I want to add some of my own customized components to Drools Flow components
pannel. How can this be done. Is there some API available to do so ??
Thanks
Santosh Mukherjee
14 years, 5 months
Debug as within Eclipse
by chris richmond
I used the upate site to update my Eclipse Galileo IDE with the drools
tools, created a new drools project, had it add the hello/goodbye test class
and pointed my workspace to the 5.1M binaries. It runs fine, but when I
Debug As -> Drools Application I get the following errors. I get this error
for any drools project I try to debug as Drools application within Eclipse.
Any ideas?
Thanks,
CHris
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized
[../../../src/share/back/debugInit.c:690]
14 years, 5 months
Problem with CEP/Fusion rules in Guvnor and RuleAgent: unable to determine operator for symbol [after]
by Michael Legart
Hello Drools users
Given the following simple test rule:
rule "test rule 1"
when
$e : Event();
not( Event(id == $e.id && this after[0s,10s] $e ) )
then
System.out.println("Hello");
end
placed in Guvnor and the following simple test project:
ruleagent.properties:
url=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST
TestRuleAgent.java:
RuleAgent agent = RuleAgent.newRuleAgent("/ruleagent.properties");
RuleBase rb = agent.getRuleBase();
throws the following exception:
Exception in thread "main" org.drools.RuntimeDroolsException: unable to determine operator for symbol [after]
at org.drools.base.evaluators.Operator.determineOperator(Operator.java:71)
at org.drools.base.evaluators.Operator.readResolve(Operator.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
[cut objectinputstream lines]
at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189)
at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:158)
at org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:50)
at org.drools.agent.URLScanner.readPackage(URLScanner.java:148)
at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:120)
at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
at ruleagent.RuleAgentTest.main(RuleAgentTest.java:16)
any ideas to what I am doing wrong here?
Thanks
Michael
14 years, 5 months