JPA and Entities: Creating entities and notifications from a JPA model.

Available from Release 5.2.0 of Onesait Platform

Introducción

As shown in the developer's guide, we have incorporated a functionality to the Java client library that allows, from a JPA data model, to create and update entities based on this definition, besides being able to launch notifications to the platform in a very simple way.

In this way it is possible to work in a decoupled way with an external database and at the same time to continue using the platform capabilities, since it needs the existence of the entities in the system to work.

This library is compatible with versions higher than Spring Boot 3.

Spring Boot native annotations

This functionality incorporates the following Spring Boot native annotations:

@OPEntity

At the class level, JPA entity is used to identify the JPA entities to be created and updated on the platform in a transparent manner.

@OPValidateSchema

At the method argument level, it is used to verify that the data of an entity corresponds to the JSON schema existing in the platform. Example of use: before an insertion.

 

@OPNotifierOperation(ontology = "Message", operationType = OperationType.INSERT, async = true)

At the method level, it is used to launch notifications to the platform and to be able to listen from Flow Engine processes, Business Rules, etc.