Time for action – triggering BookshelfEvent from the book warehousing BPEL process

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:

  1. Open the Book Warehousing BPEL process and scroll to the end of the process. We will drag the <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.
  2. Name the <invoke> activity TriggerBookshelfEvent, as shown in the following screenshot:
    Time for action – triggering BookshelfEvent from the book warehousing BPEL process
  3. Double-clicking on the <invoke> activity will open the Edit Invoke dialog box, where we will select Event for Interaction Type:
    Time for action – triggering BookshelfEvent from the book warehousing BPEL process
  4. Select the 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:
    Time for action – triggering BookshelfEvent from the book warehousing BPEL process
  5. After clicking on OK, we should see an arrow on the <invoke> activity icon, denoting that we have successfully specified the event to be triggered:
    Time for action – triggering BookshelfEvent from the book warehousing BPEL process

What just happened?

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:

What just happened?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.226.83