11 Replies Latest reply on Feb 18, 2009 11:17 AM by Luigi Esploratore

    exploring JBPM 4: some questions

    Luigi Esploratore Newbie

      Hi,
      I hope someone can help me with these problems in jbpm4

      1) Referring to the example in the JBPM 4.0 Developer Guide (par 2.2. Persistent execution mode) if I try to create a processDefinition in the PVM context, then when I try to deploy it I get the following exception:

      [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.DeployCmd@17e6a96
      java.lang.NullPointerException
       at org.jbpm.pvm.internal.svc.DeploymentImpl.getFileNamesForType(DeploymentImpl.java:401)
       at org.jbpm.jpdl.deploy.ParseJpdlDeployer.deploy(ParseJpdlDeployer.java:38)


      2) Futhermore, if I try to execute the following code (see the example in the developer guide)

      EnvironmentFactory environmentFactory = new PvmEnvironmentFactory("environment.cfg.xml");
      
      ProcessService processService = environmentFactory.get(ProcessService.class);
      ExecutionService executionService = environmentFactory.get(ExecutionService.class);
      ManagementService managementService = environmentFactory.get(ManagementService.class);
      
      ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
       .node("submit loan request").initial().behaviour(AutomaticActivity.class)
       .transition().to("evaluate")
       .node("evaluate").behaviour(WaitState.class)
       .transition("approve").to("wire money")
       .transition("reject").to("end")
       .node("wire money").behaviour(AutomaticActivity.class)
       .transition().to("archive")
       .node("archive").behaviour(WaitState.class)
       .transition().to("end")
       .node("end").behaviour(WaitState.class)
      .done();
      
      Deployment deployment = new Deployment(processDefinition);
      processService.deploy(deployment);


      I get other problems:
      - PvmEnvironmentFactory does not exist anymore
      - It is not possibile to use the costructor new Deployment(processDefinition) since now Deployment is an inteface. If I try using the class new DeploymentImpl(processDefinition) I get the exception showed at the point 1)


      3) If I try to get a process already deployed, I could use the ProcessService.findProcessDefinitionById (or findProcessDefinitionByKey) but the ProcessDefinition do not allow me to access to the data that are available in ProcessDefinitionImpl.
      If I try a cast it does not work. How can I get the processDefinitionImpl (I mean the process infos such as nodes, events and so on) ?

      4) is there a way to contact the developers to signal possible problems?

      Thanks
      Luigi