Inbound HTTP component
The Inbound HTTP component is able to receive messages through HTTP POST requests. It will act like a webservice that listens for HTTP POST requests. Once a message is received, it's content will be handed to the next component in the flow.
Configuration
The Inbound HTTP component has the following configuration options:
Property | Description |
---|---|
Endpoint | A name to identify this component's endpoint |
Protocol | Select which protocol will be used to by the webservice |
Tenant Part | Select which part of the tenant is used in the URL |
Remarks
- An Inbound HTTP component should always be the first component in the flow.
- The
Endpoint
name can only contain letters, numbers and underscores. - The
Endpoint
name should contain between 3 and 50 characters.
Reaching the webservice
When you have installed a flow with an inbound endpoint named dovetail_test and tenant part id the webservice address will be something like this (tenant id varies):
http://[public server ip address]:9000/584936/dovetail_test
When you have installed a flow with an inbound https endpoint named dovetail_test and tenant part name Dovetail the webservice address will be something like this (tenant name varies):
https://[public server ip address]:9001/dovetail/dovetail_test
Testing the webservice
You can use a REST client, such as POSTMAN, to send messages to the inbound HTTP component in Dovetail. This makes it possible to manually send test data to the flow.
To send messages you wil need to:
- Enter the URL of the webservice as described above.
- Set the dropdown to 'POST'
- Choose message format 'RAW'
- Paste a message body (e.g. XML data) in the text area field.
- Click 'Send' to submit the message
If you want to see if the message has been processed succesfully by Dovetail, you can open the respective flow in the Flow Manager and go the 'Logging' section.
Behavior of the component
The Inbound HTTP Component will always send back the result of the flow, even when the flow is asynchronous. In the following diagram it is visually explained.
In some cases this is not desired, depending on the size and complexity of the flow it can take some time until the Inbound HTTP Component gets back a result from the flow. Some clients like POSTMAN wait till they get a response, but other clients or applications don't wait long enough and get a timeout. If you always want to get back a response immediately you can use the Wire Tap component like in the following example:
The following diagram show what this flow above does:
The first part of the flow (Inbound HTTP -> Wire Tap -> Velocity)
serves to send back a response immediately. The response body contains whatever is specified in the Velocity component. The actual processing will happen in the other part of the flow that is connected to the bottom of the Wire Tap component. This part can also be put in another flow by using the FlowLink component. This way you can reuse both parts and it looks a bit cleaner.
Remarks
- The maximum size of a body that can be uploaded is 1 Mb.