We have a composite (CompositeA), which has 2 BPEL processes (bpelprocess1 and bpelprocess2). bpelprocess1 is synchronous and bpelprocess2 is a one-way. bpelprocess1 receives a message from the client - then sends the message using a one-way Invoke action to bpelprocess2 - bpelprocess2 transforms the message and assigns some values - then sends the message to Event1 through an Invoke action - bpelprocess1 has a Receive activity waiting for an event from Event1 - then it will send the message back to the client as the Reply. Everything works up to the point where the bpelprocess1 Receive(onEvent) activity is waiting for an event, it sits in this "Pending" state until the SyncMaxWaitTime value has expired and then we get a timeout error (see below).
"Waiting for response has timed out. The conversation id is null. Please check the process instance for detail."
So our question is, why does the Receive(onEvent) in bpelprocess1 never pick up the published event? We've run some additional tests to ensure the event is being published, and that has been confirmed.
Is it possible to receive an event that was published during the current instance of the process (i.e., since bpelprocess1 invoked bpelprocess2 which invoked the Event1 publish, can bpelprocess1 perform a mid-process Receive of the event that was just published?
Please let us know if this makes sense or if you have any additional questions.
On a side note, if we create an independent mediator component in the same composite and have it subscribe to Event1 as well, then just write the message out to a file. It would not pick up the message from the EDN in the scenario described above, if we set the property nonBlockingInvoke=true or bpel.config.transaction=requiresNew on the bpelprocess2 partnerlink from bpelprocess1, the Mediator would get the message from the EDN, but bpelprocess1 still timed out waiting for the event. If we setup another BPEL process (bpelprocess3) in the same composite (though not linked to bpelprocess1 and bpelprocess2) and it has a mid-process receive onEvent listening for Event1, it does not pick up the published event either, so seems to be an issue with the mid-process receive onEvent in the synchronous BPEL process.
Any help is appreciated.
Thanks for the reply, but there is no issue with the one-way from bpel1 to bpel2, we do not expect nor want a response from bpel2, it should just publish the event and complete. The bpel1 should continue it's flow (which it does) and the next action is a Receive action listening for an event (that was published by bpel2), but the Receive never finds the event.
Here's a less complex use case:
1. bpelprocess1 is a synchronous process which publishes to Event1 (this completes successful and returns a success message to the client)
2. bpelprocess2 is an asynchronous process which has a mid-process Receive action that is listening for Event1
3. bpelprocess3 is a process which is initiated by Event 1
If we execute bpelprocess2 it will set at the mid-process Receive action in a PENDING state, waiting for Event1 to occur.
If we then execute bpelprocess1 the Event1 is published and we receive a "SUCCESS" response back.
At this point bpelprocess3 is initiated (b/c it's initial Receive is triggered by Event1)
We would also expect the mid-process Receive in bpelprocess2, which is in a PENDING state to trigger, but it never does.
Hopefully this use case makes more sense.