Some times you need to start a process that runs for a long time. Let say hours. Normally you would choose to create a asynchronous process. So far so good. But when you call this process from a Web application, the web application can not wait for the result for the callback response.
A simple solution is to create s synchronous composite and reply to the caller immediately. This can be achieved in the next example. This solution is based on a BPEL implementation.
Note that a after the reply an checkpoint is created. This will force the process to save the state to the database AND it force the send the reply back to the caller. Otherwise, with no checkpoint, the reply is send after the transaction is committed (XA) and case of an error, the reply is not send.