[jBPM] - Error on task complete.
by Diego Aguirre
Diego Aguirre [https://community.jboss.org/people/diaguirr] created the discussion
"Error on task complete."
To view the discussion, visit: https://community.jboss.org/message/798218#798218
--------------------------------------------------------------
I am working with JBPM 5.1 , integrated with the ESB 4.11 and the AS 5. Actualy, its the enterprise confirguration for this products (SOA-P 5.3 + its JBPM5 integration)
Untill now i have been using some services wich start a single process each one. Those process are fairly complex and include human tasks. This setup was working quite well untill we started using bpmn process to orchestrate those services on more complex ones.
So now we have a service wich starts a process wich calls another service wich start a process with human tasks on it. In this scenario, some times (most times actually) when we complete a human task, an error is thrown in the console, but apparently the task completes normally.
We have experenced some task duplication and taks not being created, and we think this error might be cousing that.
The error trace is the following:
15:40:15,823 ERROR [SingleSessionCommandService] Could not commit session
java.lang.NullPointerException
at org.jbpm.process.instance.impl.ProcessInstanceImpl.setProcess(ProcessInstanceImpl.java:61)
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:375)
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:142)
at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:83)
at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:204)
at org.drools.common.AbstractWorkingMemory.getProcessInstance(AbstractWorkingMemory.java:1100)
at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:295)
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:117)
at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:69)
at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:32)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:355)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
at org.jbpm.task.service.hornetq.CommandBasedHornetQWSHumanTaskHandler$GetResultContentResponseHandler.execute(CommandBasedHornetQWSHumanTaskHandler.java:309)
at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:153)
at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56)
at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:108)
at java.lang.Thread.run(Unknown Source)
15:40:16,630 ERROR [STDERR] Exception in thread "Thread-86"
15:40:16,630 ERROR [STDERR] java.lang.RuntimeException: Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5446
15:40:16,630 ERROR [STDERR] at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:119)
15:40:16,630 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
15:40:16,630 ERROR [STDERR] Caused by: java.lang.NullPointerException
15:40:16,630 ERROR [STDERR] at org.jbpm.process.instance.impl.ProcessInstanceImpl.setProcess(ProcessInstanceImpl.java:61)
15:40:16,630 ERROR [STDERR] at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:375)
15:40:16,630 ERROR [STDERR] at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:142)
15:40:16,630 ERROR [STDERR] at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:83)
15:40:16,630 ERROR [STDERR] at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:204)
15:40:16,630 ERROR [STDERR] at org.drools.common.AbstractWorkingMemory.getProcessInstance(AbstractWorkingMemory.java:1100)
15:40:16,630 ERROR [STDERR] at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:295)
15:40:16,630 ERROR [STDERR] at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:117)
15:40:16,630 ERROR [STDERR] at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:69)
15:40:16,630 ERROR [STDERR] at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:32)
15:40:16,630 ERROR [STDERR] at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
15:40:16,630 ERROR [STDERR] at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:355)
15:40:16,630 ERROR [STDERR] at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
15:40:16,630 ERROR [STDERR] at org.jbpm.task.service.hornetq.CommandBasedHornetQWSHumanTaskHandler$GetResultContentResponseHandler.execute(CommandBasedHornetQWSHumanTaskHandler.java:309)
15:40:16,630 ERROR [STDERR] at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:153)
15:40:16,630 ERROR [STDERR] at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56)
15:40:16,630 ERROR [STDERR] at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:108)
15:40:16,630 ERROR [STDERR] ... 1 more
As the log shows i am usng CommandBasedHornetQWSHumanTaskHandler as the human task work item handler and HornetQTaskClientConnector as the client conector for completing the task (but this happens too if i use the eclipse client).
For starting the process i am using the Bpm5Processor action.
I have been trying to solve this issue for several days now, so any idea or pointer is very welcome.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/798218#798218]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[jBPM] - Whats the state of buildin exception handling in 5.3?
by shizanu
shizanu [https://community.jboss.org/people/shizanu] created the discussion
"Whats the state of buildin exception handling in 5.3?"
To view the discussion, visit: https://community.jboss.org/message/799027#799027
--------------------------------------------------------------
Hello,
I found several older threads saying that in order to change process flow due to exceptions I have to either signal the process from my work item handler or pass the error as a result parameter and then check for errors.
I also found information saying that with 5.3 I can now attach error catch events to all tasks, including service and script tasks. But I currently dont see how I can create a signal for those error catch events to handle.
My goal is to visually represent error handling in my process diagram, to distinguish it from the normal decision flow. Currently I am passing back error messages as result paramters and then check in a XOR node, wether an error occured. However since the same nodes are used for business decisions this is undesirable and I am looking for an alternative.
best wishes
Shizanu
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799027#799027]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[jBPM] - How to use a custom object as process variable
by Shamal Karunarathne
Shamal Karunarathne [https://community.jboss.org/people/shamalk] created the discussion
"How to use a custom object as process variable"
To view the discussion, visit: https://community.jboss.org/message/744959#744959
--------------------------------------------------------------
Hi,
I want to use me.bpm.test.Application as a variable for a process. I'm fully using the web based guvnor designer to design the process.
package me.bpm.test
public class Application
{
public String firstName;
public String lastName;
public Date dateOfBirth;
public String address;
public boolean isApproved = false;
public int getAge()
{
int age;
// some code to calculate age using dateOfBirth
return age;
}
}
1. How do I add this class to Guvnor and/or JBPM Console so that in the runtime console can use the class.
2. How do I define the Mapping (assignment, DataInputSet, DataOutputSet) from freeform templates (.flt) to the process level object? Can I use firstName_out->Application.firstName ?
Thanks in Advanced.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744959#744959]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[jBPM] - jBPM5.4 Integrating tomcat6 with jbpm-console jBPM-console
by Joe Chang
Joe Chang [https://community.jboss.org/people/chun521] created the discussion
"jBPM5.4 Integrating tomcat6 with jbpm-console jBPM-console"
To view the discussion, visit: https://community.jboss.org/message/798273#798273
--------------------------------------------------------------
who can help me?
*******************************************************
tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="user"/>
<user username="admin" password="" roles="admin,manager"/>
<user username="mary" password="mary" roles="user"/>
<user username="john" password="john" roles="user"/>
<user username="william" password="william" roles="user"/>
</tomcat-users>
*****************************************************************************************
========================================
persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence"
xmlns:orm=" http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
<mapping-file>META-INF/ProcessInstanceInfoMapping-JPA2.xml</mapping-file>
<mapping-file>META-INF/ExtraIndexes.hbm.xml</mapping-file>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/jbpm55?useUnicode=true&characterEncoding=UTF-8"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.connection.password" value="mysql"/>
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
<property name="hibernate.id.new_generator_mappings" value="false" />
</properties>
</persistence-unit>
</persistence>
===================================================
2013-2-19 16:53:21 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet Resteasy threw exception
org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Session was not initialized, check previous errors in log
at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345)
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321)
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Session was not initialized, check previous errors in log
at org.jbpm.integration.console.StatefulKnowledgeSessionUtil.getStatefulKnowledgeSession(StatefulKnowledgeSessionUtil.java:89)
at org.jbpm.integration.console.SessionInitializer.<init>(SessionInitializer.java:25)
at org.jbpm.integration.console.TaskManagement.<init>(TaskManagement.java:52)
at org.jbpm.integration.console.ManagementFactory.createTaskManagement(ManagementFactory.java:26)
at org.jbpm.integration.console.ManagementFactory.createTaskManagement(ManagementFactory.java:19)
at org.jboss.bpm.console.server.TaskListFacade.getTaskManagement(TaskListFacade.java:72)
at org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:101)
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.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
... 22 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/798273#798273]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month