cancel
Showing results for 
Search instead for 
Did you mean: 

Weird issue between Camel and Activiti

sdesbure
Champ in-the-making
Champ in-the-making
Hello all,
First I'm quite a noob in Spring, Activiti and Camel so I hope that my issue is an easy one ^^.
So for my further needs, I want to use Camel for a long processing task.
<!–break–>

I've then created the following flow to test:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
   xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
   typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
   targetNamespace="http://www.activiti.org/test">
   <process id="camelProcess" isExecutable="true">
      <startEvent id="start">
         <extensionElements>
            <activiti:formProperty id="first_var"
               name="first Var" type="string" default="first-variable"
               required="true"></activiti:formProperty>
            <activiti:formProperty id="customer_name"
               name="Client Name" type="string" default="Customer" required="true"></activiti:formProperty>
         </extensionElements>
      </startEvent>
      <sequenceFlow id="flow1" sourceRef="start" targetRef="camelTask"></sequenceFlow>
      <serviceTask id="camelTask" name="Invoke Camel route"
         activiti:type="camel">
         <!– <extensionElements>
            <activiti:field name="camelBehaviorClass"
               stringValue="org.activiti.camel.impl.CamelBehaviorDefaultImpl" />
         </extensionElements> –>
      </serviceTask>
      <sequenceFlow id="flow2" sourceRef="camelTask" targetRef="receiveTask"></sequenceFlow>
      <receiveTask id="receiveTask" name="Wait for response"></receiveTask>
      <serviceTask id="servicetask1" name="Service Task"
         activiti:class="com.easyvpn.oss.orchestrator.workflow.TestTask"></serviceTask>
      <sequenceFlow id="flow3" sourceRef="receiveTask"
         targetRef="servicetask1"></sequenceFlow>
      <endEvent id="endevent1" name="End"></endEvent>
      <sequenceFlow id="flow4" sourceRef="servicetask1"
         targetRef="endevent1"></sequenceFlow>
   </process>
</definitions>

I've got the following route in Camel:
[java]
import org.apache.camel.builder.RouteBuilder;

public class AsyncTestCamel extends RouteBuilder {

    @Override
    public void configure() throws Exception {
       from("activiti:camelProcess:camelTask").to("seda:asyncQueue");
       from("seda:asyncQueue").to("bean:testAsyncTask").to("seda:receiveQueue");
       from("seda:receiveQueue").to("activiti:camelProcess:receiveTask");
   }
}
[/java]

I've got the following classes:
[java]
import java.util.Map;

import org.apache.camel.OutHeaders;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TestAsyncTask {
   private static final Logger logger = LoggerFactory.getLogger(CreateInternetFirewallServiceInstance.class);
   
   public void execute(String first_var, String customer_name, @OutHeaders Map<String,String> headers) throws Exception {
      logger.debug("Entering CreateInternetFirewallServiceInstance");
      logger.debug("value received: first_var: "+first_var+", customer_name: "+customer_name);

      String name = customer_name.replaceAll(" ", "-").replaceAll("_", "-").toLowerCase() + "-test-test";
      headers.put("new_var", name);
   }
}
[/java]

[java]
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TestTask implements JavaDelegate {
   private static final Logger logger = LoggerFactory.getLogger(CreateCoreVirtualNetwork.class);

   @Override
   public void execute(DelegateExecution execution) throws Exception {
      String new_var = (String) execution.getVariable("new_var");
      logger.debug("retrieved new_var: "+new_var);
   }

}
[/java]

To test that, I use the following test class:
[java]
import static org.junit.Assert.assertNotNull;

import java.util.HashMap;
import java.util.Map;

import org.activiti.engine.RuntimeService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.test.ActivitiRule;
import org.activiti.engine.test.Deployment;
import org.junit.Rule;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MyProcessTest {
   private static final Logger logger = LoggerFactory.getLogger(CreateInternetChainTest.class);

   @Rule
   public ActivitiRule activitiRule = new ActivitiRule("activiti.cfg-mem.xml");
   
   @Test
   @Deployment(resources={"diagrams/MyProcess.bpmn"})
   public void startMyProcess() {
      logger.debug("Starting test");
      RuntimeService runtimeService = activitiRule.getProcessEngine().getRuntimeService();

      Map<String, Object> formProperties = new HashMap<String, Object>();
      formProperties.put("first_var", "var-var");
      formProperties.put("customer_name", "Customer Name");
      
      ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("camelProcess", formProperties);
      logger.debug("processInstance ID: "+processInstance.getId());
         
      assertNotNull(processInstance.getId());
   }
      
}
[/java]

Finally, I use the following spring configurations (activiti.cfg-mem.xml):

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
   xmlns:camel="http://camel.apache.org/schema/spring"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context.xsd
      http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

   <context:property-placeholder location="classpath:application.properties"
      ignore-resource-not-found="false" />

   <import resource="orchestrator.xml" />

   <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
      <property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
   </bean>

   <bean id="transactionManager"
      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource" />
   </bean>

   <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="false" />
   </bean>

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

   <bean id="repositoryService" factory-bean="processEngine"
      factory-method="getRepositoryService" />
   <bean id="runtimeService" factory-bean="processEngine"
      factory-method="getRuntimeService" />
   <bean id="taskService" factory-bean="processEngine"
      factory-method="getTaskService" />
   <bean id="historyService" factory-bean="processEngine"
      factory-method="getHistoryService" />
   <bean id="managementService" factory-bean="processEngine"
      factory-method="getManagementService" />


</beans>

(orchestrator.xml)

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
   xmlns:camel="http://camel.apache.org/schema/spring"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context.xsd
      http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

   <context:property-placeholder location="classpath:application.properties"
      ignore-resource-not-found="false" />

   <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
      <property name="brokerURL" value="tcp://somehost:61616" />
   </bean>

   <camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
      <packageScan>
         <package>com.easyvpn.oss.orchestrator.routes</package>
      </packageScan>
   </camelContext>

   <bean id="mapper" class="com.fasterxml.jackson.databind.ObjectMapper" />

   <bean id="testTask" class="com.easyvpn.oss.orchestrator.workflow.TestTask">
   </bean>

   <bean id="testAsyncTask" class="com.easyvpn.oss.orchestrator.workflow.TestAsyncTask">
   </bean>

</beans>

When I launch my test via Eclipse (maven seems to load the right jars, i.e. activiti-***-5.16.4, camel-***-2.14.0, activemq-***-5.10, …), Here's the following error I have:

DEBUG TransactionTemplate - Initiating transaction rollback on application exception
java.lang.NullPointerException
   at org.activiti.camel.CamelBehavior.setAppropriateCamelContext(CamelBehavior.java:222)
   at org.activiti.camel.CamelBehavior.execute(CamelBehavior.java:107)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:80)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:116)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:35)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:440)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:418)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:131)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:64)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotificationsCompleted(AtomicOperationProcessStartInitial.java:45)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsCompleted(AtomicOperationProcessStart.java:62)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.start(ExecutionEntity.java:368)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:111)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
   at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:77)
   at com.easyvpn.oss.orchestrator.workflow.MyProcessTest.startMyProcess(MyProcessTest.java:33)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
   at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   at org.activiti.engine.test.ActivitiRule$1.evaluate(ActivitiRule.java:126)
   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
   at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
   at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


here's the log of the test:

DEBUG StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [activiti.cfg-mem.xml]
DEBUG DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas]
DEBUG PluggableSchemaResolver - Loaded schema mappings: {http://camel.apache.org/schema/osgi/camel-osgi-2.13.0.xsd=camel-osgi.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config..., http://camel.apache.org/schema/spring/camel-spring-2.8.4.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.7.3.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.14.0.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.4.xsd=camel-spring.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/..., http://camel.apache.org/schema/spring/camel-spring-2.10.1.xsd=camel-spring.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/sp..., http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/..., http://www.springframework.org/schema/cache/spring-cache-4.0.xsd=org/springframework/cache/config/sp..., http://camel.apache.org/schema/spring/camel-spring-2.11.1.xsd=camel-spring.xsd, http://www.springframework.org/schema/tx/spring-tx-4.0.xsd=org/springframework/transaction/config/sp..., http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/s..., http://camel.apache.org/schema/osgi/camel-osgi-2.10.0.xsd=camel-osgi.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/x..., http://camel.apache.org/schema/osgi/camel-osgi-2.11.0.xsd=camel-osgi.xsd, http://www.springframework.org/schema/beans/spring-beans-4.0.xsd=org/springframework/beans/factory/x..., http://camel.apache.org/schema/osgi/camel-osgi-2.10.7.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.7.4.xsd=camel-spring.xsd, http://www.springframework.org/schema/context/spring-context-3.2.xsd=org/springframework/context/con..., http://camel.apache.org/schema/osgi/camel-osgi-2.8.6.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.9.6.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.7.0.xsd=activemq.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/sp..., http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-j..., http://www.springframework.org/schema/jms/spring-jms.xsd=org/springframework/jms/config/spring-jms-3..., http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml..., http://activemq.apache.org/schema/core/activemq-core-5.8.0.xsd=activemq.xsd, http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml..., http://camel.apache.org/schema/spring/camel-spring-2.12.4.xsd=camel-spring.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/x..., http://activemq.apache.org/schema/core/activemq-core-5.9.0.xsd=activemq.xsd, http://camel.apache.org/schema/spring/camel-spring-2.8.0.xsd=camel-spring.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd=org/springframework/jdbc/config/sprin..., http://camel.apache.org/schema/osgi/camel-osgi-2.12.3.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.10.0.xsd=activemq.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.0.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd=activemq.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spr..., http://camel.apache.org/schema/spring/camel-spring-2.9.7.xsd=camel-spring.xsd, http://activemq.apache.org/schema/core/activemq-core-5.6.0.xsd=activemq.xsd, http://camel.apache.org/schema/spring/camel-spring-2.5.0.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.10.4.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.6.0.xsd=camel-spring.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jd..., http://camel.apache.org/schema/spring/camel-spring-2.11.4.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.10.3.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.7.0.xsd=camel-spring.xsd, http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd=activemq.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.11.3.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.8.2.xsd=camel-osgi.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/..., http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd=activemq.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.9.2.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.4.0.xsd=activemq.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spri..., http://camel.apache.org/schema/spring/camel-spring-2.0-M3.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.3.0.xsd=camel-spring.xsd, http://www.springframework.org/schema/jee/spring-jee-3.1.xsd=org/springframework/ejb/config/spring-j..., http://camel.apache.org/schema/spring/camel-spring-2.12.0.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.4.0.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.0-M2.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.13.0.xsd=camel-spring.xsd, http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd=activemq.xsd, http://camel.apache.org/schema/spring/camel-spring-2.14.0.xsd=camel-spring.xsd, http://activemq.apache.org/schema/core/activemq-core-5.1.0.xsd=activemq.xsd, http://camel.apache.org/schema/spring/camel-spring-2.8.3.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.7.2.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.3.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.1.0.xsd=camel-spring.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/con..., http://camel.apache.org/schema/spring/camel-spring-2.10.0.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.2.0.xsd=camel-spring.xsd, http://www.springframework.org/schema/util/spring-util-4.0.xsd=org/springframework/beans/factory/xml..., http://camel.apache.org/schema/spring=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.11.0.xsd=camel-spring.xsd, http://www.springframework.org/schema/tool/spring-tool-4.0.xsd=org/springframework/beans/factory/xml..., http://camel.apache.org/schema/spring/v2.14=camel-spring-v2.14.xsd, http://camel.apache.org/schema/spring/camel-spring-2.10.7.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.10.6.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.7.3.xsd=camel-spring.xsd, http://www.springframework.org/schema/aop/spring-aop-3.2.xsd=org/springframework/aop/config/spring-a..., http://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/con..., http://camel.apache.org/schema/osgi/camel-osgi-2.8.5.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.9.5.xsd=camel-osgi.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml..., http://activemq.org/config/1.0/1.0.xsd=activemq.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring..., http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml..., http://camel.apache.org/schema/spring/camel-spring-2.12.3.xsd=camel-spring.xsd, http://www.springframework.org/schema/jms/spring-jms-3.2.xsd=org/springframework/jms/config/spring-j..., http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spr..., http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd=org/springframework/jdbc/config/sprin..., http://camel.apache.org/schema/osgi/camel-osgi-2.12.2.xsd=camel-osgi.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd=org/springframework/jdbc/config/sprin..., http://camel.apache.org/schema/osgi/camel-osgi-2.13.2.xsd=camel-osgi.xsd, http://www.springframework.org/schema/task/spring-task-3.2.xsd=org/springframework/scheduling/config..., http://camel.apache.org/schema/osgi/camel-osgi-2.7.5.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.8.6.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.6.xsd=camel-spring.xsd, http://www.springframework.org/schema/jee/spring-jee-4.0.xsd=org/springframework/ejb/config/spring-j..., http://www.springframework.org/schema/cache/spring-cache-3.2.xsd=org/springframework/cache/config/sp..., http://camel.apache.org/schema/spring/camel-spring-2.10.3.xsd=camel-spring.xsd, http://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/sp..., http://www.springframework.org/schema/lang/spring-lang-3.2.xsd=org/springframework/scripting/config/..., http://camel.apache.org/schema/spring/camel-spring-2.11.3.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.10.2.xsd=camel-osgi.xsd, http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/x..., http://camel.apache.org/schema/osgi/camel-osgi-2.11.2.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.8.1.xsd=camel-osgi.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-a..., http://camel.apache.org/schema/osgi/camel-osgi-2.9.1.xsd=camel-osgi.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-j..., http://camel.apache.org/schema/spring/camel-spring-2.0-M2.xsd=camel-spring.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-j..., http://camel.apache.org/schema/osgi/camel-osgi-2.9.8.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.0-M1.xsd=camel-osgi.xsd, http://activemq.org/config/1.0=activemq.xsd, http://www.springframework.org/schema/jms/spring-jms-2.5.xsd=org/springframework/jms/config/spring-j..., http://camel.apache.org/schema/spring/camel-spring-2.8.2.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.7.1.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.2.xsd=camel-spring.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/..., http://camel.apache.org/schema/spring/camel-spring-2.10.6.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.10.5.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.7.2.xsd=camel-spring.xsd, http://www.springframework.org/schema/aop/spring-aop-3.1.xsd=org/springframework/aop/config/spring-a..., http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/con..., http://camel.apache.org/schema/osgi/camel-osgi-2.8.4.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.3.2.xsd=activemq.xsd, http://www.springframework.org/schema/context/spring-context-4.0.xsd=org/springframework/context/con..., http://camel.apache.org/schema/osgi/camel-osgi-2.9.4.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.4.2.xsd=activemq.xsd, http://camel.apache.org/schema/spring/camel-spring-2.12.2.xsd=camel-spring.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/sp..., http://www.springframework.org/schema/jms/spring-jms-3.1.xsd=org/springframework/jms/config/spring-j..., http://camel.apache.org/schema/spring/camel-spring-2.13.2.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.12.1.xsd=camel-osgi.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/x..., http://camel.apache.org/schema/osgi/camel-osgi-2.13.1.xsd=camel-osgi.xsd, http://www.springframework.org/schema/task/spring-task-3.1.xsd=org/springframework/scheduling/config..., http://camel.apache.org/schema/spring/camel-spring-2.8.5.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.7.4.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.5.xsd=camel-spring.xsd, http://www.springframework.org/schema/cache/spring-cache-3.1.xsd=org/springframework/cache/config/sp..., http://activemq.apache.org/schema/core/activemq-core.xsd=activemq.xsd, http://camel.apache.org/schema/spring/camel-spring-2.10.2.xsd=camel-spring.xsd, http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/sp..., http://www.springframework.org/schema/lang/spring-lang-3.1.xsd=org/springframework/scripting/config/..., http://camel.apache.org/schema/spring/camel-spring-2.11.2.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.10.1.xsd=camel-osgi.xsd, http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/x..., http://camel.apache.org/schema/osgi/camel-osgi-2.11.1.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.8.0.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.9.0.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.7.5.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring.xsd=camel-spring.xsd, http://camel.apache.org/schema/spring/camel-spring-2.0-M1.xsd=camel-spring.xsd, http://activemq.apache.org/schema/core=activemq.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.9.7.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.5.0.xsd=camel-osgi.xsd, http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml..., http://camel.apache.org/schema/osgi/camel-osgi-2.6.0.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.9.1.xsd=activemq.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.7.0.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.8.1.xsd=camel-spring.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd=org/springframework/jdbc/config/sprin..., http://camel.apache.org/schema/osgi/camel-osgi-2.12.4.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.1.xsd=camel-spring.xsd, http://activemq.apache.org/schema/core/activemq-core-5.5.1.xsd=activemq.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.3.0.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.9.8.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.4.0.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.10.5.xsd=camel-spring.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-a..., http://camel.apache.org/schema/osgi/camel-osgi-2.10.4.xsd=camel-osgi.xsd, http://camel.apache.org/schema/spring/camel-spring-2.7.1.xsd=camel-spring.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-a..., http://camel.apache.org/schema/osgi/camel-osgi-2.11.4.xsd=camel-osgi.xsd, http://www.springframework.org/schema/task/spring-task-4.0.xsd=org/springframework/scheduling/config..., http://camel.apache.org/schema/osgi/camel-osgi-2.8.3.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.0.0.xsd=camel-osgi.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-4..., http://www.springframework.org/schema/cache/spring-cache.xsd=org/springframework/cache/config/spring..., http://activemq.apache.org/schema/core/activemq-core-5.3.1.xsd=activemq.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.9.3.xsd=camel-osgi.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.1.0.xsd=camel-osgi.xsd, http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd=activemq.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spr..., http://camel.apache.org/schema/osgi/camel-osgi-2.2.0.xsd=camel-osgi.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3..., http://www.springframework.org/schema/lang/spring-lang-4.0.xsd=org/springframework/scripting/config/..., http://www.springframework.org/schema/jee/spring-jee-3.2.xsd=org/springframework/ejb/config/spring-j..., http://camel.apache.org/schema/spring/camel-spring-2.12.1.xsd=camel-spring.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml..., http://camel.apache.org/schema/osgi/camel-osgi-2.0-M3.xsd=camel-osgi.xsd, http://www.springframework.org/schema/jms/spring-jms-3.0.xsd=org/springframework/jms/config/spring-j..., http://camel.apache.org/schema/spring/camel-spring-2.13.1.xsd=camel-spring.xsd, http://camel.apache.org/schema/osgi/camel-osgi-2.12.0.xsd=camel-osgi.xsd}
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-4.0.xsd
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/context/spring-context.xsd] in classpath: org/springframework/context/config/spring-context-4.0.xsd
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-4.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-4.0.xsd
DEBUG DefaultBeanDefinitionDocumentReader - Loading bean definitions
DEBUG DefaultNamespaceHandlerResolver - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespac..., http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandle..., http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/jdbc=org.springframework.jdbc.config.JdbcNamespaceHandler, http://www.springframework.org/schema/cache=org.springframework.cache.config.CacheNamespaceHandler, http://activemq.apache.org/schema/core=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler, http://camel.apache.org/schema/osgi=org.apache.camel.osgi.CamelNamespaceHandler, http://www.springframework.org/schema/c=org.springframework.beans.factory.xml.SimpleConstructorNames..., http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://camel.apache.org/schema/spring/v2.14=org.apache.camel.spring.handler.CamelNamespaceHandler, http://camel.apache.org/schema/spring=org.apache.camel.spring.handler.CamelNamespaceHandler, http://www.springframework.org/schema/jms=org.springframework.jms.config.JmsNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandle..., http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHan...}
INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [orchestrator.xml]
DEBUG DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-4.0.xsd
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/context/spring-context.xsd] in classpath: org/springframework/context/config/spring-context-4.0.xsd
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-4.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-4.0.xsd
DEBUG PluggableSchemaResolver - Found XML schema [http://camel.apache.org/schema/spring/camel-spring.xsd] in classpath: camel-spring.xsd
DEBUG DefaultBeanDefinitionDocumentReader - Loading bean definitions
DEBUG DefaultBeanDefinitionDocumentReader - Imported 22 bean definitions from relative location [orchestrator.xml]
DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean 'processEngineConfiguration'
DEBUG DefaultListableBeanFactory - Creating instance of bean 'processEngineConfiguration'
DEBUG DefaultListableBeanFactory - Eagerly caching bean 'processEngineConfiguration' to allow for resolving potential circular references
DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean 'dataSource'
DEBUG DefaultListableBeanFactory - Creating instance of bean 'dataSource'
DEBUG DefaultListableBeanFactory - Eagerly caching bean 'dataSource' to allow for resolving potential circular references
DEBUG DefaultListableBeanFactory - Finished creating instance of bean 'dataSource'
DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean 'transactionManager'
DEBUG DefaultListableBeanFactory - Creating instance of bean 'transactionManager'
DEBUG DefaultListableBeanFactory - Eagerly caching bean 'transactionManager' to allow for resolving potential circular references
DEBUG DefaultListableBeanFactory - Returning cached instance of singleton bean 'dataSource'
DEBUG DefaultListableBeanFactory - Invoking afterPropertiesSet() on bean with name 'transactionManager'
DEBUG DefaultListableBeanFactory - Finished creating instance of bean 'transactionManager'
DEBUG DefaultListableBeanFactory - Finished creating instance of bean 'processEngineConfiguration'
DEBUG DataSourceUtils - Fetching JDBC Connection from DataSource
DEBUG DataSourceUtils - Returning JDBC Connection to DataSource
DEBUG DataSourceUtils - Fetching JDBC Connection from DataSource
DEBUG DataSourceUtils - Registering transaction synchronization for JDBC Connection
INFO  DbSqlSession - performing create on engine with resource org/activiti/db/create/activiti.h2.create.engine.sql
INFO  DbSqlSession - performing create on history with resource org/activiti/db/create/activiti.h2.create.history.sql
INFO  DbSqlSession - performing create on identity with resource org/activiti/db/create/activiti.h2.create.identity.sql
DEBUG DataSourceUtils - Returning JDBC Connection to DataSource
INFO  ProcessEngineImpl - ProcessEngine default created
DEBUG DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
DEBUG DataSourceTransactionManager - Acquired Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] for JDBC transaction
DEBUG DataSourceTransactionManager - Switching JDBC Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] to manual commit
DEBUG DataSourceTransactionManager - Suspending current transaction, creating new transaction with name [null]
DEBUG DataSourceTransactionManager - Acquired Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] for JDBC transaction
DEBUG DataSourceTransactionManager - Switching JDBC Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] to manual commit
DEBUG DataSourceTransactionManager - Initiating transaction commit
DEBUG DataSourceTransactionManager - Committing JDBC transaction on Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver]
DEBUG DataSourceTransactionManager - Releasing JDBC Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] after transaction
DEBUG DataSourceUtils - Returning JDBC Connection to DataSource
DEBUG DataSourceTransactionManager - Resuming suspended transaction after completion of inner transaction
INFO  BpmnDeployer - Processing resource diagrams/MyProcess.bpmn
DEBUG DataSourceTransactionManager - Initiating transaction commit
DEBUG DataSourceTransactionManager - Committing JDBC transaction on Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver]
DEBUG DataSourceTransactionManager - Releasing JDBC Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] after transaction
DEBUG DataSourceUtils - Returning JDBC Connection to DataSource
DEBUG CreateInternetChainTest - Starting test
DEBUG DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
DEBUG DataSourceTransactionManager - Acquired Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] for JDBC transaction
DEBUG DataSourceTransactionManager - Switching JDBC Connection [jdbc:h2:mem:activiti, UserName=, H2 JDBC Driver] to manual commit
DEBUG DataSourceTransactionManager - Participating in existing transaction
DEBUG TransactionTemplate - Initiating transaction rollback on application exception


any idea why it's not working?

Thanks in advance
6 REPLIES 6

sdesbure
Champ in-the-making
Champ in-the-making
Hello all,
First I'm quite a noob in Spring, Activiti and Camel so I hope that my issue is an easy one ^^.
So for my further needs, I want to use Camel for a long processing task.

I've then created the following flow to test:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.activiti.org/test">
<process id="camelProcess" isExecutable="true">
  <startEvent id="start">
   <extensionElements>
    <activiti:formProperty id="first_var"
     name="first Var" type="string" default="first-variable"
     required="true"></activiti:formProperty>
    <activiti:formProperty id="customer_name"
     name="Client Name" type="string" default="Customer" required="true"></activiti:formProperty>
   </extensionElements>
  </startEvent>
  <sequenceFlow id="flow1" sourceRef="start" targetRef="camelTask"></sequenceFlow>
  <serviceTask id="camelTask" name="Invoke Camel route"
   activiti:type="camel">
   <!– <extensionElements>
    <activiti:field name="camelBehaviorClass"
     stringValue="org.activiti.camel.impl.CamelBehaviorDefaultImpl" />
   </extensionElements> –>
  </serviceTask>
  <sequenceFlow id="flow2" sourceRef="camelTask" targetRef="receiveTask"></sequenceFlow>
  <receiveTask id="receiveTask" name="Wait for response"></receiveTask>
  <serviceTask id="servicetask1" name="Service Task"
   activiti:class="com.easyvpn.oss.orchestrator.workflow.TestTask"></serviceTask>
  <sequenceFlow id="flow3" sourceRef="receiveTask"
   targetRef="servicetask1"></sequenceFlow>
  <endEvent id="endevent1" name="End"></endEvent>
  <sequenceFlow id="flow4" sourceRef="servicetask1"
   targetRef="endevent1"></sequenceFlow>
</process>
</definitions>

I've got the following route in Camel:
[java]
import org.apache.camel.builder.RouteBuilder;

public class AsyncTestCamel extends RouteBuilder {

  @Override
  public void configure() throws Exception {
   from("activiti:camelProcess:camelTask").to("seda:asyncQueue");
   from("seda:asyncQueue").to("bean:testAsyncTask").to("seda:receiveQueue");
   from("seda:receiveQueue").to("activiti:camelProcess:receiveTask");
}
}
[/java]

sdesbure
Champ in-the-making
Champ in-the-making
Hello all,
First I'm quite a noob in Spring, Activiti and Camel so I hope that my issue is an easy one ^^. And sorry for the previous topic which is not working…

So for my further needs, I want to use Camel for a long processing task.

I've then created the following flow to test:

<code>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.activiti.org/test">
<process id="camelProcess" isExecutable="true">
  <startEvent id="start">
   <extensionElements>
    <activiti:formProperty id="first_var"
     name="first Var" type="string" default="first-variable"
     required="true"></activiti:formProperty>
    <activiti:formProperty id="customer_name"
     name="Client Name" type="string" default="Customer" required="true"></activiti:formProperty>
   </extensionElements>
  </startEvent>
  <sequenceFlow id="flow1" sourceRef="start" targetRef="camelTask"></sequenceFlow>
  <serviceTask id="camelTask" name="Invoke Camel route"
   activiti:type="camel">
   <!– <extensionElements>
    <activiti:field name="camelBehaviorClass"
     stringValue="org.activiti.camel.impl.CamelBehaviorDefaultImpl" />
   </extensionElements> –>
  </serviceTask>
  <sequenceFlow id="flow2" sourceRef="camelTask" targetRef="receiveTask"></sequenceFlow>
  <receiveTask id="receiveTask" name="Wait for response"></receiveTask>
  <serviceTask id="servicetask1" name="Service Task"
   activiti:class="com.easyvpn.oss.orchestrator.workflow.TestTask"></serviceTask>
  <sequenceFlow id="flow3" sourceRef="receiveTask"
   targetRef="servicetask1"></sequenceFlow>
  <endEvent id="endevent1" name="End"></endEvent>
  <sequenceFlow id="flow4" sourceRef="servicetask1"
   targetRef="endevent1"></sequenceFlow>
</process>
</definitions>
</code>

I've got the following route in Camel:
<code>
import org.apache.camel.builder.RouteBuilder;

public class AsyncTestCamel extends RouteBuilder {

  @Override
  public void configure() throws Exception {
   from("activiti:camelProcess:camelTask").to("seda:asyncQueue");
   from("seda:asyncQueue").to("bean:testAsyncTask").to("seda:receiveQueue");
   from("seda:receiveQueue").to("activiti:camelProcess:receiveTask");
}
}
</code>

I've got the following classes:
<code>
import java.util.Map;

import org.apache.camel.OutHeaders;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TestAsyncTask {
private static final Logger logger = LoggerFactory.getLogger(CreateInternetFirewallServiceInstance.class);

public void execute(String first_var, String customer_name, @OutHeaders Map<String,String> headers) throws Exception {
  logger.debug("Entering CreateInternetFirewallServiceInstance");
  logger.debug("value received: first_var: "+first_var+", customer_name: "+customer_name);

  String name = customer_name.replaceAll(" ", "-").replaceAll("_", "-").toLowerCase() + "-test-test";
  headers.put("new_var", name);
}
}
</code>

<code>
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TestTask implements JavaDelegate {
private static final Logger logger = LoggerFactory.getLogger(CreateCoreVirtualNetwork.class);

@Override
public void execute(DelegateExecution execution) throws Exception {
  String new_var = (String) execution.getVariable("new_var");
  logger.debug("retrieved new_var: "+new_var);
}

}
</code>

To test that, I use the following test class:
<code>
import static org.junit.Assert.assertNotNull;

import java.util.HashMap;
import java.util.Map;

import org.activiti.engine.RuntimeService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.test.ActivitiRule;
import org.activiti.engine.test.Deployment;
import org.junit.Rule;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MyProcessTest {
private static final Logger logger = LoggerFactory.getLogger(CreateInternetChainTest.class);

@Rule
public ActivitiRule activitiRule = new ActivitiRule("activiti.cfg-mem.xml");

@Test
@Deployment(resources={"diagrams/MyProcess.bpmn"})
public void startMyProcess() {
  logger.debug("Starting test");
  RuntimeService runtimeService = activitiRule.getProcessEngine().getRuntimeService();

  Map<String, Object> formProperties = new HashMap<String, Object>();
  formProperties.put("first_var", "var-var");
  formProperties.put("customer_name", "Customer Name");
 
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("camelProcess", formProperties);
  logger.debug("processInstance ID: "+processInstance.getId());
  
  assertNotNull(processInstance.getId());
}
 
}
</code>

Finally, I use the following spring configurations (activiti.cfg-mem.xml):
<code>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context.xsd
  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

<contextSmiley Tongueroperty-placeholder location="classpath:application.properties"
  ignore-resource-not-found="false" />

<import resource="orchestrator.xml" />

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
  <property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
</bean>

<bean id="transactionManager"
  class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  <property name="dataSource" ref="dataSource" />
</bean>

<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="false" />
</bean>

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

<bean id="repositoryService" factory-bean="processEngine"
  factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine"
  factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine"
  factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine"
  factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine"
  factory-method="getManagementService" />


</beans>
</code>

(orchestrator.xml)
<code>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context.xsd
  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

<contextSmiley Tongueroperty-placeholder location="classpath:application.properties"
  ignore-resource-not-found="false" />

<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
  <property name="brokerURL" value="tcp://somehost:61616" />
</bean>

<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
  <packageScan>
   <package>com.easyvpn.oss.orchestrator.routes</package>
  </packageScan>
</camelContext>

<bean id="mapper" class="com.fasterxml.jackson.databind.ObjectMapper" />

<bean id="testTask" class="com.easyvpn.oss.orchestrator.workflow.TestTask">
</bean>

<bean id="testAsyncTask" class="com.easyvpn.oss.orchestrator.workflow.TestAsyncTask">
</bean>

</beans>
</code>

When I launch my test via Eclipse (maven seems to load the right jars, i.e. activiti-***-5.16.4, camel-***-2.14.0, activemq-***-5.10, …), Here's the following error I have:
<code>
DEBUG TransactionTemplate - Initiating transaction rollback on application exception
java.lang.NullPointerException
at org.activiti.camel.CamelBehavior.setAppropriateCamelContext(CamelBehavior.java:222)
at org.activiti.camel.CamelBehavior.execute(CamelBehavior.java:107)
</code>


the log of the test is attached

any idea why it's not working?

Thanks in advance

smirzai
Champ on-the-rise
Champ on-the-rise
I am not sure if activiti initialized the context if you use @Deployment.
Try it with something like this:


@ContextConfiguration("classpath:your_context_file.xml")
public class MyProcessTest {



public class AsyncPingTest extends SpringActivitiTestCase {

smirzai
Champ on-the-rise
Champ on-the-rise
If not working, a compilable test case is a great help to debug the problem.

sdesbure
Champ in-the-making
Champ in-the-making
hello : <code>@ContextConfiguration("classpath:your_context_file.xml")</code> did the trick!
Thansk a lot Smiley Happy

smirzai
Champ on-the-rise
Champ on-the-rise
Great !