Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties
hiddentrue
idrLANGDONE

Product Version2021 Summer
Report Note
AssigneeAntje

Resources & Remarks

Modification History

NameDateProduct VersionAction
Antje07 MAY 20212021 SummerPage created and filled with content already reviewed by Marco.
Antje26 APR 20222022 Summeradd information on app-specific configuration possibility
Agnieszka29 APR 20222022 SummerrLANG



Excerpt

Configuration of system hooks, split in AMQP hooks and webhooks.


Section
bordertrue


Column

Table of Contents

Table of Contents
maxLevel2
exclude(Table of Contents|Read on|Connection of BPM Engine|Integration of AI Functionalities|Custom Client Build with Libraries)


Characteristics

Profile NamesystemHookConfiguration.json
Referenced by Servicesauthentication,api,commander
Storage Location
  • global configuration file: Git system directory 
  • app-specific configuration files (as of 2022 Summer): Git apps/<app name>/system directory

Parameters

Parameter SectionParameterTypeDescription
amqpList of mappings in JSON format.

List of single AMQP

hook

Hook configurations each of them defined via following parameters. Read by API gateway and COMMANDER service.

As of version 2021 Summer, placeholders can be used as provided by spring. They can reference values in the system environment including configuration files and command line arguments. The placeholders will be replaced by the referenced values of the environment variable during the starting process of the corresponding service. The syntax follows the spring placeholders: ${<reference>}.


bulkSizeintegerMaximum bulk size for a message.
enableboolean
Specified
Specifies whether this configuration is active/enabled (true) or inactive/disabled (false).
passwordstring

Password for the AMQP server.

predicatestringCondition that specifies when the AMQP hook is used.
supported scripting languages: SpEL (Spring Expression Language) and
Javascript
JavaScript.
All properties that are available in the corresponding hook's JSON request body can be referenced. Additionally, the tenant can always be referenced via options['tenant'].
queuestring

Name of the queue to which the messages are written.

Only one messaging queue can be used. The messaging queue specified for the first defined AMQP hook will apply to all following AMQP hook definitions as well. The messaging system needs to support AMQP 1.0.

typestringDefines the processing step during which the AMQP hook will be trigger.
urlstringAMQP server endpoint, e.g. 127.0.0.1:5672
userstringUsername for the AMQP server.
webhooksList of mappings in JSON format.

List of single

webhook

Webhook configurations each of them defined via following parameters. Read by AUTHENTICATION service and API gateway.

If multiple Webhooks are registered for the same Webhook type, the predicate is applied to the original predicate target for each of them and in the order of definition.


enableboolean
Specified
Specifies whether this configuration is active/enabled (true) or inactive/disabled (false).
predicatestring

Condition that specifies when the webhook is used.

supported

Supported scripting languages: SpEL (Spring Expression Language) and

Javascript.

JavaScript.
All properties that are available in the corresponding webhook's JSON request body can be referenced. Additionally, the tenant can always be referenced via options['tenant'].
>> Predicate Evaluation

typestringDefines the processing step during which the webhook will be trigger.
urlstringEndpoint to be called by the webhook if the predicate matches.

Configuration File Management

It is possible to configure multiple system hooks having the same type. They are considered one after the other beginning from the top of the configuration file. If app-specific systemHookConfiguration.json files are specified (possible as of 2022 Summer), they are considered after the global configuration file and in alphabetical order.

The configuration files can be retrieved and updated by administrators with direct access to the git server.

As of 2022 Summer, the systemHookConfiguration.json configuration files can also be retrieved and updated via the yuuvis® Momentum endpoints listed below. The changes are applied immediately after a successful update of the configuration.

Example

The following example configures both an AMQP hook and a webhook.

...

To activate this configuration, both the API-gateway and the Authentication AUTHENTICATION service need to be restarted. 

As of 2022 Summer, it is also possible to apply the configuration via endpoint as described above without the necessity to manually restart affected services.

Code Block
titleExample System Hook Configuration
{
    "systemhooks": {
        "amqp": [
            {
                "bulkSize": 10,
                "enable": true,
                "password": "secret",
                "predicate": "spel:(contentStreams != null && contentStreams.size() > 0 && contentStreams[0]['range'] != null && contentStreams[0]['range'].length() > 0) ? true : false",
                "queue": "lc.textextraction",
                "type": "object.insert.document",
                "url": "10.10.6.242:5672",
                "user": "clouduser"
            }
        ],
        "webhooks": [
            {
                "enable": true,
                "predicate": "spel:true",
                "type": "user.info",
                "url": "http://organization/api/userinfo/${tenant}/${userId}"
            }
        ]
    }
}

...