cancel
Showing results for 
Search instead for 
Did you mean: 

activiti-camel and receivetask question-Business key is null

labo
Champ in-the-making
Champ in-the-making
Hello together,

I am trying to setup an activiti-camel example with following steps.

Start - ServiceTask(JavaDelegate) - ServiceTask(Camel) - ReceiveTask(From Camel) - ServiceTask(JavaDelegate) - End

but I failed at the received Task with

Exhausted after delivery attempt:
1 caught: org.activiti.engine.ActivitiException: Business key is null
org.activiti.engine.ActivitiException: Business key is null
        at org.activiti.engine.impl.ProcessInstanceQueryImpl.processInstanceBusinessKey(ProcessInstanceQueryImpl.java:84)[activiti-engine-5.9.jar:5.9]

My Camel Route looks like:

a) to start Process
      
from("timer://foo?fixedRate=true&period=30000")
       .to("activemq:in.create");

b) to trigger camel from activiti
   
    from("activiti:TestActivitiCamelProcess:camelRide")
          .to("log:BeginCamelRide?showHeaders=true");

c) to trigger receive task
   
from("file://inbox?delete=true")
       .to("log:inbox?showHeaders=true")
       .to("activiti:TestActivitiCamelProcess:camelRideInbox");


What kind of information do I have to pass to the receive task to get it up and running ?

Note: without receive task everything works as expected

Thanks
labo
2 REPLIES 2

labo
Champ in-the-making
Champ in-the-making
.setProperty("PROCESS_ID_PROPERTY") in the recevie task did it 😉

chakri_7
Champ in-the-making
Champ in-the-making
Hi Top,

How do you set the property PROCESS_ID_PROPERTY? I have route as,

     <camel:route>
      <camel:from uri="activiti:camelprocess:servicetask1"/>
      <camel:to uri="bean:serviceActivator?method=doSomething(${body})"/>
      <camel:to uri="activiti:camelprocess:receivetask1"/>
     </camel:route>

Please suggest!