.to("camunda-bpm:message?messageName=AFI_GENERATED&&processDefinitionKey=recruitingProcess");
I get this error:
18:02:57,906 INFO [org.apache.camel.processor.interceptor.Tracer] (http-localhost/127.0.0.1:8080-1) ID-alfonso-mbp-2-local-57649-1393261264225-0-2 >>> (route5) es.gc.epsilon.core.camel.routes.edn.EdnProcessor@3d280bf7 --> camunda-bpm://message?messageName=AFI_GENERATED <<< Pattern:InOut, Headers:{channelId=null}, BodyType:String, Body:<file id="es.gc.epsilon.core.dto.domain.FileDto@3a0e982" event="generated" />, Exception:java.lang.RuntimeException: Couldn't find waiting process instance with id '6301' for message 'AFI_GENERATED'
Hi Alfonso.
Can you send the BPMN XML also (or share it with camunda.org/share)? Did you define the message correctly and name it “AFI_GENERATED”? The Camel part looks correct from a first look.
Cheers
Bernd
--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/23800bc9-0ab2-425c-819f-df8c4e855139%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Alfonso.
I think that the following happens: You send the message out to camel and trigger the response. This is received before the process instance is persisted in the state waiting for the message. This often happens if you do synchronous execution and directly trigger the response there. The answer is too early. Possible that this is the problem?
See http://docs.camunda.org/latest/guides/user-guide/#process-engine-transactions-in-processes as well.
Cheers
Bernd
Von: camunda-...@googlegroups.com [mailto:camunda-...@googlegroups.com] Im Auftrag von Alfonso Mateos Alarcón
Gesendet: Dienstag, 25. Februar 2014 13:21
An: camunda-...@googlegroups.com
Betreff: Re: [camunda-bpm-users] Couldn't find waiting process instance with id '6301' for message 'AFI_GENERATED'
Hi Bernd,
I think the message it's correctly named inside the diagram, and it's selected as the message to be catched up in my intermediate event catcher...
Thanks for your attention
El martes, 25 de febrero de 2014 09:41:45 UTC+1, Bernd Rücker escribió:
Hi Alfonso.
Can you send the BPMN XML also (or share it with camunda.org/share)? Did you define the message correctly and name it “AFI_GENERATED”? The Camel part looks correct from a first look.
Cheers
Bernd
Von: camunda-...@googlegroups.com [mailto:camunda-bpm-u...@googlegroups.com] Im Auftrag von Alfonso Mateos Alarcón
Gesendet: Dienstag, 25. Februar 2014 09:31
An: camunda-...@googlegroups.com
Betreff: [camunda-bpm-users] Couldn't find waiting process instance with id '6301' for message 'AFI_GENERATED'
Hi guys,
When I use this into my camel route:
.to("camunda-bpm:message?messageName=AFI_GENERATED&&processDefinitionKey=recruitingProcess");
I get this error:
18:02:57,906 INFO [org.apache.camel.processor.interceptor.Tracer] (http-localhost/127.0.0.1:8080-1) ID-alfonso-mbp-2-local-57649-1393261264225-0-2 >>> (route5) es.gc.epsilon.core.camel.routes.edn.EdnProcessor@3d280bf7 --> camunda-bpm://message?messageName=AFI_GENERATED <<< Pattern:InOut, Headers:{channelId=null}, BodyType:String, Body:<file id="es.gc.epsilon.core.dto.domain.FileDto@3a0e982" event="generated" />, Exception:java.lang.RuntimeException: Couldn't find waiting process instance with id '6301' for message 'AFI_GENERATED'
Could you please give me some hint on what's going on? the instance Id is 6301 and is correct. I also tried the route without including the processDefinitionKey parameter.
I don't know if it's due to a bad use of an intermediate message catch, just in case I attach a picture of my process diagram. My camel route is called from the servicetask named "Generar AFI", and I'd like to catch the message on the intermediate catch event just after that servicetask. It's on the upper flow path.
Hi Alfonso.
Since you use asynchronous BPMN constructs here the answer should be really asynchronous – even in test case environments. I think the easiest possibility is to use a queue in Camel – a in memory queue should be sufficient (SEDA?). It might still be faster than the commit of camunda – but in this case I would not even have a big problem with a small Thread.sleep within the route (for testing purposes) ;-)
Cheers
Bernd
Consultant & Evangelist (www.camunda.org/community/team.html)
We are hiring: http://www.camunda.org/community/jobs.html
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/f6326140-a336-4076-b67d-1b979ef44768%40googlegroups.com.
HI Alfonso.
In real life I guess the answer will be received asynchronously. Otherwise the model does not make much sense.
So it is special for your current test code / prototype that you send the answer immediately from the camel route you call from the service task. So I would change this – as it does not correspond to the real life behavior anyway.
Summary: Process looks fine. Answer in Camel should be done asynchronously for testing purposes.
Hopefully clear what I mean?
Cheers
Bernd
Von: camunda-...@googlegroups.com [mailto:camunda-bpm-use...@googlegroups.com] Im Auftrag von Alfonso Mateos Alarcón
Gesendet: Mittwoch, 26. Februar 2014 11:37
An: camunda-...@googlegroups.com
Betreff: Re: [camunda-bpm-users] Couldn't find waiting process instance with id '6301' for message 'AFI_GENERATED'
Hi Bernd, thanks a lot for your advice.
--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/f2ea188a-8067-41dc-bb5b-2ec0e4a97152%40googlegroups.com.
Hi Alfonso.
In real life you are not forced to use queues. But if your service call is not asynchronous – then I would have expected that you use a ServiceTask (which is perfectly valid!) – not Message send and receive. So I expect you have an asynchronous answer there somewhere – I expect that to be the motivation for the whole design (and maybe even Camel) in the first place.
And then you have to simulate that real life behavior in testing as well. It should be done in the MOCk service you call via Camel.
Sorry for the short answer – hurrying from customer to customer. Maybe some consulting (workshop onsite or remote) would be best to better discuss these matters.
Cheers
Bernd
Von: camunda-...@googlegroups.com [mailto:camunda-...@googlegroups.com] Im Auftrag von Alfonso Mateos Alarcón
Gesendet: Donnerstag, 27. Februar 2014 10:36
An: camunda-...@googlegroups.com
Betreff: Re: [camunda-bpm-users] Couldn't find waiting process instance with id '6301' for message 'AFI_GENERATED'
Hi Bernd, let me make sure I understood, can you confirm that or correct me?
--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/39e7e51c-9a11-448d-bc8e-16f348a7462f%40googlegroups.com.