Web Service Builder

Introduction

The Web Service Builder is a visual tool for generating Groovy scripts that call external web services (REST APIs) through configured connectors and requests. It provides a no-code interface for selecting a connector, choosing a request, defining parameters, and extracting response data into process variables.

The Web Service Builder is used in BPM tasks and listeners to integrate external systems into business processes.

Usage

General Presentation

  1. Web Service Script Usage: Web Service builder

    1. Service Selection (1): Choice of the connector to call.

    2. Request Selection (2): Choice of a specific request to execute.

    3. Request variables (3): Definition of the parameters to send with the request.

    4. Request variable name (4): Name of the variable to store a specific part of the result.

    5. Request global variable (5): Variable storing the entire response result.

    6. Variable precision (6): Extract a specific payload from the global variable (5) into the named variable (4).

    7. Button to add payload (7): Add a new payload extraction to the request.

    8. Request Parameters (8): Definition of the parameters to send with the request.

    9. Script activation (9): Toggle indicating that the parameter value is a Groovy script rather than a static value.

    10. Parameter definition (10): The parameter value — either a Groovy script (when script activation is enabled) or a static string value.

    11. Generated expression (11): Groovy script generated from the configuration.

Details

Connector Selection (1)

Select the web service connector that defines the target API endpoint, authentication method, and base configuration. Connectors are managed under App > WS Component > Connector.

Request Selection (2)

Select a specific request defined within the chosen connector. Requests define the HTTP method (GET, POST, PUT, DELETE), URL path, headers, and body template. Requests are managed under App > WS Component > Request.

Request Variables (3)

Define variables that will be sent as part of the request. These variables can be used in URL templates, headers, and body templates of the selected request.

Each variable has:

  • Name (4): The variable name that can be referenced in the request templates

  • Value extraction (6): A JSON path or expression to extract a specific value from the response

Response Handling

The builder provides two levels of response handling:

Global Variable (5)

The entire response is stored in a process variable. This contains the full response body.

Specific Variable Extraction (4, 6)

Extract specific values from the response into named variables using JSON path expressions. This is useful when you only need certain fields from the API response.

Click Add payload (7) to add additional extraction rules.

Request Parameters (8)

Define parameters sent with the request. Each parameter has:

  • Name: Parameter identifier

  • Script toggle (9): When enabled, the value is evaluated as a Groovy expression at runtime. When disabled, the value is treated as a static string.

  • Value (10): The parameter value — either a static string or a Groovy expression

When the script toggle is enabled, the value field accepts any valid Groovy expression. This allows you to use process variables, perform calculations, or call helper methods to dynamically generate parameter values.

Generated Groovy Script (11)

The builder generates a Groovy script displayed at the bottom of the panel. This script handles:

  1. Connector initialization

  2. Request preparation with parameters

  3. API call execution

  4. Response extraction into variables

Review the generated script to understand the full API interaction flow. This is especially useful for debugging integration issues.