0

Working with WSO2 BPS 3.6.0 - we have a service which notifies a running BPEL process about an event.

Util the process is running, it is working great (using the correlation). But when the process is already completed, the request doesn't get any response. I'm ok if an exception could be raised, but getting no response whatsoever is annoying. Is there a way to fail quickly if there's no (active) instance with the specific correlation?

Edit: effectively the receive, pick and onEvent activities behave the same way

Thank you in advance

gusto2
  • 11,210
  • 2
  • 17
  • 36
  • It looks like we have to create an external correlation database table and the invoking service will have to look up if the instance is still active – gusto2 Nov 28 '16 at 09:10

1 Answers1

0

Apache ODE is designed to enqueue incoming messages that arrive early.

Example: Process

Receive1 -> Receive2 -> Receive3 -> Reply3

Receive1: Creates an instance and initiates the correlation.

Receive2: Instance is awaiting for the message to arrive.

But, message on Receive3 arrives early before Receive2 and hence gets enqueued. Since the following activity is a Reply3, it's a synchronous call and the channel will timeout waiting for the response.

Once the Receive2 arrives, the engines sees that message for Receive3 has already arrived and completes the instance.

Now if another message arrives on Receive3 with the same correlated value, it gets enqueued again for future consumption on a new instance that would be created with the same correlation value. Hence No errors will be reported.

Note: This is the behaviour of Apache ODE, unless WSO2 has changed this behavior.

Sathwik
  • 193
  • 8
  • Thank you for the reply. I see the point. Indeed the the server behaves as you've described. So even when the correlation is not found, the call waits until one is created. It looks like the calling service will have to check if the correlation (business object) exists before invoking the BPEL endpoint. – gusto2 Nov 30 '16 at 08:34
  • Just curious, why do you want to check? – Sathwik Nov 30 '16 at 10:27
  • During the request processing (may take days or weeks) the client may provide updates or events related to the request (handled by onEvent or pick with correlation). Once the process is completed, any subsequent update must be refused. So getting timeouts is really not an option. Fortunately we have an ESB in front of the BPEL server, so the request (business object) state could be check. – gusto2 Nov 30 '16 at 10:58