0 Replies Latest reply on Apr 2, 2015 6:41 AM by Liudmila Dobriakova

    Calling the jbpm process from Web project

    Liudmila Dobriakova Newbie

      Dear jBPM experts!


      i'm newby in jBPM development, and i get stucked with the following problem. Preconditions: 1. Eclipse Kepler with all plugins installed. 2. Maven installed and configured correctly for Eclipse. 3. Sample project created from the Eclipse launched from the cmd: ant demo.start and the sample project was running fine on the Tomcat 7 AS. 4. Dynamic Web project created to have a service to stay in listening for incoming event. This service is converted to a Maven project and can run successfully. 5. I have defined the new method in jBPM project:

      public static void startProcess(Integer temp) { System.out.println("inside start process"); Map<String, Object> params = new HashMap<String, Object>(); params.put("Temperature", temp); System.out.println("inside start process temperature =" + temp); ProcessInstance pi = ksession.startProcess("com.sample.bpmn.hello", params); } 

      6. i added the dependencies from the jbpm mvn project into the dymnamic web project and calling this method from the service:

      @GET @Produces(MediaType.TEXT_PLAIN) public String sayPlainTextHello(@QueryParam("temperature") String temp) { System.out.println("Temperature= " + temp); Integer intTemp = Integer.parseInt(temp); InitialClassKeySession.startProcess(intTemp); System.out.println("After key session"); return "Temperature = " + temp; } <dependency> <groupId>com.sample</groupId> <artifactId>jbpm-example</artifactId> <version>1.0.0-SNAPSHOT</version> <scope>compile</scope> </dependency> 

      Problem: Everything is compiling fine but on runtime at the moment the


      is called the following error: PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException SEVERE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container java.lang.NoClassDefFoundError: org/kie/api/runtime/KieSession at com.sample.InitialClassKeySession.startProcess(InitialClassKeySession.java:61) at com.vogella.jersey.first.Hello.sayPlainTextHello(Hello.java:30)


      What am i missing, why Tomat can't see this dependencies?


      Thanks in advance for your help!!! Liudmila