Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 47 Next »

Intervening a running process at a certain position and redirecting the process flow in order to include project-specific processing steps.

Table of Contents

Introduction

The interceptors allow for project-specific extensions of the yuuvis® Momentum standard process flows. The running process flow can be redirected by a condition set on the processed object that has to be specified in the interceptor definition. Whenever the process flow meets the condition, the project-specific process extension is included for the currently processed object at this position of the process flow. Thus, the alternative process can entirely replace the standard one from this position on or resume the standard process at a specified position.

Interceptor Configuration

The condition for the intervention of the process flow is defined in the interceptor configuration file \system\interceptorConfiguration.json.

Parameters

The following parameters are available for the interceptor configuration:

ParameterTypeRequiredDescription
typeStringyesThe type of the interceptor. It defines the position in the process flow where the interceptor can step in.
predicateStringyesThe condition that triggers the redirection of the process flow in order to include the project-specific process extension. The string can provide the condition either in Spring Expression Language (SpEL) or Javascript. Thus, the string always has to start with a prefix spel: for SpEL or js: for Javascript.
urlStringyesHTTP address of the project-specific process extension. Dynamic components (properties of the processed object) can be included in curly brackets.
useDiscoveryBooleannoDecides whether to resolve the url string at the Discovery-Service or not. If not specified, a default value is set.

Interceptor Types

There are different types of interceptors available that interrupt the process flow at different positions.

Interceptor type

Evaluation target of the predicateInterceptor input dataDescription
getContentAPI DMS object in JSON format derived from given objectIdobjectIdManipulation of the binary content of the return statement by a project-specific service
searchStructure of the specific class SearchInterceptorObjectSearch query objectManipulation of the search query parameter and the search result.
updateDmsObjectFirst API DMS object in the list in JSON format that is passed to the corresponding update endpointUpdated metadata and metadata of current versionManipulation of the update properties that will be applied to a DMS object.

Summary

This article gave an overview of the interceptors in yuuvis® Momentum. If you want to extend the functionality of your system, system hooks also might be an interesting topic for you.


Read on

Interceptor Example Tutorial

Learn how to set up a Microservice that can fill the role of an interceptor of any of the available interceptor types. Java code examples of such microservices can also be found here.  Keep on reading

System Hooks

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

Preprocessing Metadata using Webhooks

An example Webhook consumer service set up using Java and Spring Boot.  Keep on reading



  • No labels