Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UNIONVMS-4660] added creationDate rules for movements #549

Open
wants to merge 61 commits into
base: issue/UNIONVMS-4660
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4ee8eef
[UNIONVMS-4595] Edit request for report forwarding.
May 15, 2020
e7387a0
[UNIONVMS-4698] - Send Flux movement report
Jul 8, 2020
dd77093
[UNIONVMS-4709] Modifications for the alert output of Subscriptions
Jul 14, 2020
b74a515
[UNIONVMS-4575] movementType is now populated from MDR-Cache
nomikosi Apr 29, 2020
e506c7f
[UNIONVMS-4575] Test for the RulesMovementProcessorBean.setMovementRe…
Apr 30, 2020
1b6356a
[UNIONVMS-4574] added ext marking to mapper
nomikosi Apr 30, 2020
3aa74a1
[UNIONVMS-4489] static initialization of XSD files for faster processing
nomikosi Apr 13, 2020
6411a9b
[UNIONVMS-4577] Use the slimmed XSDs
Apr 29, 2020
9376dc9
[UNIONVMS-4576] JMS messages are sent with JMSXGroupID option
nomikosi May 13, 2020
aa51a50
[UNIONVMS-4576] Corrected test
Jul 16, 2020
a86d957
[UNIONVMS-4709] Displaying alarms as notifications (Tickets)
Jul 15, 2020
560339b
[UNIONVMS-4689] added value to AD for outgoing subscription messages
nomikosi Sep 16, 2020
11033c4
[UNIONVMS-4313] Taking into account the condition TypeCode = DECLARATION
Oct 2, 2020
2a25545
[UNIONVMS-4764] null checking
Oct 14, 2020
e268f86
[UNIONVMS-4792] removed deprecated rules
nomikosi Sep 21, 2020
3e00e40
[UNIONVMS-4793] added rules for flagged vessels
nomikosi Oct 5, 2020
c7777ae
[UNIONVMS-4794] corrected wording issues
nomikosi Sep 22, 2020
bddc9c5
[UNIONVMS-4795] rules to prevent missing master or agent name informa…
nomikosi Oct 14, 2020
44e2aaf
[UNIONVMS-4796] added rule for transhipments
nomikosi Oct 5, 2020
02a6f5c
[UNIONVMS-4797] owner flux party/id rules
nomikosi Oct 6, 2020
84ab5df
[UNIONVMS-4798] main area rules
nomikosi Oct 9, 2020
cfda3c7
[UNIONVMS-4799] added rules to prevent reporting multiple depths and …
nomikosi Oct 14, 2020
39078f1
[UNIONVMS-4800] rules which check presence of DelimitedPeriod
nomikosi Oct 14, 2020
f10d24b
[UNIONVMS-4801] modifying rules for roleCode in vesseltransportMeans …
Oct 13, 2020
410fcad
[UNIONVMS-4802] Corrections for XPATH
Oct 15, 2020
356dc08
[UNIONVMS-4802] adding rules for relateing fishing activities with ty…
Oct 13, 2020
658d753
[UNIONVMS-4803]-rules for FLAPDocument/ID
Oct 9, 2020
51e20be
[UNIONVMS-4804] rules for IMO calc of last digit in case of UVI id
Oct 6, 2020
d00de27
[UNIONVMS-4805] changes in rules for ApplicableGearCharacteristics AN…
Oct 5, 2020
87efa17
[UNIONVMS-4806] Add Rule Rule FA-L03-00-0650
Oct 7, 2020
b870e0d
[UNIONVMS-4807] Missing rules for FA queries
Oct 1, 2020
ec55ee0
Correction
Oct 15, 2020
9a73beb
Corrections
nomikosi Oct 15, 2020
375fd4b
[Rules-Fixes] minor fix for 4798 updated xpath for ApplicableFLUXChar…
nomikosi Oct 16, 2020
74ecb1c
FIX 4793
Oct 16, 2020
c15de0f
[UNIONVMS-4798] fixed multiple errors for FA-L02-00-0656 to FA-L02-00…
nomikosi Oct 17, 2020
bc6b25a
[UNIONVMS-4798] hasDuplicateLocationType for 659-660-665-666 rules ch…
nomikosi Oct 17, 2020
ab23b30
[UNIONVMS-4798] added fixes for 659/660/665/666 ApplicableFLUXCharact…
nomikosi Oct 18, 2020
8f8cc2e
[UNIONVMS-4798] Corrections for FA-L02-00-0660 and FA-L02-00-0666
Oct 18, 2020
16cdfc4
[UNIONVMS-4798] added fix for template and checks for 660/666
nomikosi Oct 19, 2020
0a45138
[UNIONVMS-4795] fixes for given rules
nomikosi Oct 23, 2020
3f63878
[UNIONVMS-4798] fixes for rule 659
nomikosi Oct 23, 2020
3f3ae59
[UNIONVMS-4798] fixes for rule 660
nomikosi Oct 26, 2020
fbd73a8
[UNIONVMS-4793] fixed EXT_MARK and logic for rules
nomikosi Oct 26, 2020
0184ada
[UNIONVMS-4798] removed subactivity check
nomikosi Oct 29, 2020
882e733
[UNIONVMS-4802]- patching rules to add FISHING_OPERATION and DECLARAT…
Nov 3, 2020
2017700
[UNIONVMS-4636] fixed AppliedAAPProcess for 171,219
nomikosi Nov 3, 2020
0e2c3a7
[UNIONVMS-4799] adding NPE checks in typeCode and typeCode.value
Nov 4, 2020
d0c0555
[UNIONVMS-4792] Reverted the deletion after request from DG Mare; Rul…
Nov 5, 2020
cbd8392
[UNIONVMS-4795] fix for 620 FAReportDocument/SpecifiedVesselTransport…
nomikosi Nov 5, 2020
dd3d03e
[UNIONVMS-4802] patching rules so that when 649 fires 548 and 549 do …
Nov 6, 2020
9187789
[UNIONVMS-4792] Correction of the undeleted rules (FA-L03-00-0061, FA…
Nov 10, 2020
4384be0
[UNIONVMS-incorrect-triggered-rules] fixed existing rules which trigg…
nomikosi Nov 18, 2020
a2a1477
[UNIONVMS-4477] fixed failing conditions
nomikosi Oct 14, 2020
a9638fe
[UNIONVMS-4685] rule FA-L01-00-0146 triggered for invalid MDR element
nomikosi Nov 17, 2020
5c2d143
[UNIONVMS-4501] no XPATH returned for FA-L02-00-0296 -
Nov 19, 2020
e6bd2b4
[UNIONVMS-4921] updated rules to send module version along with ping"
Nov 23, 2020
3aaf882
[UNIONVMS-4843] remove-java-melody
Oct 5, 2020
6ffe624
[UNIONVMS-4660] WIP: activating rules for movement messages
Jun 25, 2020
fcf562e
[UNIONVMS-4660] added creationDate rules for movements
nomikosi Jul 1, 2020
3e24466
PATCHES FOR MOVEMENT RULES
Sep 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions LIQUIBASE/changelog/db-changelog-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,37 @@
<include file="changelog/v3.4/db-changelog-UNIONVMS-4411.xml" />

<include file="changelog/v3.4/db-changelog-UNIONVMS-4203.xml" />

<include file="changelog/v3.4/db-changelog-UNIONVMS-4792.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4793.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4794.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4795.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4796.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4797.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4798.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4799.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4800.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4801.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4802.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4803.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4804.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4806.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4807.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4798-patch_V1.0.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4795-patch_V1.0.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4795-patch_V1.1.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4798-patch_V1.1.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4798-patch_V1.2.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4793-patch_V1.0.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4798-patch_V1.3.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4802-patch_V1.0.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4636.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4799-patch_V1.0.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4792-revert.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4802-patch_V1.1.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4792-correction.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-incorrect-triggered-rules.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4477.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4685.xml" />
<include file="changelog/v3.4/db-changelog-UNIONVMS-4660.xml" />
</databaseChangeLog>
24 changes: 23 additions & 1 deletion LIQUIBASE/changelog/v3.4/db-changelog-UNIONVMS-4313.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,26 @@
</update>
</rollback>
</changeSet>
</databaseChangeLog>

<changeSet id="UNIONVMS-4313-correction" author="nikospara">
<update tableName="context_expression">
<column name = "expression" value="(codeTypeValueEquals(typeCode, &quot;FISHING_OPERATION&quot;) || codeTypeValueEquals(typeCode, &quot;JOINT_FISHING_OPERATION&quot;) || codeTypeValueEquals(typeCode, &quot;AREA_EXIT&quot;)) &amp;&amp; codeTypeValueEquals(faReportDocumentTypeCode, &quot;DECLARATION&quot;) &amp;&amp; (speciesTargetCode != null &amp;&amp; (speciesTargetCode.listId != &quot;FAO_SPECIES&quot;))" />
<where> rule_id=(select rule_id from rules."rule" where br_id='FA-L02-00-0601') </where>
</update>
<update tableName="context_expression">
<column name = "expression" value="codeTypeValueEquals(typeCode, &quot;AREA_ENTRY&quot;) &amp;&amp; codeTypeValueEquals(faReportDocumentTypeCode, &quot;DECLARATION&quot;) &amp;&amp; (speciesTargetCode != null &amp;&amp; (speciesTargetCode.listId != &quot;TARGET_SPECIES_GROUP&quot;))" />
<where> rule_id=(select rule_id from rules."rule" where br_id='FA-L02-00-0600') </where>
</update>

<rollback>
<update tableName="context_expression">
<column name = "expression" value="(codeTypeValueEquals(typeCode, &quot;FISHING_OPERATION&quot;) || codeTypeValueEquals(typeCode, &quot;JOINT_FISHING_OPERATION&quot;) || codeTypeValueEquals(typeCode, &quot;AREA_EXIT&quot;)) &amp;&amp; (speciesTargetCode != null &amp;&amp; (speciesTargetCode.listId != &quot;FAO_SPECIES&quot;))" />
<where> rule_id=(select rule_id from rules."rule" where br_id='FA-L02-00-0601') </where>
</update>
<update tableName="context_expression">
<column name = "expression" value="codeTypeValueEquals(typeCode, &quot;AREA_ENTRY&quot;) &amp;&amp; (speciesTargetCode != null &amp;&amp; (speciesTargetCode.listId != &quot;TARGET_SPECIES_GROUP&quot;))" />
<where> rule_id=(select rule_id from rules."rule" where br_id='FA-L02-00-0600') </where>
</update>
</rollback>
</changeSet>
</databaseChangeLog>
22 changes: 22 additions & 0 deletions LIQUIBASE/changelog/v3.4/db-changelog-UNIONVMS-4477.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">

<changeSet id="FA-L00-00-0395-validator-isnot-empty" author="nomikosi">
<update tableName="context_expression">
<column name="expression"
value="!isEmpty(relatedValidationResultDocuments) &amp;&amp; !isValidatorIdPresent(relatedValidationResultDocuments)"/>
<where>rule_id = '395'</where>
</update>


<rollback>
<update tableName="context_expression">
<column name="expression"
value="!isValidatorIdPresent(relatedValidationResultDocuments)"/>
<where>rule_id = '395'</where>
</update>
</rollback>
</changeSet>


</databaseChangeLog>
43 changes: 43 additions & 0 deletions LIQUIBASE/changelog/v3.4/db-changelog-UNIONVMS-4636.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
<changeSet id="UNIONVMS-4636-AppliedAAPProcess" author="nomikosi">

<update tableName="context_expression">
<column name="expression" value="!isEmpty(appliedAAPProcess) &amp;&amp; (isEmpty(appliedAAPProcessTypeCodes)
|| (listIdNotContains(appliedAAPProcessTypeCodes,&quot;FISH_PRESENTATION&quot;)
|| listIdNotContains(appliedAAPProcessTypeCodes,&quot;FISH_PRESERVATION&quot;))
&amp;&amp; (fishingActivityTypeCode != null &amp;&amp; !valueContainsAny(fishingActivityTypeCode,&quot;LANDING&quot;,&quot;TRANSHIPMENT&quot;))
&amp;&amp; (typeCode != null &amp;&amp; !valueContainsAny(typeCode,&quot;LOADED&quot;,&quot;UNLOADED&quot;)))"/>
<where>id = '171'</where>
</update>

<update tableName="context_expression">
<column name="expression" value="!isEmpty(appliedAAPProcess) &amp;&amp; isEmpty(resultAAPProduct) &amp;&amp; ((codeTypeValueEquals(fishingActivityTypeCode, &quot;LANDING&quot;) || codeTypeValueEquals(fishingActivityTypeCode, &quot;TRANSHIPMENT&quot;))
&amp;&amp; (codeTypeValueEquals(typeCode, &quot;UNLOADED&quot;) || codeTypeValueEquals(typeCode, &quot;LOADED&quot;)) ||
((unitQuantity == null || unitQuantity.value == null) &amp;&amp; (weightMeasure == null || weightMeasure.value == null)))"/>
<where>id = '219'</where>
</update>


<rollback>

<update tableName="context_expression">
<column name="expression" value="!isEmpty(appliedAAPProcess) &amp;&amp; isEmpty(appliedAAPProcessTypeCodes)
|| (listIdNotContains(appliedAAPProcessTypeCodes,&quot;FISH_PRESENTATION&quot;)
|| listIdNotContains(appliedAAPProcessTypeCodes,&quot;FISH_PRESERVATION&quot;))
&amp;&amp; (fishingActivityTypeCode != null &amp;&amp; !valueContainsAny(fishingActivityTypeCode,&quot;LANDING&quot;,&quot;TRANSHIPMENT&quot;))
&amp;&amp; (typeCode != null &amp;&amp; !valueContainsAny(typeCode,&quot;LOADED&quot;,&quot;UNLOADED&quot;))"/>
<where>id = '171'</where>
</update>

<update tableName="context_expression">
<column name="expression" value="isEmpty(resultAAPProduct) &amp;&amp; ((codeTypeValueEquals(fishingActivityTypeCode, &quot;LANDING&quot;) || codeTypeValueEquals(fishingActivityTypeCode, &quot;TRANSHIPMENT&quot;))
&amp;&amp; (codeTypeValueEquals(typeCode, &quot;UNLOADED&quot;) || codeTypeValueEquals(typeCode, &quot;LOADED&quot;)) ||
((unitQuantity == null || unitQuantity.value == null) &amp;&amp; (weightMeasure == null || weightMeasure.value == null)))"/>
<where>id = '219'</where>
</update>

</rollback>

</changeSet>
</databaseChangeLog>
103 changes: 103 additions & 0 deletions LIQUIBASE/changelog/v3.4/db-changelog-UNIONVMS-4660.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
<changeSet id="UNIONVMS-4660-template-for-MovementRules" author="nomikosi">
<insert tableName="template">
<column name="template_id" value="2000" />
<column name="template_name" value="Movement report document" />
<column name="fact_template" value="MOVEMENT_REPORT_DOCUMENT" />
</insert>

<rollback>
<delete tableName="template">
<where>template_id = 2000</where>
</delete>
</rollback>
</changeSet>

<changeSet id="UNIONVMS-4660-update-MO-R01-00-0001" author="nomikosi">
<insert tableName="rule">
<column name="template_id" value="2000" />
<column name="property_names" value="creationDateTime" />
<column name="note" value="Check presence. Must be present." />
<column name="level" value="L00" />
<column name="error_type" value="ERROR" />
<column name="disabled" value="false" />
<column name="br_id" value="MO-R01-00-0001" />
<column name="rule_id" value="20001"/>
</insert>
<insert tableName="context_expression">
<column name="expression" value="creationDateTime == null "/>
<column name="failure_message" value="Message creation date/time missing."/>
<column name="context" value="EU"/>
<column name="rule_id" value="20001"/>
<column name="id" value="20001"/>
</insert>

<rollback>
<delete tableName="context_expression">
<where>rule_id = 20001</where>
</delete>
<delete tableName="rule">
<where>br_id = 'MO-R01-00-0001'</where>
</delete>
</rollback>
</changeSet>

<changeSet id="UNIONVMS-4660-update-MO-R01-00-0002" author="nomikosi">
<insert tableName="rule">
<column name="template_id" value="2000" />
<column name="property_names" value="creationDateTime" />
<column name="note" value="Format must be date in UTC according to ISO8601" />
<column name="level" value="L01" />
<column name="error_type" value="ERROR" />
<column name="disabled" value="false" />
<column name="br_id" value="MO-R01-00-0002" />
<column name="rule_id" value="20002"/>
</insert>
<insert tableName="context_expression">
<column name="expression" value="!isEmpty(creationDateTimeString) &amp;&amp; !isIsoDateStringValidFormat(creationDateTimeString)"/>
<column name="failure_message" value="Invalid message creation date/time."/>
<column name="context" value="EU"/>
<column name="rule_id" value="20002"/>
<column name="id" value="20002"/>
</insert>

<rollback>
<delete tableName="context_expression">
<where>rule_id = 20002</where>
</delete>
<delete tableName="rule">
<where>br_id = 'MO-R01-00-0002'</where>
</delete>
</rollback>
</changeSet>

<changeSet id="UNIONVMS-4660-update-MO-R01-00-0003" author="nomikosi">
<insert tableName="rule">
<column name="template_id" value="2000" />
<column name="property_names" value="creationDateTime" />
<column name="note" value="A threshold to compensate for incorrect clock synchronization of the exchanging systems must be taken into account." />
<column name="level" value="L03" />
<column name="error_type" value="WARNING" />
<column name="disabled" value="false" />
<column name="br_id" value="MO-R01-00-0003" />
<column name="rule_id" value="20003"/>
</insert >
<insert tableName="context_expression">
<column name="expression" value="creationDateTime != null &amp;&amp; dateNotInPast(creationDateTime, 10)"/>
<column name="failure_message" value="Message creation date/time not in the past."/>
<column name="context" value="EU"/>
<column name="rule_id" value="20003"/>
<column name="id" value="20003"/>
</insert >

<rollback>
<delete tableName="context_expression">
<where>rule_id = 20003</where>
</delete>
<delete tableName="rule">
<where>br_id = 'MO-R01-00-0003'</where>
</delete>
</rollback>
</changeSet>
</databaseChangeLog>
18 changes: 18 additions & 0 deletions LIQUIBASE/changelog/v3.4/db-changelog-UNIONVMS-4685.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
<changeSet id="UNIONVMS-4685-triggered-for-invalid-mdr-document" author="nomikosi">

<update tableName="context_expression">
<column name="expression" value="valueCode != null &amp;&amp; !isEmpty(valueCode.listId) &amp;&amp; mdrService.codeListExistsInMdr(valueCode.listId) &amp;&amp; !mdrService.isPresentInMDRList(valueCode.listId, valueCode.value, creationDateOfMessage)"/>
<where>id = '146'</where>
</update>

<rollback>
<update tableName="context_expression">
<column name="expression" value="valueCode != null &amp;&amp; !isEmpty(valueCode.listId) &amp;&amp; !mdrService.isPresentInMDRList(valueCode.listId, valueCode.value, creationDateOfMessage)"/>
<where>id = '146'</where>
</update>
</rollback>

</changeSet>
</databaseChangeLog>
47 changes: 47 additions & 0 deletions LIQUIBASE/changelog/v3.4/db-changelog-UNIONVMS-4792-correction.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
<changeSet id="UNIONVMS-4792-correction" author="nikospara">
<update tableName="context_expression">
<column name="expression"
value="!isEmpty(ids) &amp;&amp; registrationVesselCountryId != null &amp;&amp;
((mdrService.isPresentInMDRList(&quot;MEMBER_STATE&quot;, registrationVesselCountryId.value, creationDateOfMessage) &amp;&amp; !containsAtLeastOneCorrectIdOfTheRequired(&quot;CFR&quot;))
|| (!mdrService.isPresentInMDRList(&quot;MEMBER_STATE&quot;, registrationVesselCountryId.value, creationDateOfMessage)
&amp;&amp; (!containsAtLeastOneCorrectIdOfTheRequired(&quot;IRCS&quot;) || !containsAtLeastOneCorrectIdOfTheRequired(&quot;EXT_MARK&quot;))))"/>
<column name="failure_message" value="Invalid value for country of registration."/>
<where>rule_id=61</where>
</update>

<update tableName="context_expression">
<column name="expression" value="!isEmpty(ids) &amp;&amp; !schemeIdContainsAll(ids, &quot;IRCS&quot;, &quot;EXT_MARK&quot;) &amp;&amp; schemeIdContainsAll(ids, &quot;CFR&quot;) &amp;&amp; (transportMeans == null || transportMeans.asset == null)"/>
<where>rule_id=66</where>
</update>

<update tableName="rule">
<column name="template_id" value="32"/>
<where>rule_id=339</where>
</update>
<update tableName="context_expression">
<column name="expression"
value="!subActivity &amp;&amp; (specifiedFLAPDocuments != null &amp;&amp; specifiedFLAPDocuments.size != 0 ) &amp;&amp; isEmpty(flapDocumentIdTypes) &amp;&amp; !valueContainsAny(faCatchSpeciesCodes, &quot;BFT&quot;)"/>
<where>rule_id=339</where>
</update>

<update tableName="rule">
<column name="template_id" value="32"/>
<where>rule_id=340</where>
</update>
<update tableName="context_expression">
<column name="expression"
value="!subActivity &amp;&amp; !isEmpty(flapDocumentIdTypes) &amp;&amp; !mdrService.isAllSchemeIdsPresentInMDRList(&quot;FLAP_ID_TYPE&quot; , flapDocumentIdTypes, creationDateOfMessage) "/>
<where>rule_id=340</where>
</update>

<rollback>
<!--
The corrections above were necessary because the content of the file that reverts the deletion of rules of UNIONVMS-4792,
changeset db-changelog-UNIONVMS-4792-revert.xml was copied from the <rollback> block of changeset db-changelog-UNIONVMS-4792.xml.
The <rollback> block contained wrong values.
-->
</rollback>
</changeSet>
</databaseChangeLog>
Loading