3 Replies Latest reply on Aug 16, 2010 4:12 AM by Alessandro Amicone

    How could I modify SubProcessActivity class in jbpm 4.4?

    Alessandro Amicone Newbie

      Hi.

      WIth jbpm 4.3 I modified  SubProcessActivity in order to have the same execution id of principal process in the sub processes.

       

      Instad of

          ExecutionImpl subProcessInstance = (ExecutionImpl) processDefinition.createProcessInstance(null, execution);
      I put
          ExecutionImpl subProcessInstance = (ExecutionImpl) processDefinition.createProcessInstance(execution.getId(), execution);
      Now I installed jbpm 4.4 and I'm trying to do the same change. I modified SubProcessActivity class and then I overwrote SubProcessActivity.class and SubProcessBindings.class in jbpm.jar. But when I start the main process I get the following error:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/jbpm/pvm/internal/model/Activity

      at org.jbpm.jpdl.internal.activity.SubProcessBinding.parseJpdl(SubProcessBinding.java:48)

      at org.jbpm.jpdl.internal.activity.JpdlBinding.parse(JpdlBinding.java:45)

      at org.jbpm.jpdl.internal.xml.JpdlParser.parseActivities(JpdlParser.java:320)

      at org.jbpm.jpdl.internal.xml.JpdlParser.parseDocumentElement(JpdlParser.java:248)

      at org.jbpm.pvm.internal.xml.Parser.parseDocument(Parser.java:480)

      at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:432)

      at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)

      at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:68)

      at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)

      at org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:130)

      at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.getProcessDefinition(ProcessDefinitionQueryImpl.java:92)

      at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:72)

      at org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:77)

      at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.uniqueResult(ProcessDefinitionQueryImpl.java:161)

      at org.jbpm.pvm.internal.repository.RepositorySessionImpl.findProcessDefinitionByKey(RepositorySessionImpl.java:154)

      at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:56)

      at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36)

      at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

      at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:50)

      at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)

      at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)

      at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)

      at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)

      at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:79)

      at it.nacon.jbpm.process.service.impl.ProcessServiceImpl.startProcessInstance(ProcessServiceImpl.java:80)

      at Test.main(Test.java:40)

      Caused by: java.lang.ClassNotFoundException: org.jbpm.pvm.internal.model.Activity

      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

      ... 26 more

      It seems to refer to old SubProcessBindings.class but I checked that jbpm.jar in tomcat's lib and in the application lib is the newer version.

      What's wrong?

      Thanks for your help.