Creating a REST Reference Binding

Procedure

  1. From the File Explorer, navigate to the samples directory, select docker > binding > rest > BookStoreConsumption and double-click tibco.bwce.sample.binding.rest.BookStoreConsumption. See Accessing Samples for more information.
  2. From the Project Explorer, navigate to tibco.bwce.sample.binding.rest.BookStoreConsumption > Service Descriptors > bookstore.json 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.
  3. 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.
  4. Test the configured process using the TIBCO Business Studio™ Container Edition Debugger
    The process will first try to execute a POST a book and then get all the books from the BookStore Service.
    The output of the GET operation will 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