Skip to main content

REST Parameter

Outdated documentation page

This is an old version of the documentation for Flowable until version 3.13 and for the Angular-based Flowable Design 3.14/3.15. If you are running the latest version of Flowable please check out the current version of this page.

REST Input Parameters

The input parameters of a REST-based service model operation are straightforward, as they define the inputs of the operations. The values of the input parameters are typically used in the URL (using the technical name such as ${myInputParameter}) or in the body of the request, when doing a POST request.

  • Label : This is the human-readable name for the input parameter.
  • Name : This is the technical name of the parameter, as used at runtime by the engine logic. It can be referenced in the URL using ${myInputParameter}.
  • Type : The type of the input.
  • Description : The description of the input parameter name for documentation purposes.
  • Required : Whether the input parameter is required.
  • Default Value : The default value to use in case the parameter has not been provided. Can be a fixed value or an expression. For example, if you want to initialize an empty string as default value for a String, you can use ${''}.

An example of using input parameters in the URL part of the service operation configuration is shown in the following image:

06_01 advanced attributes

The parameters can, of course, be referenced anywhere in the URL string e.g. clients/${clientId}

REST Output Parameters

The options for an output parameter are a bit more complex, as the configuration needs to be flexible enough to be able to process a variety of different JSON responses of calling REST API's:

  • Label: This is the human-readable name for the parameter.
  • Source: The source of the output parameter data.
  • Default: The response body is the source of data and output parameter are processed as usual.
  • Full Response body: The body as a whole will be used. The possible types are limited to JSON, Array or String.
  • Response headers: All response headers are stored in an array like [{key:'Content-Type',value: 'application/json'}].
  • Specific header: A specific header is extracted from the response headers. The header name is case-insensitive.
  • Response status code: The response status code.
  • Name: This is the technical name of the parameter, as used at runtime by the engine logic. If no other options are configured, this value is used to find in the JSON response a field with this specific name.
  • Body Location: Allows to map the output value to a more complex field with dots, like customer.name.
  • Excluded from body: Only relevant for input parameters.
  • Path: Uses JSON pointer syntax to allow navigation through nested JSON structures like /customers/0/name to indicate where the value can be found.
  • Mapping name: In certain exceptional situations, it could be that names overlap. For example, assume that a REST API returns { buyer: { name: 'a' }, seller: { name: 'b' }} as response. Both will map to the technical name and at runtime, the BPMN/CMMN service task will not be able to know which name value should be taken. To solve this, a different mapping name value should be given to allow the runtime to distinguish.
  • Error parameter: The flag to mark the output parameter as error output parameter.