Versions Compared

Key

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

...

Statusstatus
Page Properties
hiddentrue
id
DONE

colourBlue
Product Version
Report Note
titlereview
Priority2.3
Note
AssigneeAntje

Ressources

Event = Extending Functionalities by using System Hooks (Frage) What is the difference?

presentable
Assignee

Resources & Remarks

This article is intended just to provide context for the contained pages.

  • Antje: concept-related content from tutorial inserted here for further processing
  • Antje: writing started

Modification History

NameDateProduct VersionAction
Antje08 FEB 20212.4New page properties macro.



Excerpt

Define additional actions triggered by specified events, extend the functionality of yuuvis® Momentum API.

...

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 Types

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 Hook.

System Hook Configuration

System 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 configuration will not apply until the affected services have been restarted.

...

system hook.

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

AMQP Hooks

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 -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.

...

Configuring System

...

The following example configures both an AMQP Hook and a Webhook.

  • The AMQP Hook applies to object imports and checks the contentStreams for the presence of a range attribute. Should the range attribute be detected, the AMQP Hook recognizes the imported content to be a compound document and initiates asynchronous text extraction of all the content parts.
  • The example Webhook activates at every login and retrieves the roles of the user trying to authenticate (question) authorize (permissions)?.

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

...

titleExample System Hook Configuration

...

Hooks

System 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 configuration will not apply until the affected services have been restarted.

>> systemHookConfiguration.json

Summary

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 hooks 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.

...