Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 REST and JSON Palette : REST Dispatch and Reply

REST Dispatch and Reply
Activity
The REST Dispatch and Reply activity exposes TIBCO ActiveMatrix BusinessWorks processes as RESTful web services. With this activity, users can map HTTP requests to TIBCO ActiveMatrix BusinessWorks processes. Once a request is received, the REST Dispatch and Reply activity calls the bound process and takes the output of the activities in the called process as the reply.
You can also use the REST Dispatch and Reply activity to handle cross-origin requests. See Support for Cross-Origin Requests for details about the rules that the activity uses to handle cross-origin requests.
Configuration
The Configuration tab contains the following fields as shown in Table 17.
Clearing the check box enables the use of a custom RESTful web service created in the Service Editor tab for binding TIBCO ActiveMatrix BusinessWorks processes. For more details, see Creating a RESTful Web Service with Service Editor.
Note: This field is available only when the Enable WADL Reference check box is selected.
This field is only available after you select the Enable OAuth check box. Specify the OAuth server URL. The plug-in connects to the OAuth server based on the URL.
Service Editor
On the Service Editor tab you can bind HTTP requests to corresponding TIBCO ActiveMatrix BusinessWorks processes. See Exposing BusinessWorks Processes as RESTful Web Services for details about how to bind HTTP requests to TIBCO ActiveMatrix BusinessWorks processes to expose TIBCO ActiveMatrix BusinessWorks processes as RESTful web services.
Export WADL Button
You can export a RESTful web service to a WADL file. For more information, see Exporting RESTful Web Services to a WADL File.
To export a RESTful web service to a WADL file, click the Export WADL button. Then, on the Export WADL dialog box, provide information as per Table 18.
Table 18 Export WADL 
Export Swagger Button
You can export RESTful web service to a Swagger API description file. For more information, see Exporting RESTful Web Service to Swagger.
TIBCO ActiveMatrix BusinessWorksTM Plug-in for REST and JSON uses Swagger version 2.0 to export Swagger API description files.
To export RESTful web services to a Swagger web server, click the Export Swagger button. Then, on the Export Docs dialog box, provide information as per Table 19.
Table 19 Export Docs 
ZIP: The ZIP file contains an API description file, Swagger library, and a light-weight HTTP server named Winstone.
WAR: The WAR file can work with any J2EE container such as Jetty and Tomcat. You can use your own server instead of the default Winstone by using this format.
After selecting the Show Advanced check box, the following fields are displayed.
Overview
The Overview tab displays the general binding information with pairs of the RESTful web service and the bound TIBCO ActiveMatrix BusinessWorks process.
The RESTful web service is displayed in the following format:
method||methodID||resource
Output
The Output tab contains the following fields as shown in Table 20.
Error Output
The Error Output tab lists the exceptions that can be generated by the REST Dispatch and Reply activity. See Trace Messages for details about error codes.
Table 21 REST Dispatch and Reply Error Output

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved