BPEL Process Service Component as the Service
The BPEL service needs a receive activity to accept the message from the client, and a switch activity (in BPEL 1.1) or an if activity (in BPEL 2.0) with two branches, one with an invoke activity sending the in-stock message if the item is available, and a second branch with an invoke activity sending the out-of-stock message if the item is not available.