2 Replies Latest reply on Nov 5, 2012 6:35 AM by franco80

    jbpm 5.3 Starting process with task and redeploy application on jboss 7.1.1

    franco80 Novice

      Hello all

       

      i have a question, first time I started process with one task (task with start and complete), everything work

       

      when I build my ear application (but without any changes) and install it to jboss 7.1.1 to deploy directory and again start process I recived in time when I run session.startProcess() but all data is saving in database (I think that, for example processInstanceByteArray exist):

       

      14:52:11,418 ERROR [org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler] (http-localhost-127.0.0.1-8080-2) Tue Oct 23 14:52:11 CEST 2012: Error when creating task on task server for work item id 6. Error reported by task server: Task operation request timed out: java.lang.RuntimeException: Task operation request timed out

          at org.jbpm.task.service.SyncTaskServiceWrapper.addTask(SyncTaskServiceWrapper.java:118) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:145) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]

          at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55) [drools-persistence-jpa-5.4.0.Final.jar:5.4.0.Final]

          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:303) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]

          at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082) [drools-core-5.4.0.Final.jar:5.4.0.Final]

          at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320) [drools-core-5.4.0.Final.jar:5.4.0.Final]

          at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:120) [drools-core-5.4.0.Final.jar:5.4.0.Final]

          at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39) [drools-core-5.4.0.Final.jar:5.4.0.Final]

          at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-5.4.0.Final.jar:5.4.0.Final]

          at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:367) [drools-persistence-jpa-5.4.0.Final.jar:5.4.0.Final]

          at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223) [drools-core-5.4.0.Final.jar:5.4.0.Final]

          at com.kampa.mbean.ProcessJob.initAndStartProcess(ProcessJob.java:73) [classes:]

          at com.kampa.mbean.CampaignBean.accept(CampaignBean.java:401) [classes:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_07]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_07]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_07]

          at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_07]

          at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.13.Final.jar:]

          at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]

          at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]

       

       

       

      after above when process start with error like above automaticly running method: client.getTasksAssignedAsPotentialOwner(user,    groups, LANG); (client is TaskService, I don't use TaskClient)

       

      recived:

       

       

      14:53:34,618 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) java.lang.RuntimeException: Timeout : unable to retrieve results

       

      14:53:34,618 ERROR [stderr] (http-localhost-127.0.0.1-8080-2)     at org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler.getResults(BlockingTaskSummaryResponseHandler.java:41)

       

      14:53:34,618 ERROR [stderr] (http-localhost-127.0.0.1-8080-2)     at org.jbpm.task.service.SyncTaskServiceWrapper.getTasksAssignedAsPotentialOwner(SyncTaskServiceWrapper.java:434)

       

       

       

       

      but when I stop server and start again all work without error until ear project ...

      my code to start process and task:

       

      StatefulKnowledgeSession ksession = JbpmAPIUtil.getSession();

       

      JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);

      HornetQHTWorkItemHandler handler = JbpmAPIUtil.initHornetQHTWorkItemHanlder(ksession);

      ksession.getWorkItemManager().registerWorkItemHandler("Human Task",handler);

       

      Map<String,Object> params = new HashMap<String, Object>();

      params.put(USER_ID_PARAM, user);

       

      ProcessInstance processInstance = ksession.startProcess(PROCESS_ID, params);

      TaskSummary task = JbpmAPIUtil.startTask(user, groupNameActualTask, getProcessInstanceId(), false);

      JbpmAPIUtil.complete...

       

      when I'm restarting jboss server error with "14:52:11,418 ERROR [org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler] (http-localhost-127.0.0.1-8080-2) Tue Oct 23 14:52:11 CEST 2012: Error when creating task on task server for work item id 6. Error reported by task server: Task operation request timed out: java.lang.RuntimeException: Task operation request timed out ....."

      for session.startProcess() exist but all task work

       

      any ideas ?