Hi
I have been trying to integrate camel-activiti with activiti process flow as
START->SERVICETASK(ROUTE TO CAMEL)->RECEIVETASK(EARLIER CAMEL ROUTE SIGNALS THIS TASK)->END
BPM:
<blockcode>
<process id="camelprocess" name="My process" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<serviceTask id="servicetask1" name="Service Task" activiti:async="true" activiti:type="camel"></serviceTask>
<receiveTask id="receivetask1" name="Receive Task"></receiveTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="receivetask1"></sequenceFlow>
<sequenceFlow id="flow3" sourceRef="receivetask1" targetRef="endevent1"></sequenceFlow>
</process>
</blockcode>
CAMELROUTE-CONFIG:
<blockcode>
<camel:camelContext id="camelContext">
<camel:route>
<camel:from uri="activiti:camelprocess:servicetask1"/>
<camel:to uri="bean:serviceActivator?method=doSomething(${body})"/>
<camel:to uri="activiti:camelprocess:receivetask1"/>
</camel:route>
</camel:camelContext>
<bean id="serviceActivator" class="com.test.CamelServiceActivator"/>
</blockcode>
When I debugged the activiti-camel jar I found at:ActivitiProducer.class,
private void signal(Exchange exchange) {
String processInstanceId = findProcessInstanceId(exchange);
Execution execution = runtimeService.createExecutionQuery()
.processDefinitionKey(processKey)
.processInstanceId(processInstanceId)
.activityId(activity).singleResult();
if (execution == null) {
throw new RuntimeException("Couldn't find activity "+activity+" for processId " + processInstanceId);
}
execution is null, and raising
||main|ERROR|org.slf4j.helpers.MarkerIgnoringBase:161||||>> Failed delivery for (MessageId: ID-viscx73-PC-50321-1376801958203-0-1 on ExchangeId: ID-viscx73-PC-50321-1376801958203-0-2). Exhausted after delivery attempt: 1 caught: java.lang.RuntimeException: Couldn't find activity receivetask1 for processId 9101
java.lang.RuntimeException: Couldn't find activity receivetask1 for processId 9101
at org.activiti.camel.ActivitiProducer.signal(ActivitiProducer.java:65)
at org.activiti.camel.ActivitiProducer.process(ActivitiProducer.java:49)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)
at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)
Any suggestions please