Rules

https://github.com/UnionVMS/UVMS-RulesModule-APP


Module description/purpose

This module is responsible for the validation of received message. The message received is being validated against a set of business rules prior to being passed to the Activity module or sent back to the Exchange module. In the event of success it is passed to the Activity module, otherwise a response is created(FluxResponseMessage) and sent back to the Exchange module. The module also communicates with the MDR in order to retrieve various code lists.

Workflow

The first step is to check whether there are duplicate IDs in the message. If there are then a FluxResponseMessage is sent back to the Exchange module. Otherwise incoming message is being validated against the rules before being passed to the Activity module. It verifies that the data is complete enough for processing. If validation brakes the message is put aside in the validationmessage table. Regardles of the validation outcome FluxResponseMessage is sent to the Exchange module.

Nexus artifacts and dependencies


Maven
<!-- Integration dependency -->
<dependency>
  <groupId>eu.europa.ec.fisheries.uvms.rules</groupId>
  <artifactId>rules-model</artifactId>
  <version>LATEST</version>
  <classifier>date</classifier>
</dependency>


Github App: https://github.com/UnionVMS/UVMS-RulesModule-APP
QA Summary App: https://sonarcloud.io/dashboard?id=eu.europa.ec.fisheries.uvms.rules%3Arules
CI location App: https://jenkins.focus.fish/view/UVMS%20App/job/UVMS-Rules-APP/
Project Site reports App: https://jenkins.focus.fish/view/Site-Reports/job/UVMS-Rules-APP-Site-reports/site/

Module dependencies

NameDescriptionRepository
AssetGets information needed for rules validation.Asset
AuditLog all operations which have been executed in all UVMS-modulesAudit
ConfigUsed by all modules in the system. As of now there are no specific configurations the Rules Module uses.Config
ExchangeGateway provides communication ability with other modules or artifacts beside UVMS. This is the main entry and exit point of the system and also for the Rules Module.Exchange
Mobile TerminalGets information needed for rules validation.Mobile Terminal
MovementThe Rules module provides verified messages to the Movement module, and also receives processed positions from it in order to run user defined rules which generates notifications.Movement
UserMainly used to get correct email addresses and organization information.User

JMS Queue Dependencies

NameJNDI name exampleDescription
UVMSRulesEventjava:/jms/queue/UVMSRulesEventRequest queue to Rules service module
UVMSRulesjava:/jms/queue/UVMSRulesResponse queue to Rules module
UVMSMobileTerminalEventjava:/jms/queue/UVMSMobileTerminalEventRequest queue to MobileTerminal service module
UVMSAssetEventjava:/jms/queue/UVMSAssetEventRequest queue to Asset service module
UVMSAuditEventjava:/jms/queue/UVMSAuditEventRequest queue to Audit service module
UVMSUserEventjava:/jms/queue/UVMSUserEventRequest queue to User service module
UVMSExchangeEventjava:/jms/queue/UVMSExchangeEventRequest queue to Exchange service module
UVMSMovementEventjava:/jms/queue/UVMSMovementEventRequest queue to Movement service module

UVMSSalesEvent

java:/jms/queue/UVMSSalesEventRequest queue for Sales module

Datasources

NameJNDI name
uvms_rulesjava:jboss/datasources/uvms_rules


Jenkins build

Liquibase scripts

https://github.com/UnionVMS/UVMS-RulesModule-DB/tree/master/LIQUIBASE

Related Repositories


Model:

Domain:

Service:

Message:

Rest: