In edoc automate flows, you can use service tasks to execute an HTTP request in one step. Service tasks are particularly useful if you want to use external systems or services, such as a REST API function, within your workflow.
Properties of a service task
A service task offers various configuration options to precisely meet your requirements:
-
URL: Specify the destination URL that the service task should call up.
-
Method: Select the HTTP method for the request. GET and POST are supported.
-
JSON: If you use the POST method, you can define JSON data to be sent in the request body.
-
Timeout: Specify the maximum waiting time for the request. The default value is 10 seconds. The maximum is 59 seconds.
-
Header: Specify additional HTTP headers by defining the name and value for individual headers.
HTTP request response
After the service task has executed the HTTP request, you can save various parts of the response in workflow variables:
-
Status: Saves the HTTP status of the response in the specified variable.
-
Contenttype: Saves the content type of the response in the specified variable.
-
Content: Saves the actual content of the response in the specified variable.
-
Header: Saves all response headers as a JSON string in the specified variable.
-
Message: Contains the message from the workflow engine regarding the status of the HTTP request. The message is usually "OK". In the event of errors, you will receive a corresponding error message.