anchor.diff:  ----
   
   
  -[[bpmnEmailTask]]
  -
  -
  -==== HTTP Task
  -
  -The HTTP task allows you to make HTTP requests, enhancing the integration features of Flowable. Note that the HTTP task is *not* an 'official' task of the BPMN 2.0 spec (and doesn't have a dedicated icon as a consequence). Hence, in Flowable the HTTP task is implemented as a dedicated service task.
  -
  -
  -[[bpmnHTTPTaskClientConfiguration]]
  -
  -
  -===== HTTP Client configuration
  -
  -The Flowable engine makes HTTP requests through a configurable HTTP Client. The following properties can be set in the _flowable.cfg.xml_ configuration file:
  +[[bpmnHttpTask]]
  +
  +
  +==== Http Task
  +
  +Http task allows you to make HTTP requests, enhancing the integration features of Flowable. Note that Http task is *not* an 'official' task of the BPMN 2.0 spec (and doesn't have a dedicated icon as a consequence). Hence, in Flowable, Http task is implemented as a dedicated service task.
  +
  +
  +[[bpmnHttpTaskClientConfiguration]]
  +
  +
  +===== Http Client configuration
  +
  +The Flowable engine makes Http requests through a configurable Http Client. The following properties can be set in the _flowable.cfg.xml_ configuration file:
   
   [source,xml,linenums]
   ----
  
positive.code: </sericeTask>
  ----
  
  The HTTP task is configured by <<serviceTaskFieldInjection,field injection>>. All the values for these properties can contain EL expression, which are resolved at runtime during process execution. The following properties can be set:
  
  [options="header"]
  |===============
  |Property|Required?|Description
  |requestMethod|yes|Request method (Example - GET,POST,PUT,DELETE etc).
  |requestUrl|yes|Request URL (Example - http://flowable.org).
  |requestHeaders|no|Line separated HTTP request headers. Example - + 
                    Content-Type: application/json + 
                    Authorization: Basic aGFRlc3Q=
  |requestBody|no|Request body (Example - ${sampleBody}).
  |requestTimeout|no|Timeout in milliseconds for the request (Example - 5000).
  |retryStatusCodes|no|Comma separated list of HTTP response status codes to retry, Example - 400,5XX.
  |ignoreStatusCodes|no|Comma separated list of HTTP response status codes to ignore, Example - 404,3XX.
  |variableNamePrefix|no|Prefix for the execution variable names.If prefix is not given, variables will be saved with name
                         in following format. 'taskId'.'fieldName'. For example, requestUrl is saved as 'httpGet.requestUrl'
  |httpActivityBehaviorClass|no|Full class name of custom extension  of org.flowable.http.HttpActivityBehavior.
  |===============
  
  In addition to the provided fields, following will be set as execution variables on successful execution.
  
  [options="header"]
  |===============
  |Variable|Optional?|Description
  |responseStatusCode|No|HTTP Response Status code (Example - 200).
  |responseHeaders|No|Line separated HTTP response headers. Example - + 
                    Content-Type: application/json + 
                    Content-Length: 777
  |responseBody|Yes|Response body as string.
  |===============
  
  Remember all the above execution variable names are prefixed by evaluated value of 'variableNamePrefix'.
  For example response status code can be accessed in another activity as 'httpGet.responseStatusCode'.
  Here 'httpGet' is the 'id' of the service task. To override this behavior, set 'variableNamePrefix' as required.
  
  [[bpmnHTTPTaskExampleUsage]]
  
  
  ===== Example usage
  
  The following XML snippet shows an example of using the HTTP Task.
  
  [source,xml,linenums]
  ----
  
negative.code: |connectTimeout|no|Connection timeout in milliseconds. By default set to 5000.
  |socketTimeout|no|Socket timeout in milliseconds. By default set to 5000.
  |connectionRequestTimeout|no|Connection request timeout in milliseconds. By default set to 5000.
  |requestRetryLimit|no|Request retry limit ('0' means do not retry).By default set to 3.
  
  |===============
  
  [[bpmnHttpTaskUsage]]
  
  
  ===== Defining Http Task
  
  Http task is implemented as a dedicated <<bpmnJavaServiceTask,Service Task>> and is defined by setting _'http'_ for the _type_ of the service task.
  
  [source,xml,linenums]
  ----
  <serviceTask id="httpGet" flowable:type="http">
  ----
  Also its possible to override default Http Task behavior by providing custom implementation.
  Custom implemention should extend org.flowable.http.HttpActivityBehavior and override perform() method.
  Field 'httpActivityBehaviorClass' should be set in the task definition.
  Default value for this field is 'org.flowable.http.impl.HttpActivityBehaviorImpl'.
  Currently 'HttpActivityBehaviorImpl' is based on Apache Http Client.
  ----
  <serviceTask id="httpGet" flowable:type="http">
    <extensionElements>
  