[jBPM] - Problem Bitronix Transaction, Spring, Jbpm5.2
by Ricardo Chiriboga
Ricardo Chiriboga [https://community.jboss.org/people/rachirib] created the discussion
"Problem Bitronix Transaction, Spring, Jbpm5.2"
To view the discussion, visit: https://community.jboss.org/message/649520#649520
--------------------------------------------------------------
Hi,
Anyone can help me? i have a structure in JBPM 5.2 with Spring, i have to use LocalTaskService to do one global transaction, but when i create a process sometimes throws this exception and sometimes dont.
javax.persistence.PersistenceException: java.lang.NullPointerException
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:478)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:193)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:120)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:374)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy43.iniciarProceso(Unknown Source)
at co.edu.javerianacali.stp.bpm.facade.impl.JbpmFacadeImpl.iniciarProceso(JbpmFacadeImpl.java:59)
at co.edu.javerianacali.stp.bpm.JbpmIntegrationTest.crearProceso(JbpmIntegrationTest.java:41)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NullPointerException
at org.drools.marshalling.impl.OutputMarshaller.writeLeftTuple(OutputMarshaller.java:711)
at org.drools.marshalling.impl.OutputMarshaller.writeLeftTuples(OutputMarshaller.java:557)
at org.drools.marshalling.impl.OutputMarshaller.writeFactHandles(OutputMarshaller.java:361)
at org.drools.marshalling.impl.OutputMarshaller.writeSession(OutputMarshaller.java:143)
at org.drools.marshalling.impl.DefaultMarshaller.marshall(DefaultMarshaller.java:143)
at org.drools.marshalling.impl.DefaultMarshaller.marshall(DefaultMarshaller.java:126)
at org.drools.persistence.SessionMarshallingHelper.getSnapshot(SessionMarshallingHelper.java:72)
at org.drools.persistence.info.SessionInfo.update(SessionInfo.java:84)
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.hibernate.ejb.event.BeanCallback.invoke(BeanCallback.java:23)
at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:80)
at org.hibernate.ejb.event.EntityCallbackHandler.preUpdate(EntityCallbackHandler.java:65)
at org.hibernate.ejb.event.EJB3FlushEntityEventListener.invokeInterceptor(EJB3FlushEntityEventListener.java:41)
at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:330)
at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:270)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:151)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:49)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)
... 41 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/649520#649520]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - User Task Group Assignment
by Charlie B
Charlie B [https://community.jboss.org/people/charliebarjel] created the discussion
"User Task Group Assignment"
To view the discussion, visit: https://community.jboss.org/message/649337#649337
--------------------------------------------------------------
I have a set of Uer Tasks in my workflow.
Now with each task, only a specific GROUP of users should be able to execute and complete that task.
Before assigning a task to a user, I need to determine if they are part of the authorized group.
How can I achieve this in JBPM5?
How can I determine which Group(s) is authorised to claim and complete a User Task?
I am currently using the ActorId attribute to store the username of user who the task will be assigned to? Can I use this in conjuction with the GroupId attribute to specify that any user that this task is assigned to MUST be part of this Group? Is that how that attribute is used?
Also, is there a way to retrieve the GroupId through API to dynamically render user lists when a task needs to be assigned to a user from the authorised group?
Charlie B
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/649337#649337]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - Using jbpm-human-task-war.war instead of DemoTaskService.class
by Junaid Mohammed
Junaid Mohammed [https://community.jboss.org/people/junaidmohammed] created the discussion
"Using jbpm-human-task-war.war instead of DemoTaskService.class"
To view the discussion, visit: https://community.jboss.org/message/649518#649518
--------------------------------------------------------------
Hi,
The JBPM Human Task Service WAR is not actually bundled with the 5.2 full installer.
Nonetheless, I managed to somehow find and grab it from http://repo1.maven.org/maven2/org/jbpm/jbpm-human-task-war/5.2.0.Final/jb... http://repo1.maven.org/maven2/org/jbpm/jbpm-human-task-war/5.2.0.Final/jb....
It seems to deploy effortlessly on the JBoss AS7 that comes bundled with the 5.2 full installer.
However, switching from running DemoTaskService.class outside of any container, to running the jbpm-human-task-war.war is not so straight-forward as I hoped.
>From closer inspection - of the jbpm-human-task-war.war source, it seems that the main class, HumanTaskServiceServlet.java, has identical logic to the DemoTaskService.java.
Therefore, I assumed that the Mina Task Server that is created would still be visible on 127.0.0.1:9123. But this doesn't seem to be the case.
Unfortunately, with no other changes, this still causes a problem for the GWT BPM Console, which reports and error: "Could not connect task client".
Please could you advise what further configuration would be required to be able to use the jbpm-human-task-war.war with the demo setup?
Many thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/649518#649518]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - Human task editor, example
by Matthew Young
Matthew Young [https://community.jboss.org/people/young_matthewd] created the discussion
"Human task editor, example"
To view the discussion, visit: https://community.jboss.org/message/649472#649472
--------------------------------------------------------------
Trying to setup JBPM in Eclipse without using the installer....
Wanted to rig the JBPM/Drools tools without using the installer (too heavy for my tastes, wanted to be able to suck necessary jars via Ivy rather than having a JBRM RUNTIME among other things). Using Indigo Eclipse. Pulled down the Drools/JBPM tools from:
https://community.jboss.org/servlet/JiveServlet/download/15922-7-25925/jb... https://repository.jboss.org/nexus/content/repositories/releases/org/droo...
And did a local site with Eclipse adding the following (5.3.1.Final):
JBoss Drools Core
JBoss Drools Guvnor
JBoss Drools Task
JBoss jBPM Core
JBoss jBPM Taks
Already had BPMN2 Editor (0.0.1) and the BPMN2 Project Feature (0.7.0) along with Graphiti/Graphitit SDK 0.8.1.
Setup a normal Java project and pulled in the ProcessTest class and the Evaluation.bpmn files from the JBPM-Installer samples. Used the following in Ivy:
<dependencies>
<dependency org="org.jbpm" name="jbpm-bpmn2" rev="5.2.0.Final" conf="runtime->runtime, master"/>
<dependency org="org.jbpm" name="jbpm-human-task" rev="5.2.0.Final" conf="runtime->runtime,master"/>
<dependency org="com.h2database" name="h2" rev="1.3.161" conf="runtime->master"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.0" conf="runtime->master" />
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.0" conf="runtime->master" />
<dependency org="log4j" name="log4j" rev="1.2.16" conf="runtime->master" />
<dependency org="org.drools" name="drools-core" rev="5.3.1.Final" conf="runtime->master"/>
</dependencies>
With grabs a bunch of stuff that I fill funnel down later. Anyways.....when I run the ProcessTest it is suppost to register a Human task (on address 127.0,0.1 and the default port 9123). But the underlying NIO connector fails when starting the process:
java.lang.IllegalArgumentException: Could not connect task client
at org.jbpm.process.workitem.wsht.WSHumanTaskHandler.connect(WSHumanTaskHandler.java:76)
Why? No idea. Log4j logging gives nothing. Wondering if I am missing a jar (the h2 is there)?
This is my first time using Drools/JBPM. The ProcessTest.java basically setups up a KnowledgeBase and loads the Evaluation.bpmn from the classpath (no problems there). A session is created from the knowledge base. The Human Task (new WSHumanTaskHandler) is registered. A couple of parameters are registered when starting the "com.smaple.evaluation" process. That's it.
Another thing is that I don't have a Human Task Editor for bpmn files? Am I missing a feature/plugin?
Thanks in advance / Matthew
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/649472#649472]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Tools] - JBoss Source Lookup
by Snjezana Peco
Snjezana Peco [https://community.jboss.org/people/snjeza] modified the blog post:
"JBoss Source Lookup"
To view the blog post, visit: https://community.jboss.org/community/tools/blog/2012/01/24/jboss-source-...
--------------------------------------------------------------
The JBoss Tools Source Lookup plugin automatically adds a source attachment when debugging JBoss AS servers.
The plugin has been tested with JBoss AS 7.x and JBoss AS 6.1.
h4. Installing the JBoss Source Lookup plugin
* install JBoss Tools 3.3 as described in https://community.jboss.org/community/tools/blog/2011/12/18/learn-java-ee... Learn Java EE 6 quickly using JBoss Central
* call Help>Install New Software..., click the Add button and enter the following update site:
https://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/org.jboss.too... https://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/org.jboss.too...
https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17822/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
Install the JBoss Tools Source Lookup category and restart Eclipse.
h4. Using the JBoss Source Lookup plugin
* set up the central JBoss Maven repository as explained in: https://community.jboss.org/docs/DOC-15169 Maven Getting Started - Users
* create the jboss-as-helloworld project by following the instructions in https://community.jboss.org/community/tools/blog/2011/12/18/learn-java-ee... Learn Java EE 6 quickly using JBoss Central
* wait for Maven to refresh indexes
The use and debugging of this plugin is demonstrated in the following screencast: http://screencast.com/t/i6k9hzkjViOs Debugging JBoss AS server.
The JBoss Source Lookup plugin enhances source attachment in the following way:
* archive file doesn't have to be in the maven classpath
* archive file doesn't have to be included in the classpath (jbossweb-*.jar, for instance). The JBoss Source Lookup plugin will find a class within a JBoss AS distribution and, if it is a Maven artifact, the plugin will attach the corresponding source.
* archive file doesn't have to be in the m2e index (jbossjts-4.16.0.Final.jar, for instance)
You don't have to add any JBoss AS Runtime to the classpath. I have added it in order to ensure the classes within the runtime are included in the Java Search and in order to be easier to add a breakpoint.
h4. Debugging Apache Tomcat and Glassfish servers
The JBoss Source plugin can serve to debug other servers.
If a server includes mavenized archives, the JBoss Source container will find, download, and show source files.
I have tested the Apache Tomcat 7.0.25 and Glassfish 3.1.1.
If you want to debug Apache Tomcat and/or Glassfish, you have to do the following:
* create some Apache Tomcat/Glassfish server https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17852/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* open the server editor https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17854/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* click *Open launch configuration* and select the *Source* tab https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17855/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* click the *Add* button and select the *JBoss AS Source Container* https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17857/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* JBoss AS servers will be automatically recognized and you can choose them by clicking a server
As to other servers, you need to click the *Choose Home* button, select all the directories in which the server's archives are placed.
If you debug Tomcat, you can choose $TOMCAT_HOME/lib. When debugging Glassfish, you can choose $GLASSFISH_HOME/lib and $GLASSFISH_HOME/modules.
You can add as many JBoss AS Source containers as you want.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17858/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* move a JBoss Source container(s) to the end (optional) https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17859/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* you can add a Server Runtime container to the project's classpath (optional) https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17860/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* start the server in the debug mode https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17861/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
*StandardWrapper.java* is placed in the glassfish's *web-core.jar*.
The Source Lookup plugin finds this archive's source and shows it in the editor.
In a similar way you can debug Apache Tomcat server.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17862/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
The *ApplicationFilterChain.java* is placed in the Tomcat's *catalina.jar* archive.
The Source Lookup plugin finds source for a mavenized archive as follows:
* using the m2e API
* using the archive's metadata (META-INF/maven)
* using nexus repositories that can be defined using the Source Lookup preferences page https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17863/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
The Source Lookup preferences page enables you to add/remove, enable/disable and/or change ordering of Nexus repositories.
You can see that the *helloworld* project I have used in this blog, *is not a maven project* (it doesn't contain the maven icon).
JBoss Source Lookup plugin can be used to debug any Java project.
The plugin doesn't have to be used for debugging only.
It will find, download and open a source file for a mavenized archive included in the classpath when double-clicking a class file in the *Package Explorer* view, opening it using *Navigate>Open Type* or some other way.
The JBoss Source Lookup plugin can be used for any Java project and any launch configuration.
*Note*: When starting debugging the first time, it could take some time until m2e updates indexes and the JBoss Source lookup plugin scans the container's directory.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/community/tools/blog/2012/01/24/jboss-source-...]
12 years, 2 months