Time for action – declaring the cancel operation on the BPEL process interface
To add the
cancel
operation to the BPEL process WSDL interface, we will proceed as follows:
- We will open the
BookWarehousingBPEL.wsdl
interface. - We will scroll down to the declaration of the
BookWarehousingBPEL
port type. We can see that the port type specifies a singleprocess
operation: - We will add the
cancel
operation, which the client will use to cancel the running BPEL instance. In our example, we will use the same input message as in theprocess
operation: - Next, we will add the
cancel
operation as the trigger for the OnEvent event handler. We will open theBookWarehousingBPEL.bpel
process and double click on the OnEvent activity. - A window will pop up, where we will specify the partner link, port type, and operation name. We will specify the client partner link, the BookWarehousingBPEL port type, and the cancel operation. For the variable, we will type the
cancelInputMessage
name and select Message Type...