HTTP POLL Task
"type" : "HTTP_POLL"
The HTTP_POLL is a conductor task used to invoke HTTP API until the specified condition matches.
The HTTP_POLL task comes into use in situations like State Monitoring, where you need to monitor a particular state. For example, you can leverage this to monitor issues in GitHub so that you get notified of the issues at every specified time.
You can define the http_poll tasks in the workflow with the task type HTTP_POLL.
To proceed with the workflow creation, you must specify the input parameters.
The input parameters supported by the HTTP_POLL task are as follows:
|terminalCondition||Specifies the condition to be evaluated after every HTTP API invocation. If the condition is evaluated as |
|pollingInterval||Specify the time duration in seconds between each HTTP invocation.|
|pollingStrategy||It can take any of the following values: |
Apart from the above parameters, ensure that the following basic parameters for an HTTP task are also provided.
|uri||Provide the Uniform Resource Identifier (URI) for the service. It can be partial when using vipAddress or else it indicates the server address.|
|method||Indicates the required action to be performed on the source. It can be GET, PUT, POST, DELETE, OPTIONS or HEAD. |
|accept||Accept header as required by the server. Defaults to application/json.|
|contentType||The supported content types are text/plain, text/html, and application/json (Default).|
|headers||Indicate a map of additional http headers to be sent along with the request.|
|body||Indicates the request body.|
|vipAddress||When using discovery-based service URLs.|
|oauthConsumerKey||OAuth client consumer key.|
|oauthConsumerSecret||OAuth client consumer secret.|
|connectionTimeOut||Indicates the connection time out in milliseconds. If set to 0, it is equivalent to infinity. By default, it is set to 100.|
|readTimeOut||Indicates the read time out in milliseconds. If set to 0, it is equivalent to infinity. By default, it is set to 150.|
Let’s see an example workflow:
"description": "Sample workflow to get started with HTTP POLL task.",
So, here the input parameters for the HTTP_POLL task are defined as follows:
The above configuration defines that the conductor will invoke the HTTP API every 60 seconds.