[jboss-user] [JBoss jBPM] - How to invoke rules(drools) from a jBPM

rinki do-not-reply at jboss.com
Tue Nov 4 08:03:46 EST 2008


Hello,

I am using eclipse3.4, jbpm-jpdl-3.2.3, and drools-5.0.0.MR2-bin.
I was trying to invoke rules from from my jbpm project.
I am geting the below error:

8:21:31,500 [main] INFO  JbpmConfiguration : using jbpm configuration resource 'jbpm.cfg.xml'
18:21:31,515 [main] DEBUG JbpmConfiguration : loading defaults in jbpm configuration
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'default.jbpm.context'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.hibernate.cfg.xml'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.business.calendar'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.default.modules'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.converter'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.action.types'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.node.types'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.parsers'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.varmapping'
18:21:31,718 [main] DEBUG ObjectFactoryImpl : adding object info 'resource.mail.templates'
18:21:31,734 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.byte.block.size'
18:21:31,734 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.task.instance.factory'
18:21:31,734 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.variable.resolver'
18:21:31,734 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.mail.smtp.host'
18:21:31,734 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.mail.address.resolver'
18:21:31,734 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.mail.from.address'
18:21:31,750 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpm.job.executor'
18:21:31,750 [main] DEBUG JbpmConfiguration : loading specific configuration...
18:21:31,750 [main] DEBUG ObjectFactoryImpl : adding object info 'jbpmConfiguration'
18:21:31,765 [main] INFO  StaleObjectLogConfigurer : stale object exceptions will be hidden from logging
18:21:31,859 [main] DEBUG JpdlParser$JpdlEntityResolver : resolving schema reference publicId(null) systemId(http://jbpm.org/jpdl-3.2.xsd)
18:21:31,859 [main] DEBUG JpdlParser$JpdlEntityResolver : providing input source to local 'jpdl-3.2.xsd' resource
18:21:32,140 [main] DEBUG GraphElement : event 'process-start' on 'ProcessDefinition(JbpmDroolsExample)' for 'Token(/)'
18:21:32,156 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)'
18:21:32,156 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)'
18:21:32,156 [main] DEBUG GraphElement : event 'transition' on 'Transition(148cc8c)' for 'Token(/)'
18:21:32,156 [main] DEBUG GraphElement : event 'node-enter' on 'Node(ship)' for 'Token(/)'
18:21:32,156 [main] DEBUG GraphElement : executing action 'action[fireRules]'
18:21:32,156 [main] DEBUG Token : token[0] is locked by token[0]
java.lang.NullPointerException
	at java.io.Reader.(Reader.java:61)
	at java.io.InputStreamReader.(InputStreamReader.java:55)
	at com.sample.action.FireRulesActionHandler.readRule(FireRulesActionHandler.java:44)
	at com.sample.action.FireRulesActionHandler.execute(FireRulesActionHandler.java:28)
	at org.jbpm.graph.def.Action.execute(Action.java:122)
	at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
	at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
	at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
	at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
	at org.jbpm.graph.def.Node.enter(Node.java:302)
	at org.jbpm.graph.def.Transition.take(Transition.java:151)
	at org.jbpm.graph.def.Node.leave(Node.java:393)
	at org.jbpm.graph.node.StartState.leave(StartState.java:70)
	at org.jbpm.graph.exe.Token.signal(Token.java:192)
	at org.jbpm.graph.exe.Token.signal(Token.java:140)
	at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:270)
	at com.sample.test.TestDroolsInvocation.main(TestDroolsInvocation.java:17)
18:21:32,202 [main] DEBUG Token : token[0] is unlocked by token[0]
18:21:32,218 [main] DEBUG GraphElement : event 'node-leave' on 'Node(ship)' for 'Token(/)'
18:21:32,218 [main] DEBUG GraphElement : event 'transition' on 'Transition(6d084b)' for 'Token(/)'
18:21:32,218 [main] DEBUG GraphElement : event 'node-enter' on 'EndState(end)' for 'Token(/)'
18:21:32,218 [main] DEBUG GraphElement : event 'process-end' on 'ProcessDefinition(JbpmDroolsExample)' for 'Token(/)'
18:21:32,218 [main] DEBUG GraphElement : event 'after-signal' on 'StartState(start)' for 'Token(/)'
Ended!!!

Even when I am hard coding the .drl path its not being picked.
Any help will be greatly appreciated.

Regards,
Ruchika


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186676#4186676

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186676



More information about the jboss-user mailing list