[JBoss jBPM] - Re: Maintenance and Repair Tools
by michaelholtzman
bestage:
anonymous wrote : How do you re-use the jBPM component in multiple applications? Are you distributing a jar and use a central jbpm db for the tables? This is what I am planning to do in one of my projects. But I was also thinking about the possible deadlock issues.
Yes, this is the tricky part. We use a central jBPM database. We have a java app written around jBPM, which can have multiple processing threads. We can run multiple copies of this java app concurrently. A central app manages jBPM requests and forwards them to one of the java apps (but does not call into jBPM directly).
When a start process instance request is made, the central app sends that command to one of the java apps, and saves the instance id that was started along with the id of the app that is running it. From that point on, any request targeted at that process instance will be handled by the same java app.
Similarly, within the java app there is a hash table that links the instance id to the thread number that started the instance, and all operations on that instance are handled by that thread.
As long as the jBPM tables are indexed on all foreign keys (and, if necessary, configured for row locking) the threads can operate on the database without stepping on each other.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249943#4249943
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249943
16 years, 7 months
[JBoss jBPM] - Re: timer in ear: nothing happens
by parszab
"parszab" wrote :
| It seems to work: I get an exception ("Transaction is not active: tx=TransactionImple < ac") -- but the timers are created and run properly.
|
I beleive it is because the CMT transactions don't get propagated to the TimerEntity bean somehow when the timers are created. One issue is that the timers don't get deleted this way -- at least that is, what the log says:
| 14:37:49,853 WARN [DatabasePersistencePolicy] Unable to delete timer
| org.jboss.util.NestedSQLException: Transaction is not active:
| tx=TransactionImple < ac, BasicAction: 7f000101:90b1:4a894efe:9a status: ActionStatus.ABORTED >;
| - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:90b1:4a894efe:9a status: ActionStatus.ABORTED >)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.deleteTimer(GeneralPurposeDatabasePersistencePlugin.java:311)
| at org.jboss.ejb.txtimer.DatabasePersistencePolicy.deleteTimer(DatabasePersistencePolicy.java:139)
| 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy243.deleteTimer(Unknown Source)
| at org.jboss.ejb.txtimer.TimerServiceImpl.shutdown(TimerServiceImpl.java:138)
| ....
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249919#4249919
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249919
16 years, 7 months
[JBoss jBPM] - Problems with Taskforms: forms cannot be found / NullPointer
by sebastian.s
Hello!
I used the following process to play around with jBPM. Everything worked fine. Lately I added forms to the user tasks. At first just for the first task which is named "request". I could login, open the task and I saw the form. Submitting also worked fine. Afterwards I loggged in as a different user to perform the following tasks and the the form for "hr_review" did not work. Instead an Exception was thrown.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process description="Urlaubsantrag zum Test der Process Engine" name="demonstration_vacation_request" xmlns="http://jbpm.org/4.0/jpdl" key="demo" version="1">
| <start g="152,6,48,48" name="start1">
| <transition g="-72,-19" name="to request" to="request"/>
| </start>
| <end g="149,456,48,48" name="end1"/>
| <task assignee="mary" form="request.ftl" g="130,87,92,52" name="request">
| <transition g="-49,-21" name="to fork1" to="fork1"/>
| </task>
| <fork g="153,174,48,48" name="fork1">
| <transition g="22,-21" name="to proj_review" to="proj_review"/>
| <transition g="-68,-24" name="to hr_review" to="hr_review"/>
| </fork>
| <task assignee="mike" form="proj_review.ftl" g="236,257,92,52" name="proj_review">
| <transition g="16,-6" name="to exclusive1" to="decision"/>
| </task>
| <java class="Vacation" g="321,349,101,52" method="save" name="save_vacation">
| <transition g="-48,-21" name="to end1" to="end1"/>
| </java>
| <task assignee="alex" form="hr_review.ftl" g="47,257,92,52" name="hr_review">
| <transition g="-105,-13" name="to exclusive1" to="decision"/>
| </task>
| <decision g="155,341,48,48" name="decision">
| <handler class="Evaluation" />
| <transition g="-48,-21" name="to end1" to="end1"/>
| <transition g="-51,-21" name="to save_vacation" to="save_vacation"/>
| </decision>
| </process>
|
| 13:00:08,481 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exc
| eption
| org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Unexpecte
| d invocation exception: null
| at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationExcept
| ion(SynchronousDispatcher.java:319)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleException(Synchro
| nousDispatcher.java:230)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(
| SynchronousDispatcher.java:206)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:360)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:173)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:93)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:68)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilte
| r.java:59)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:190)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
| ss(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
| e(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 7)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.RuntimeException: Unexpected invocation exception: null
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:80)
| at $Proxy143.provideForm(Unknown Source)
| at org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormPro
| cessingFacade.java:181)
| at org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormPr
| ocessingFacade.java:120)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
| java:117)
| at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
| java:260)
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232
| )
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166
| )
| at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(Dispatch
| erUtilities.java:142)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:356)
| ... 28 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:64)
| ... 41 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.integration.console.forms.TaskFormDispatcher.provideForm(Tas
| kFormDispatcher.java:149)
| at org.jbpm.integration.console.forms.FormDispatcherComposite.provideFor
| m(FormDispatcherComposite.java:65)
| ... 46 more
| 13:00:08,559 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exc
| eption
| org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Unexpecte
| d invocation exception: null
| at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationExcept
| ion(SynchronousDispatcher.java:319)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleException(Synchro
| nousDispatcher.java:230)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(
| SynchronousDispatcher.java:206)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:360)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:173)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:93)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:68)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilte
| r.java:59)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:190)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
| ss(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
| e(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 7)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.RuntimeException: Unexpected invocation exception: null
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:80)
| at $Proxy143.provideForm(Unknown Source)
| at org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormPro
| cessingFacade.java:181)
| at org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormPr
| ocessingFacade.java:120)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
| java:117)
| at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
| java:260)
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232
| )
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166
| )
| at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(Dispatch
| erUtilities.java:142)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:356)
| ... 28 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:64)
| ... 41 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.integration.console.forms.TaskFormDispatcher.provideForm(Tas
| kFormDispatcher.java:149)
| at org.jbpm.integration.console.forms.FormDispatcherComposite.provideFor
| m(FormDispatcherComposite.java:65)
| ... 46 more
|
Here are the two forms. The first one is taken from one of the examples.
| <html>
| <body>
|
| <h2>How many days would you like to go on vacation?</h2>
| <form action="${form.action}" method="POST" enctype="multipart/form-data">
| <select name="number_of_days">
| <option value="3">3 days</option>
| <option value="5">5 days</option>
| <option value="10">10 days</option>
| </select><br>
|
| <#list outcome.values as transition>
| <input type="submit" name="outcome" value="${transition}">
| </#list>
|
| </form>
| </body>
| </html>
|
| <html>
| <body>
|
| <h2>[Human Resources]Do you approve the vacation request?</h2>
| <form action="${form.action}" method="POST" enctype="multipart/form-data">
| <select name="acceptance_hr">
| <option value="yes">yes</option>
| <option value="no">no</option>
| </select><br>
|
| <#list outcome.values as transition>
| <input type="submit" name="outcome" value="${transition}">
| </#list>
|
| </form>
| </body>
| </html>
|
I am kind of confused since I do not really see a difference which would explain why the first one works properly and the second one does not.
Any hints?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249896#4249896
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249896
16 years, 7 months