Man illustrationFlower illustration

Http task

Estimated reading: 4 minutes 366 views

Http task activity allows submitting and storing the results of a HTTP call.


ExclusiveWhen it receives a special job from a specific process example, it makes jobs run in order.
Execution listenersListeners for an activity, process, sequence flow, start and end event.
Multi-instance typeDetermines 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 compensationA flag that identifies whether this activity is intended for the purposes of compensation.
Request methodRequest URL of the HTTP call.
Request URLRequest method to be used in the HTTP.
Request headersLine-separated HTTP request headers.
Request bodyRequest body to be sent, e.g., a JSON file.
Request body encodingEncoding of the request body.
Request timeoutRequest timeout in milliseconds.
Disallow redirectsDetermines whether HTTP redirects can be redirected.
Fail status codesList of Http response status codes to fail the request and throw a FlowableException.
Handle status codesList of status codes for which the task throws BpmnError which can be caught by a boundary error event.
Ignore exceptionDetermines whether exceptions are ignored and stored in the variable indicated in the response variable.
Response variable nameThe variable name in which the HTTP response is stored.
Save request variablesDetermines whether all request variables are stored. By default, only response related variables are stored as variables.
Save response status, headersDetermines whether response variables including HTTP status, headers etc. are stored. By default, only the response body is stored as a variable.
Result variable prefixA prefix that is put in front of the variable name of the result variables for easier grouping.
Save response as a transient variableDetermines whether the response variables should be stored as transient.
Save response as JSONDetermines whether the response variable is stored as a JSON variable instead of a String.

You can use the Execution listeners as shown in the examples.

Start

End

Take

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

You can use the Cardinality (Multi-instance) as shown in the examples.

${number}

2

You can use the Collection (Multi-instance) as shown in the example.

2

You can use the Element variable (Multi-instance) as shown in the example.

elementvar

You can use the Completion Condition (Multi-instance) as shown in the example.

true

${variable==True}

You can use the Request URL as shown in the example.

http://your-system.example.com/your-endpoint/${someVariable}

You can use the Request method as shown in the examples.

GET

POST

PUT

DELETE

You can use the Request method as shown in the example.

{‘clientId’: ${clientId}, ‘name’: ${name}}

You can use the Request timeout as shown in the example.

25

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.

You can use the Response variable name as shown in the example.

responseVar

You can use the Result variable prefix as shown in the examples.

responseProtocol

responseReason

responseStatusCode

responseHeaders

responseBody

errorMessage
Share this Doc

Http task

Or copy link

CONTENTS
Chat Icon Close Icon