I had a long mail exchange with Pat on the OpenWFEru developer mailing list.
It all boils down to two pieces of code.
A participant which receives some work from the workflow engine via its consume() method. The participant task is simply to call a [web]service (SOAPey, RESTy, Messagesque, whatever), but the answer will come later… No direct reply.
This delayed reply will come back via an HTTP call (a Rails controller here). This controller will contact the participant and hand it back the request params. The participants will thus be able to answer to the engine.
The participant :
The controller :
This is the skeleton of a solution, I hope it captures the essence behind this whole asynchronicity…