Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

Additional async validation rules need to be applied to new price flow (D08) #1588

Closed
2 tasks done
prtandrup opened this issue Aug 29, 2022 · 3 comments
Closed
2 tasks done
Assignees

Comments

@prtandrup
Copy link
Contributor

prtandrup commented Aug 29, 2022

Additional asynchronous validation rules have been identified as missing in the new price flow (for Charge Prices D08 processing)

The following rules must be applied in the new price flow:

  • ResolutionValidationRule (to apply for subscription, fee and tariff price series) (VR 505-x )
  • StartDateValidationRule (applied on effectiveDate of price series) (VR 209)
  • PreviousOperationsMustBeValidRule (already applied, but the namespace seems to be charge information relevant only)
  • ResolutionIsRequired (VR912)

Acceptance criteria

  • 1 - Above mentioned asynchronous validation rules have been applied to D08 Charge Prices requests.
  • 2 - The asynchronous validation rules md file has been updated to match this.
@ShaBloze ShaBloze self-assigned this Sep 7, 2022
@PerLysemose PerLysemose added the Blocked Issues is blocked label Sep 14, 2022
@prtandrup prtandrup added Blocked Issues is blocked and removed Blocked Issues is blocked labels Sep 14, 2022
@prtandrup
Copy link
Contributor Author

Blocked due to MessageHub issue in T-001

@prtandrup prtandrup removed the Blocked Issues is blocked label Sep 15, 2022
@prtandrup prtandrup assigned prtandrup and unassigned prtandrup Sep 15, 2022
@x-platformcoder
Copy link
Contributor

x-platformcoder commented Sep 15, 2022

Tested in T-001

Ingestion

<?xml version="1.0" encoding="UTF-8"?>
<cim:RequestChangeOfPriceList_MarketDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cim="urn:ediel.org:structure:requestchangeofpricelist:0:1" xsi:schemaLocation="urn:ediel.org:structure:requestchangeofpricelist:0:1 urn-ediel-org-structure-requestchangeofpricelist-0-1.xsd">
    <cim:mRID>DocId{{$isoTimestamp}}</cim:mRID>
    <cim:type>D10</cim:type>
    <cim:process.processType>D08</cim:process.processType>
    <cim:businessSector.type>23</cim:businessSector.type>
    <cim:sender_MarketParticipant.mRID codingScheme="A10">{{MarketParticipantGln}}</cim:sender_MarketParticipant.mRID>
    <cim:sender_MarketParticipant.marketRole.type>{{MarketParticipantRole}}</cim:sender_MarketParticipant.marketRole.type>
    <cim:receiver_MarketParticipant.mRID codingScheme="A10">5790001330552</cim:receiver_MarketParticipant.mRID>
    <cim:receiver_MarketParticipant.marketRole.type>DDZ</cim:receiver_MarketParticipant.marketRole.type>
    <cim:createdDateTime>{{ISO8601Timestamp}}</cim:createdDateTime>
    <cim:MktActivityRecord>
        <cim:mRID>OpId{{$isoTimestamp}}</cim:mRID>
        <cim:ChargeGroup>
            <cim:ChargeType>
                <cim:chargeTypeOwner_MarketParticipant.mRID codingScheme="A10">{{MarketParticipantGln}}</cim:chargeTypeOwner_MarketParticipant.mRID>
                <cim:type>D03</cim:type>
                <!-- change type D01 (subsctiption), D02 (fee), D03 (tariff) -->
                <cim:mRID>TarIdP1D</cim:mRID>
                <cim:priceTimeFrame_Period.resolution>P1D</cim:priceTimeFrame_Period.resolution>
                <cim:effectiveDate>2022-08-01T22:00:00Z</cim:effectiveDate>
                <cim:Series_Period>
                    <cim:resolution>P1M</cim:resolution>
                    <!-- change resolution P1D, P1M -->
                    <cim:timeInterval>
                        <cim:start>2022-08-01T22:00Z</cim:start>
                        <cim:end>2022-08-02T22:00Z</cim:end>
                    </cim:timeInterval>
                    <cim:Point>
                        <cim:position>1</cim:position>
                        <cim:price.amount>25.001</cim:price.amount>
                    </cim:Point>
                </cim:Series_Period>
            </cim:ChargeType>
        </cim:ChargeGroup>
    </cim:MktActivityRecord>
</cim:RequestChangeOfPriceList_MarketDocument>

Result
Resolution: Changed Resolution to P1D, P1M depending on type ✅

<?xml version="1.0" encoding="utf-8"?>
<cim:RejectRequestChangeOfPriceList_MarketDocument xmlns:cim="urn:ediel.org:structure:rejectrequestchangeofpricelist:0:1">
    <cim:mRID>d122e36edddf46c69ab9f2cefce33b3e</cim:mRID>
    <cim:type>D11</cim:type>
    <cim:process.processType>D08</cim:process.processType>
    <cim:businessSector.type>23</cim:businessSector.type>
    <cim:sender_MarketParticipant.mRID codingScheme="A10">5790001330552</cim:sender_MarketParticipant.mRID>
    <cim:sender_MarketParticipant.marketRole.type>DDZ</cim:sender_MarketParticipant.marketRole.type>
    <cim:receiver_MarketParticipant.mRID codingScheme="A10">8100000000016</cim:receiver_MarketParticipant.mRID>
    <cim:receiver_MarketParticipant.marketRole.type>DDM</cim:receiver_MarketParticipant.marketRole.type>
    <cim:createdDateTime>2022-09-15T10:31:01Z</cim:createdDateTime>
    <cim:reason.code>A02</cim:reason.code>
    <cim:MktActivityRecord>
        <cim:mRID>9921a1ed2d7b487d9f7c2b4625862087</cim:mRID>
        <cim:originalTransactionIDReference_MktActivityRecord.mRID>OpId2022-09-15T10:30:58.438Z</cim:originalTransactionIDReference_MktActivityRecord.mRID>
        <cim:Reason>
            <cim:code>D23</cim:code>
            <cim:text>Period type P1M not allowed: The resolution must be day or hour for charge ID TarIdP1D owned by 8100000000016 as it is of type Tariff.</cim:text>
        </cim:Reason>
    </cim:MktActivityRecord>
</cim:RejectRequestChangeOfPriceList_MarketDocument>

StartDate: Change effectiveDate to 2020-08-01 ✅

<?xml version="1.0" encoding="utf-8"?>
<cim:RejectRequestChangeOfPriceList_MarketDocument xmlns:cim="urn:ediel.org:structure:rejectrequestchangeofpricelist:0:1">
    <cim:mRID>281771e19c9345cda2c9dd52e03ffdcf</cim:mRID>
    <cim:type>D11</cim:type>
    <cim:process.processType>D08</cim:process.processType>
    <cim:businessSector.type>23</cim:businessSector.type>
    <cim:sender_MarketParticipant.mRID codingScheme="A10">5790001330552</cim:sender_MarketParticipant.mRID>
    <cim:sender_MarketParticipant.marketRole.type>DDZ</cim:sender_MarketParticipant.marketRole.type>
    <cim:receiver_MarketParticipant.mRID codingScheme="A10">8100000000016</cim:receiver_MarketParticipant.mRID>
    <cim:receiver_MarketParticipant.marketRole.type>DDM</cim:receiver_MarketParticipant.marketRole.type>
    <cim:createdDateTime>2022-09-15T13:16:35Z</cim:createdDateTime>
    <cim:reason.code>A02</cim:reason.code>
    <cim:MktActivityRecord>
        <cim:mRID>adbe337948b940a2be6853fb0e24a099</cim:mRID>
        <cim:originalTransactionIDReference_MktActivityRecord.mRID>OpId2022-09-15T13:16:18.119Z</cim:originalTransactionIDReference_MktActivityRecord.mRID>
        <cim:Reason>
            <cim:code>E17</cim:code>
            <cim:text>Effective date 2019-08-01T22:00:00Z incorrect: The information is not received within the correct time period (either too soon or too late).</cim:text>
        </cim:Reason>
    </cim:MktActivityRecord>
</cim:RejectRequestChangeOfPriceList_MarketDocument>

Ingestion

<?xml version="1.0" encoding="UTF-8"?>
<cim:RequestChangeOfPriceList_MarketDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cim="urn:ediel.org:structure:requestchangeofpricelist:0:1" xsi:schemaLocation="urn:ediel.org:structure:requestchangeofpricelist:0:1 urn-ediel-org-structure-requestchangeofpricelist-0-1.xsd">
    <cim:mRID>DocId{{$isoTimestamp}}</cim:mRID>
    <cim:type>D10</cim:type>
    <cim:process.processType>D08</cim:process.processType>
    <cim:businessSector.type>23</cim:businessSector.type>
    <cim:sender_MarketParticipant.mRID codingScheme="A10">{{MarketParticipantGln}}</cim:sender_MarketParticipant.mRID>
    <cim:sender_MarketParticipant.marketRole.type>{{MarketParticipantRole}}</cim:sender_MarketParticipant.marketRole.type>
    <cim:receiver_MarketParticipant.mRID codingScheme="A10">5790001330552</cim:receiver_MarketParticipant.mRID>
    <cim:receiver_MarketParticipant.marketRole.type>DDZ</cim:receiver_MarketParticipant.marketRole.type>
    <cim:createdDateTime>{{ISO8601Timestamp}}</cim:createdDateTime>
    <cim:MktActivityRecord>
        <cim:mRID>OpId1_{{$isoTimestamp}}</cim:mRID>
        <cim:ChargeGroup>
            <cim:ChargeType>
                <cim:chargeTypeOwner_MarketParticipant.mRID codingScheme="A10">{{MarketParticipantGln}}</cim:chargeTypeOwner_MarketParticipant.mRID>
                <cim:type>D01</cim:type>
                <cim:mRID>SubId021</cim:mRID>
                <cim:effectiveDate>2022-10-31T23:00:00Z</cim:effectiveDate>
                <cim:Series_Period>
                    <cim:resolution>P1M</cim:resolution>
                    <cim:timeInterval>
                        <cim:start>2022-10-31T23:00Z</cim:start>
                        <cim:end>2022-11-30T23:00Z</cim:end>
                    </cim:timeInterval>
                    <cim:Point>
                        <cim:position>1</cim:position>
                        <cim:price.amount>111.111</cim:price.amount>
                    </cim:Point>
                </cim:Series_Period>
            </cim:ChargeType>
        </cim:ChargeGroup>
    </cim:MktActivityRecord>
    <cim:MktActivityRecord>
        <cim:mRID>OpId2_{{$isoTimestamp}}</cim:mRID>
        <cim:ChargeGroup>
            <cim:ChargeType>
                <cim:chargeTypeOwner_MarketParticipant.mRID codingScheme="A10">{{MarketParticipantGln}}</cim:chargeTypeOwner_MarketParticipant.mRID>
                <cim:type>D01</cim:type>
                <cim:mRID>SubId021</cim:mRID>
                <cim:effectiveDate>2019-11-30T23:00:00Z</cim:effectiveDate>
                <cim:Series_Period>
                    <cim:resolution>P1M</cim:resolution>
                    <cim:timeInterval>
                        <cim:start>2022-11-30T23:00Z</cim:start>
                        <cim:end>2022-12-31T23:00Z</cim:end>
                    </cim:timeInterval>
                    <cim:Point>
                        <cim:position>1</cim:position>
                        <cim:price.amount>222.222</cim:price.amount>
                    </cim:Point>
                </cim:Series_Period>
            </cim:ChargeType>
        </cim:ChargeGroup>
    </cim:MktActivityRecord>
    <cim:MktActivityRecord>
        <cim:mRID>OpId3_{{$isoTimestamp}}</cim:mRID>
        <cim:ChargeGroup>
            <cim:ChargeType>
                <cim:chargeTypeOwner_MarketParticipant.mRID codingScheme="A10">{{MarketParticipantGln}}</cim:chargeTypeOwner_MarketParticipant.mRID>
                <cim:type>D01</cim:type>
                <cim:mRID>SubId021</cim:mRID>
                <cim:effectiveDate>2022-12-31T23:00:00Z</cim:effectiveDate>
                <cim:Series_Period>
                    <cim:resolution>P1M</cim:resolution>
                    <cim:timeInterval>
                        <cim:start>2022-12-31T23:00Z</cim:start>
                        <cim:end>2023-01-31T23:00Z</cim:end>
                    </cim:timeInterval>
                    <cim:Point>
                        <cim:position>1</cim:position>
                        <cim:price.amount>333.333</cim:price.amount>
                    </cim:Point>
                </cim:Series_Period>
            </cim:ChargeType>
        </cim:ChargeGroup>
    </cim:MktActivityRecord>
</cim:RequestChangeOfPriceList_MarketDocument>

Result
PreviousOperations: Make 2 operation fail, setting the effective date more than 720 days back ✅

<?xml version="1.0" encoding="utf-8"?>
<cim:RejectRequestChangeOfPriceList_MarketDocument xmlns:cim="urn:ediel.org:structure:rejectrequestchangeofpricelist:0:1">
    <cim:mRID>f75731c68f374135ba07027a9613337d</cim:mRID>
    <cim:type>D11</cim:type>
    <cim:process.processType>D08</cim:process.processType>
    <cim:businessSector.type>23</cim:businessSector.type>
    <cim:sender_MarketParticipant.mRID codingScheme="A10">5790001330552</cim:sender_MarketParticipant.mRID>
    <cim:sender_MarketParticipant.marketRole.type>DDZ</cim:sender_MarketParticipant.marketRole.type>
    <cim:receiver_MarketParticipant.mRID codingScheme="A10">8100000000016</cim:receiver_MarketParticipant.mRID>
    <cim:receiver_MarketParticipant.marketRole.type>DDM</cim:receiver_MarketParticipant.marketRole.type>
    <cim:createdDateTime>2022-09-15T11:00:30Z</cim:createdDateTime>
    <cim:reason.code>A02</cim:reason.code>
    <cim:MktActivityRecord>
        <cim:mRID>f9820904ba3344e6b1e537e4a633043c</cim:mRID>
        <cim:originalTransactionIDReference_MktActivityRecord.mRID>OpId2_2022-09-15T11:00:15.870Z</cim:originalTransactionIDReference_MktActivityRecord.mRID>
        <cim:Reason>
            <cim:code>E17</cim:code>
            <cim:text>Effective date unknown incorrect: The information is not received within the correct time period (either too soon or too late).</cim:text>
        </cim:Reason>
    </cim:MktActivityRecord>
    <cim:MktActivityRecord>
        <cim:mRID>dabb3aad92b24215af21b56ba7c557af</cim:mRID>
        <cim:originalTransactionIDReference_MktActivityRecord.mRID>OpId3_2022-09-15T11:00:15.870Z</cim:originalTransactionIDReference_MktActivityRecord.mRID>
        <cim:Reason>
            <cim:code>D14</cim:code>
            <cim:text>Transaction for Charge ID SubId021 of type Subscription owned by 8100000000016 is not completed: The request received contained multiple transactions for the same charge, and one of the previous transactions with ID OpId2_2022-09-15T11:00:15.870Z failed validation why this transaction with ID OpId3_2022-09-15T11:00:15.870Z is also rejected.</cim:text>
        </cim:Reason>
    </cim:MktActivityRecord>
</cim:RejectRequestChangeOfPriceList_MarketDocument>

ResolutionRequired: removed tags, tried to change codes ❓
Not testable -> gets error 500 or error 400 depending on value

@PerTHenriksen
Copy link

AC 4 - implementation of (VR912) is completed. but untestable due to an unexpected error 500. This is noted as a bug in #1070.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants