Http task
Http task activity allows submitting and storing the results of a HTTP call.
| Exclusive | When it receives a special job from a specific process example, it makes jobs run in order. |
| Execution listeners | Listeners for an activity, process, sequence flow, start and end event. |
| Multi-instance type | Determines if multiple instances of this activity are created. |
| Cardinality (Multi-instance) | An expression or numeric value determines how many instances are created. |
| Collection (Multi-instance) | The number of instances is determined by the elements of a collection. For each element in the collection, a new instance is created. |
| Element Variable (Multi-instance ) | The variable under which each element is available to the newly created instance. |
| Completion Condition (Multi-instance) | An expression that, if it evaluated to true , stops the creation of new instances. |
| Is for compensation | A flag that identifies whether this activity is intended for the purposes of compensation. |
| Request method | Request URL of the HTTP call. |
| Request URL | Request method to be used in the HTTP. |
| Request headers | Line-separated HTTP request headers. |
| Request body | Request body to be sent, e.g., a JSON file. |
| Request body encoding | Encoding of the request body. |
| Request timeout | Request timeout in milliseconds. |
| Disallow redirects | Determines whether HTTP redirects can be redirected. |
| Fail status codes | List of Http response status codes to fail the request and throw a FlowableException. |
| Handle status codes | List of status codes for which the task throws BpmnError which can be caught by a boundary error event. |
| Ignore exception | Determines whether exceptions are ignored and stored in the variable indicated in the response variable. |
| Response variable name | The variable name in which the HTTP response is stored. |
| Save request variables | Determines whether all request variables are stored. By default, only response related variables are stored as variables. |
| Save response status, headers | Determines whether response variables including HTTP status, headers etc. are stored. By default, only the response body is stored as a variable. |
| Result variable prefix | A prefix that is put in front of the variable name of the result variables for easier grouping. |
| Save response as a transient variable | Determines whether the response variables should be stored as transient. |
| Save response as JSON | Determines whether the response variable is stored as a JSON variable instead of a String. |
Execution listeners examples
You can use the Execution listeners as shown in the examples.
Start
End
Take
Multi-instance type examples
You can use the Multi-instance type as shown in the examples.
Default, only one instance is created:
None
Activities are created in parallel. This is a good practice for User tasks activity:
Parallel
Activities are created sequentially. This is a good practice for Service tasks activity:
Sequential
Cardinality (Multi-instance) examples
You can use the Cardinality (Multi-instance) as shown in the examples.
${number}
2
Collection (Multi-instance) example
You can use the Collection (Multi-instance) as shown in the example.
2
Element variable (Multi-instance) example
You can use the Element variable (Multi-instance) as shown in the example.
elementvar
Completion Condition (Multi-instance) example
You can use the Completion Condition (Multi-instance) as shown in the example.
true
Request URL example
You can use the Request URL as shown in the example.
http://your-system.example.com/your-endpoint/${someVariable}
Request method examples
You can use the Request method as shown in the examples.
GET
POST
PUT
DELETE
Request body example
You can use the Request method as shown in the example.
{‘clientId’: ${clientId}, ‘name’: ${name}}
Request timeout example
You can use the Request timeout as shown in the example.
25
Fail status code examples
You can use the Fail status code as shown in the examples.
400
404
5XX
Status codes in handleStatusCodes override those in failStatusCodes when they are both set.
Response variable name example
You can use the Response variable name as shown in the example.
responseVar
Result variable prefix examples
You can use the Result variable prefix as shown in the examples.
responseProtocol
responseReason
responseStatusCode
responseHeaders
responseBody
errorMessage