I’m trying to correlate message from one receive task to another receive task but I’m getting the error even though Asynchronous Before is checked.
I have a message receive event i.e Document Received, having rabbitmq consumer and on Java Delegate of Document Received is checking if the received document is PDF then publish that document on image-converter-queue rabbitmq queue and machined-queue and correlate the message to a Splitter service task.
If the received document is NOT PDF then publish that document to pdf-image-thumbnailing-queue only and correlate the message to Thumbnailing receive task.
These Java Delegates are executing twice time
To Correlate the message I’m doing below steps:-
RabbitMQ Consumer which is actully Start Receive Event
@Vinit_Kumar when you use parallel gateway, fork and join should be configured properly. In your model, you have forked after every activity but you didn’t used parallel gateway to join.
Hello @Vinit_Kumar,
The message for the thumbnail activitiy cannot be correlated simply because your workflow does not have a token waiting at this activity for this mesage; the only token at this point in time sits at the start event and waits for moving forward AFTER the delegate is executed.
You should morph this task to a service task and use an expression at the sequenceflow to let the engine move the token forward to the thumbnail task. @aravindhrs: Even though proper joining after a fork is generally good practise, it will not solve the problem. This way he assures that after every task the response is saved.
Correlation from Image Converter to Thumbnail is working now but from Thumbnail to Scanner correlation isn’t working.
This wait event is delaying my process so don’t want to use this.
Could you please tell me how to execute java delegates only once with received message task?
My Use Case is
My workflow should be activated when someone posts something on rabbitMQ.
For that, I have created one RabbitMQ consumer, so that consumer will give me one id based on that id I have to send an HTTP request and the response of that HTTP request I have to publish to rabbitMQ so that other receive task can consume that response and will able to do there further processing.
Hello @Vinit_Kumar,
A message will only be correlated successfully if your process instance is at the according message receive task waiting. If you send a message from the Thumbnailing task to trigger the Scanner task, it will not work because the token is still sitting at the Thumbnailing task. Within your process model you simply can proceed by using condition expressions at the sequenceflows.
JavaDelegates are always executed only once.
It is cleared completely now. I changed in BPMN file and I have one rabbitMQ listener inside that listener I’m trying to create the instance of the workflow as mention below:-
Hello @Vinit_Kumar,
Currently I‘m not able to take a closer look into your BPMN file. I can do this earliest next Monday.
If you use two pools within one bpmn file you have to make sure that both of them are flagged as „executable“. Otherwise the second one will be ignored by the engine.
Best, McAlm
Displaying the history in cockpit is an Enterprise-Feature only.
Usually this is what users expect from Camunda
The engine persists all the history data in the database (according to the configured history level) even in CommunityEdition. So if needed you can query the history data on your own, preferably by using the API.