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
<!-- 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
Name | Description | Repository |
---|---|---|
Asset | Gets information needed for rules validation. | Asset |
Audit | Log all operations which have been executed in all UVMS-modules | Audit |
Config | Used by all modules in the system. As of now there are no specific configurations the Rules Module uses. | Config |
Exchange | Gateway 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 Terminal | Gets information needed for rules validation. | Mobile Terminal |
Movement | The 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 |
User | Mainly used to get correct email addresses and organization information. | User |
JMS Queue Dependencies
Name | JNDI name example | Description |
---|---|---|
UVMSRulesEvent | java:/jms/queue/UVMSRulesEvent | Request queue to Rules service module |
UVMSRules | java:/jms/queue/UVMSRules | Response queue to Rules module |
UVMSMobileTerminalEvent | java:/jms/queue/UVMSMobileTerminalEvent | Request queue to MobileTerminal service module |
UVMSAssetEvent | java:/jms/queue/UVMSAssetEvent | Request queue to Asset service module |
UVMSAuditEvent | java:/jms/queue/UVMSAuditEvent | Request queue to Audit service module |
UVMSUserEvent | java:/jms/queue/UVMSUserEvent | Request queue to User service module |
UVMSExchangeEvent | java:/jms/queue/UVMSExchangeEvent | Request queue to Exchange service module |
UVMSMovementEvent | java:/jms/queue/UVMSMovementEvent | Request queue to Movement service module |
UVMSSalesEvent | java:/jms/queue/UVMSSalesEvent | Request queue for Sales module |
Datasources
Name | JNDI name |
---|---|
uvms_rules | java:jboss/datasources/uvms_rules |
Jenkins build
- https://jenkins.focus.fish/job/UVMS-Rules-APP/
- https://jenkins.focus.fish/job/UVMS-Rules-DB/
- https://jenkins.focus.fish/job/UVMS-Rules-MODEL/
Liquibase scripts
https://github.com/UnionVMS/UVMS-RulesModule-DB/tree/master/LIQUIBASE
Related Repositories
- https://github.com/UnionVMS/UVMS-RulesModule-APP
- https://github.com/UnionVMS/UVMS-RulesModule-DB
- https://github.com/UnionVMS/UVMS-RulesModule-MODEL
Model:
Domain:
Service:
Message:
Rest: