Creating a REST Reference Binding
- Procedure
- From the File Explorer, navigate to the samples directory and select and double-click tibco.bwce.sample.binding.rest.BookStoreConsumption.
- From the Project Explorer, navigate to
to view the endpoints,
This will create a cloud shaped icon with a right facing arrow. The cloud is an indication that it is a REST Reference whereas the arrow within the cloud indicates that it is a binding. Since the binding is within a cloud, it is an indication that it is a REST binding.
- Drag and drop an endpoint ( /books) on the right side of the canvas to create a REST Reference Binding.
This creates an Invoke activity which is pre-configured to invoke the operation. It also creates an HTTP Client Shared Resource with the routable URL as the default host The configuration for these entities is copied from the Swagger document from which you created the Reference Binding. The Reference consists of the name of the API as well as the operations it supports.
- Test the configured process using the TIBCO Business Studio Debugger
The process will first try to run a POST a book and then get all the books from the BookStore Service.
The output of the GET operation can be seen as
09:05:42.933 INFO [bwEngThread:In-Memory Process Worker-3] c.t.b.p.g.L.t.b.s.b.s.r.B.module.Log - First Book Returned:Biography of Apple Co-Founder Steve Jobs