Creating a REST Reference Binding
Procedure
- From the File Explorer, navigate to the samples directory and select samples > container > cloudfoundry > binding > rest > BookStoreConsumption and double-click tibco.bwce.sample.binding.rest.BookStoreConsumption.
- From the Project Explorer, navigate to tibco.bwce.sample.binding.rest.BookStoreConsumption > Service Descriptors > bookstore.json to view the endpoints,
-
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 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
Copyright © Cloud Software Group, Inc. All rights reserved.