Http Task Activity
The Http Task activity enables the submission of HTTP requests and the subsequent storage of response data within a process. It facilitates seamless integration with external web services by managing request parameters, authentication headers, and response handling logic.
| Field | Description | Requirement |
|---|---|---|
| Exclusive | Ensures jobs run in sequential order when receiving a specific process task. | Optional |
| Execution Listeners | Configures listeners for activity, process, sequence flow, or event triggers. | Optional |
| Multi-instance Type | Determines if multiple instances of the activity are created (None, Parallel, Sequential). | Optional |
| Cardinality (Multi-instance) | Defines the number of instances to create via an expression or numeric value. | Optional |
| Collection (Multi-instance) | Uses a collection to determine the number of instances created. | Optional |
| Element Variable (Multi-instance) | Specifies the variable name for the current element in a multi-instance collection. | Optional |
| Completion Condition (Multi-instance) | An expression that stops instance creation when evaluated to true. | Optional |
| Is for Compensation | Indicates if the activity is designated for compensation logic. | Optional |
| Request Method | The HTTP method to be used for the call (e.g., GET, POST, PUT, DELETE). | Required |
| Request URL | The target URL of the HTTP call. | Required |
| Request Headers | Line-separated HTTP request headers. | Optional |
| Request Body | The payload to be sent with the request, such as a JSON object. | Optional |
| Request Body Encoding | Specifies the character encoding of the request body. | Optional |
| Request Timeout | The maximum time in milliseconds to wait for a response. | Optional |
| Disallow Redirects | Determines whether HTTP redirects should be followed. | Optional |
| Fail Status Codes | HTTP response status codes that trigger a FlowableException. | Optional |
| Handle Status Codes | Status codes that trigger a BpmnError for boundary event handling. | Optional |
| Ignore Exception | Determines if exceptions are ignored and stored in the response variable. | Optional |
| Response Variable Name | The variable name in which the HTTP response is stored. | Optional |
| Save Request Variables | Determines whether all request variables are stored. | Optional |
| Save Response Status, Headers | Determines whether HTTP status and headers are stored alongside the body. | Optional |
| Result Variable Prefix | A prefix applied to result variables for organized grouping. | Optional |
| Save Response as a Transient Variable | Determines if response variables are stored as transient data. | Optional |
| Save Response as JSON | Determines if the response is stored as a JSON object instead of a String. | Optional |
Action Types & Examples
Execution Listeners
- Format: string
- Example Result: "End"
Multi-instance Type
- Format: string
- Example Result: "Parallel"
Cardinality (Multi-instance)
- Format: digit or expression
- Example Result: "2"
Request Method
- Format: string
- Example Result: "POST"
Fail Status Codes
- Format: string or digit
- Example Result: "5XX"
Implementation Examples
Field Setup - http://your-system.example.com/your-endpoint/${someVariable} - {"clientId": ${clientId}, "name": ${name}} - responseVar - responseBody - responseStatusCode
Execution Parameters - 25 - ${variable==True} - elementvar - Sequential - 404
Technical Notes
Status codes defined in the "Handle Status Codes" field override those specified in the "Fail Status Codes" field when both parameters are configured.