We will trigger the BookshelfEvent
business event from the book warehousing BPEL process. This will result in executing the BookShelvingBPEL
process, which we have created in the previous section.
We will trigger the BookshelfEvent
business event using the <invoke>
activity, which we will locate at the end of the book warehousing BPEL process, after the BookStore Approval human task and the corresponding <if>
activity.
Let's start by performing the following steps:
<invoke>
activity from the right-hand side toolbar to the BPEL process and drop it after the BookStore Approval human task and the corresponding <if>
activity.<invoke>
activity TriggerBookshelfEvent
, as shown in the following screenshot:<invoke>
activity will open the Edit Invoke dialog box, where we will select Event for Interaction Type:BookshelfEvent
business event under Event. We also need to specify the data payload—we need to specify a variable with the corresponding data type. We will select the BookData
variable:<invoke>
activity icon, denoting that we have successfully specified the event to be triggered:We have triggered the BookshelfEvent
business event from the Book Warehousing BPEL process. This will fire all processes or services or other components subscribed to this event. In our example, this will be the BookShelvingBPEL
process.
To trigger the event, we have used the <invoke>
activity and the following source code has been generated: