-
1. Re: JBPM and Drool sample application throwing an Exception.
swiderski.maciej May 13, 2010 4:40 AM (in response to felixkjose)Hi,
try to deploy your drl file together with jpdl.xml file.
repositoryService.createDeployment().addResourceFromClasspath("hello_world.jpdl.xml"). addResourceFromClasspath("checkAnalystAvailable.drl"). deploy();
HTH
Maciej
-
2. Re: JBPM and Drool sample application throwing an Exception.
felixkjose May 13, 2010 7:08 AM (in response to swiderski.maciej)Hi Maceij,
Thank you very much, that problem got solved. Now I am getting another exception as follows:
Exception in thread "main"
org.jbpm.api.JbpmException:
error: drl problem: [ERR 101] Line 1:0 no viable alternative at input '<'
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(
ProblemList.java:175)
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(
ProblemList.java:141)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(
DeployerManager.java:50)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(
RepositorySessionImpl.java:61)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(
DeployCmd.java:47)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(
DeployCmd.java:33)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(
DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(
StandardTransactionInterceptor.java:54)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(
EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(
EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(
RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(
SkipInterceptor.java:43)
at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(
DeploymentImpl.java:91)
at com.felix.poc.MainDriver.main(
MainDriver.java:33)
Can you please give me resolution for the same?. I have tried with two types of rules files. And I am attaching both with this. Both the cases I am getting the same exception.
-
checkAnalystAvailable_Type2.drl.zip 342 bytes
-
checkAnalystAvailable_Type1.drl.zip 480 bytes
-
-
3. Re: JBPM and Drool sample application throwing an Exception.
swiderski.maciej May 13, 2010 8:16 AM (in response to felixkjose)Hi,
I managed to run your process with following rule definition:
rule "checkAnalystAvailable" when analystFinder : com.felix.poc.AnalystFinder( analyst=="FELIX", region == "BELGIUM" ) then analystFinder.setAnalystAvailable( true ); System.out.println( "Checking.........." ); end
This was the only change required to run it properly.
Cheers,
Maciej
-
4. Re: JBPM and Drool sample application throwing an Exception.
felixkjose May 14, 2010 1:33 AM (in response to swiderski.maciej)Hi Maceij,
Thank you very much. I have made the changes as you told and it starts working. Once again thanks alot.
Hi All,
If anybody needs the sample program for JBPM and Drools please contact me I will share the same with all the dependencies jars..
Thank You and Regards,
Felix K Jose
-
5. Re: JBPM and Drool sample application throwing an Exception.
rebody May 14, 2010 2:18 AM (in response to swiderski.maciej)Hi Maciej,
I am not good at drools. Does it mean that jbpm4 couldn't fully support drools? Should we open an issue for this?
-
6. Re: JBPM and Drool sample application throwing an Exception.
swiderski.maciej May 14, 2010 2:54 AM (in response to rebody)No, jBPM supports Drools rules properly. There were just few small modifications in rule file and how it is deployed.
So no need for an issue.
-
7. Re: JBPM and Drool sample application throwing an Exception.
sanjaykm Jun 17, 2010 6:42 AM (in response to felixkjose)Hi Felix,
Can you please share the application with all dependancies.
Regards,
Sanjay
-
8. Re: JBPM and Drool sample application throwing an Exception.
popsubhas Sep 21, 2010 3:47 PM (in response to sanjaykm)Thanks Felix and Maciej.
Download from Felix's post.
Delete all jars except as following
==============
log4j.jar
mail.jar
slf4j-api-1.5.8.jar
slf4j-log4j12.jar
spring.jar
Copy these following jars from jBPM 4.4 distribution
=================
antlr-runtime.jar
antlr.jar
commons-collections.jar
core.jar
dom4j.jar
drools-api.jar
drools-compiler.jar
drools-core.jar
hibernate-core.jar
hsqldb.jar
javassist.jar
jbpm.jar
jta-1.1.jar
juel-api.jar
juel-engine.jar
juel-impl.jar
mvel2.jar
Change the code as per Maciej
========================
repositoryService.createDeployment().addResourceFromClasspath("hello_world.jpdl.xml"). addResourceFromClasspath("checkAnalystAvailable.drl"). deploy();
rule "checkAnalystAvailable" when analystFinder : com.felix.poc.AnalystFinder( analyst=="FELIX", region == "BELGIUM" ) then analystFinder.setAnalystAvailable( true ); System.out.println( "Checking.........." ); end
Run MainDriver.