This article describes the steps necessary to send an event to a Request/Reply map from another map using the Rest connector.
Design Overview: The below image is a basic example of steps
Step Details: Step 1 - Create the Request/Reply Map (build this map first).
TIBCO Scribe® Online Help for Request/Reply Map Step 2 – Use the Request/Reply endpoint URL to generate the Rest Specification. The Endpoint URL can be found in the Wait for Request block as seen below.
Take the endpoint URL retrieved from the Request/Reply Map and add api-docs to the URL as seen in the image below and copy and paste it into a web browser URL to obtain the specification.
The below image is the returned specification in the web browser.
Open a new browser and navigate to editor.swagger.io. Copy and paste the specification in the left pane and choose to convert json to YAML. In the right pane of the swagger editor you will be able to see if the specification contains any errors. You will want to make sure any errors are corrected before continuing. Additionally, in the right pane you will find the Base URI. The below image points out the location of the Base URI.
Step 3 – Create the Rest Web Service Connection using the Specification and Base URI obtained in the previous step.
Step 4 – Create the Integration Map that will query data to provide and send it to start the Request/Reply Map.
The Post block for the Rest Web Service connector will go at the end of this map in order to send the data to the Request/Reply Map.
Inside the Post block select the post entity on the General tab. On the fields tab you will want to provide the access token to the query access Token field in the target. This is found on the endpoint URL for the request reply map as seen in the image below. Finally provide the Account data to the target post fields to be sent to the Request/Reply Map.
When the Map is ran successfully a message will be sent to the Request/Reply Map containing the data supplied in the Post Block as shown above.
The below images show the integration Map that sends data to start the Request/Reply map and the Request/Reply Map receiving the data.