AnsweredAssumed Answered

Activiti 5.16, Camel -> NullPointerException

Question asked by markuslauer on Nov 6, 2014
Latest reply on Nov 10, 2014 by markuslauer
Hi,

I'm trying to get this to run:
http://bpmn20inaction.blogspot.de/2013/03/using-camel-routes-in-activiti-made.html

Problem: When a Camel ServiceTask is reached in my process, I get:

13:27:16,075 ERROR [io.undertow.request] (default task-57) UT005023: Exception handling request to /camel_activiti_demo/CompleteTask.jsf: javax.servlet.ServletException
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]

Caused by: java.lang.NullPointerException
   at org.activiti.camel.CamelBehavior.setAppropriateCamelContext(CamelBehavior.java:222) [activiti-camel-5.16.4.jar:5.16.4]
   at org.activiti.camel.CamelBehavior.execute(CamelBehavior.java:107) [activiti-camel-5.16.4.jar:5.16.4]


activiti.cfg.xml:

   <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="true" />
   </bean>

   <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
      <property name="processEngineConfiguration" ref="processEngineConfiguration" />
   </bean>

   <camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
      <packageScan>
        <package>info.co_met.experiments.camel_activiti_demo.routes</package> –>
      </packageScan>
   </camelContext>


MyCamelRouteBuilder.java

package info.co_met.experiments.camel_activiti_demo.routes;

import org.apache.camel.builder.RouteBuilder;

public class MyCamelRouteBuilder extends RouteBuilder {

  @Override
  public void configure() throws Exception {   
    from("activiti:demoProcess:ServiceTask_1")
      .to("log:hans?level=INFO&showAll=true&multiline=true");
  }
   
}


Process:

<process id="demoProcess" name="comobile Main Process" isExecutable="true">

<serviceTask id="ServiceTask_1" name="ServiceCall" activiti:type="camel"></serviceTask>

</process>




Outcomes