is this possible via java api?
is this possible via java api?
Whats your use case? Seems like would be problematic given that the Start Listener is executing before the task is fully established.
Might be able to get away with something like this?
Have not tested it. But Logic (fingers crossed) would be that the Start Listener is executing before the boundary event is generated, and by the time the boundary is generated, the variable myVar is already created and equal to ‘Dog’. BUT worst case is that you could execute this logic in the sequence flow before the Receive Task or at any point before your “message task”.
thank you for your suggestion, it works Actually, it can be used even without the flow from boundary event to next task, because I can use start execution listener for that event which is now able to correlate the message for the Receive task (was not possible in execution listener of the receive task).
I need to wait for the call from other system(letting me know, that it has data ready). But this other system, calls the process exactly at the moment when it has data ready. Which mean, process could be at that moment in state before the receive task. So in the start execution listener I need to check if data is ready (meaning system called the process before, which was not yet in waiting state) and if yes - continue in the process. If no, do nothing - meaning waiting for the call from this system.
And I don’t want to model this as two tasks (checking the data, waiting for the data), because from business point of view, it’s only about waiting for the data . Checking is technicall/synchronisation issue, which shouldn’t be express in the business process . We model the business processes in a way, they are easily understood by our business/non technical people. That’s the reason, I want to hide this logic inside inside the execution listener.
Using boundary event is not the ideal solution, but I will use it, if no-one will suggest better solution
So what you really need a message queue. Camunda does not provide one out of the box, so you are supposed to map it to something like Rabbit.
But as a poor mans queue / workaround, I have done something like this:
The secondary process lets you manage instant message returns / race events where the process is not ready for it.
(The error event is just a style. You can add the same logic in the gateway or in other forms. The point is just to prevent endless loop of attempts)
Thx, but that’s exactly what I don’t want to do I mean, incorporate this kind of detail into the proces…
IMHO this is not what BPMN is for…
But we decided that we use your solution for now (with boundary event) . I cannot use message queue , because this other system is hard to change, but I agree, it would be the best solution. So, I need to do some lobbying…in order to achieve that
But from my point of view…the problem is solved.
That’s why it’s a second process definition. The definition that is getting the messages from your system is a process which your business group would never see. You would only show them the business centric process