[JBoss jBPM] - jbpm4 and oracle application server integration
by stup
Hi friends!
I am facing some problems during jbpm4 and OAS integration.
I am using default jbpm configs with one exception - i switched to JTA transaction interceptor to use oas bean-managed transactions. I configured hibernate to use my datasource also.
My test process could not connect to database, so i started debugging jbpm and this is what i found:
at org.jbpm.pvm.internal.tx.jta.JtaTransaction User transaction is looked up using
public static final String JNDINAME_USERTRANSACTION_JBOSS_GLOBAL = "UserTransaction";
JNDI. But in OAS UserTransaction is bound to "java:comp/UserTransaction".
Ive changed JNDINAME_USERTRANSACTION_JBOSS_GLOBAL to "java:comp/UserTransaction" and everything start working correctly.
Now i am wondering if there is any way to do same stuff without changing your sources?
Any help will be appreciated
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249384#4249384
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249384
16 years, 8 months
[JBoss jBPM] - exception-handler with custom exception in jbpm 3.2.6
by massimo.zanette
Hi,
I'm not able to define an exeption-handler that handle Exception included inside the process archive. I'm using jbpm 3.2.6SP1 with jboss 5.0.1 and jboss 4.2.3.
That's the problem:
Using JBPM console I deploy a process archive with this process definition:
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="testException">
| <start-state name="start">
| <transition to="state1"></transition>
| <event type="node-leave">
| <script name="sysout">
| java.lang.System.out.println("---STARTING PROCESS testException--- ");
| </script>
| </event>
| </start-state>
| <state name="state1">
| <transition to="end-state">
| <action name="ThrowMyException" class="com.sample.action.ThrowMyExceptionActionHandler"></action>
| </transition>
| </state>
| <end-state name="end-state">
| <event type="node-enter">
| <script name="sysout">
| java.lang.System.out.println("---END PROCESS testException--- ");
| </script>
| </event>
| </end-state>
| <exception-handler exception-class="com.sample.action.MyException">
| <action name="exceptionHandler"
| class="com.sample.action.MyExceptionHandler">
| </action>
| </exception-handler>
| </process-definition>
|
When the execution enter "state1" i can see that:
- com.sample.action.ThrowMyExceptionActionHandler is entered
- This action is empty, it only throws a com.sample.action.MyException-
- com.sample.action.MyExceptionHandler is not reached and JBPMConsole report this error:
Error signalling token: An exception of type "org.jbpm.JbpmException"
was thrown. The message is: class not found 'com.sample.action.MyException'
If i change the exception-class with java.lang.Exception inside the excpetion-handler the exception will be correctly caught and the process execution finish without problems.
| <exception-handler exception-class="java.lang.Exception">
| <action name="exceptionHandler"
| class="com.sample.action.MyExceptionHandler">
| </action>
| </exception-handler>
|
I don't experience this problem if i try this process with a simple JUnit test case.
Am i doing something wrong?
Thanks
Max
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249369#4249369
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249369
16 years, 8 months
[JBoss jBPM] - struggling getting to grips with jbpm
by mmusaji
Hi, I'm hoping someone can point me in the right direction. I have a number of problems with Jbpm but they are probably all related to the fact that I need to learn a lot more about it.
But I have come to a stop when it comes to implementing a workflow with a fork in it. I'm using JBPM 4.0. When I attempt to run my test class I get an SQL exception.
This is the code I am using to test my workflow.
| deploymentId = repositoryService.createDeployment()
| .addResourceFromClasspath("process.jpdl.xml").deploy();
|
| ProcessInstance processInstance = executionService.startProcessInstanceByKey("process");
| String processInstanceId = processInstance.getId();
|
My work flow looks something like this. I've simplified it but I'm pretty sure I'm doing something pretty basic wrong here.
| <process name="process" xmlns="http://jbpm.org/4.0/jpdl">
| <start>
| <transition to="first transition" name=""/>
| </start>
|
| <java class="org.companyname.class.AClass" method="execute" name="first transition">
| <transition name="" to="fork"/>
| </java>
|
| <fork name="fork">
| <transition name="" to="start a process" />
| <transition name="" to="start second process" />
| </fork>
|
| <java class="org.companyname.class.BClass" method="execute" name="start a process">
| <transition name="" to="join"/
| </java>
|
| <java class="org.companyname.class.BClass" method="execute" name="start second process">
| <transition name="" to="join"/
| </java>
|
| <join name="join">
| <transition name="" to="process joined"/>
| </join>
|
| <java class="org.companyname.class.CClass" method="execute" name="process joined">
| <transition name="" to="end"/
| </java>
|
| <end name="end"/>
| </process>
|
The exception I'm getting is this
16:55:02,332 WRN | [JDBCExceptionReporter] SQL Error: 1062, SQLState: 23000
| 16:55:02,332 SEV | [JDBCExceptionReporter] Duplicate entry 'fraud.70.' for key 2
If anyone can provide me with any sort of guidance then it would much appreciated. As you can probably tell I'm on a steep learning curve with Jboss and JBPM.
Regards
M
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249270#4249270
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249270
16 years, 8 months