HTTP Task

HTTP Task

The HTTP Task allows to submit and store the result of a HTTP call.

Attributes

Group Attribute Description

General

ID

The unique identifier of the element within the process model.

Name

The name of the element. This is the name displayed in the diagram.

Documentation

A description and additional information about this element.

Details

Request method

Request method to be used in the HTTP call: GET, POST, PUT or DELETE.

Request headers

Line-separated HTTP request headers.

Request URL

Request URL of the HTTP call. Can contain expressions, e.g., http://your-system.example.com/your-endpoint/${someVariable}.

Request body

Request body to be sent, e.g., a JSON file. You can use expressions, e.g., {'clientId': ${clientId}, 'name': ${name}}.

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. Code ranges can be set with a wildcard X: Examples: 400, 404, 5XX.

Handle status codes

List of status codes for which the task throws BpmnError which can be caught by a boundary error event. Code ranges can be set with a wildcard X: Examples: 400, 404, 5XX. Status codes in handleStatusCodes override those in failStatusCodes when they are both set.

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 details

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. The following variables are affected: responseProtocol, responseReason, responseStatusCode, responseHeaders, responseBody, errorMessage.

Save response as JSON

Determines whether the response variable is stored as a JSON variable instead of a String.

Save response as a transient variable

Determines whether the response variables should be stored as transient.

Asynchronous

When enabled, the activity is started as an asynchronous job. The process state is persisted before this element is executed. Then the process execution is resumed asynchroneously. This can be used when the execution of an activity takes a long time to return the user interface. However, if an error occurs before the following wait state, there is no direct user feedback.

Execution listeners

Active Execution Listeners of the activity. This lets you react to the following events:

  • Start: Occurs when the activity is started.

  • End: Occurs when the activity is completed.

Skip expression

Defines an expression which is evaluated before executing the task. If it evaluates to true, the task is skipped.

Skip expressions are only be evaluated if there is a process variable _ACTIVITI_SKIP_EXPRESSION_ENABLED with the boolean value true.

Is for compensation

Determines whether the activity can serve as a compensation for another activity.

Multi instance

Multi instance type

Determines if multiple instances of this activity are created. There are three choices:

  • None (default, only one instance is created).

  • MI parallel (activities are created in parallel. This is a good practice for User Tasks).

  • MI sequential (activities are created sequentially. This is a good practice for Service Tasks).

Once a type other than None is chosen, the following options appear:

  • Collection: 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: The variable under which each element is available to the newly created instance.

  • Element index variable: The variable under which the current number of iterations is stored.

  • Completion condition: An expression which, if it evaluated to true, stops the creation of new instances.

  • Cardinality: An expression or numeric value (integer) which determines how many instances are created.

Visual

Font weight

The font weight of the element in the diagram.

Font size

The font size of the element in the diagram.

Font color

The font color of the element in the diagram.

Font style

The font style of the element in the diagram.

Background color

The background color of the element in the diagram.

Border color

The border color of the element in the diagram.