Versions Compared

Key

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

...

Section
bordertrue


Column

Table of Contents

Table of Contents
exclude(Table of Contents|Read on|AMQP Hooks|Webhooks|Preprocessing Metadata using Webhooks)


Introduction

System Hooks hooks are functions that apply to core functions of the yuuvis® Momentum API whenever certain conditions are met and that extend or modify those functions. As such, they serve as a modular, external approach for introducing new functionalities as extensions of already existing ones. There are two different types of System Hooks system hooks available: AMQP Hooks hooks as a pure messaging tool , and Webhooks webhooks with multiple possibilitiespossible applications.

System Hooks

The System Hooks hooks catch the call for a function under certain conditions in order to extend or modify the requested process. Thus, it is possible to externalize functional extensions or modularize components of the function call. In order to react to a function call under a certain condition, the latter is defined as a parameter for the corresponding System Hook system hook in its predicate attribute. The set of conditions that need to be met in order for a System Hook system hook to activate are defined in a SpEL (Spring Expression Language) statement that needs to yield a True result in order to trigger the System Hooksystem hook.

Configuring System

...

Hooks

System Hooks hooks are configured in the \service-manager\config\system\systemHookConfiguration.json configuration file within the service manager in JSON format. Any changes to the System Hook system hook configuration will not apply until the affected services have been restarted.

System Hook Types

Two different types of System Hooks system hooks can be used in yuuvis® Momentum , that support two different use cases. Both of them react to function calls under a specified condition defined in SpEL, but their behavior after activation is completely different.

...

AMQP stands for Advanced Message Queuing Protocol 1.0, which is the encoding scheme the that AMQP Hooks hooks are working with. AMQP Hooks hooks are used to generate messages for the AMQP messaging systems whenever any relevant function is performed. They 're are instantiated using the URL and credentials for an existing messaging queue. The process flow itself is proceeding at the same time and can not cannot be modified with an AMQP Hookhook.

Any changes to the AMQP Hook hook configuration require a restart of the API-gateway service. More on AMQP Hooks hooks can be found here.

Webhooks

A Webhook webhook extends the a function by an HTTP call. Whenever the predicate of a Webhook webhook delivers a True result, an optional HTTP call to a web URL defined in the Webhook webhook configuration is performed. The process flow is interrupted until the Webhook webhook activity is finished. Thus, the Webhook webhook can perform additional processing steps before passing the data back to resume the interrupted main process. If the predicate of a Webhook delivers a False result, the HTTP call is skipped.

Any changes to the Webhook webhook configuration require a restart of the services , that are responsable for the call of the affected functions. More on Webhooks webhooks can be found here.

System Hook Configuration Example

The following example configures both an AMQP Hook hook and a Webhookwebhook.

  • The AMQP Hook hook applies to object imports and checks the contentStreams for the presence of a range attribute. Should If the range attribute be is detected, the AMQP Hook hook recognizes the imported content to be a compound document and initiates asynchronous text extraction of all parts of the content parts.
  • This concrete example Webhook activates webhook triggers at every login and retrieves the roles of the user trying to authenticate.

...

This article gave an introduction into the concept of System Hooks system hooks in yuuvis® Momentum. Detailed information on the two different types of System Hooks system ooks available can be found in the specific articles: "AMQP Hooks" and "Webhooks". An example configuration of Webhooks webhooks is shown in the "Preprocessing Metadata using Webhooks" tutorial.

...