VRBL-APR-FR-1p0-30

Basic Info

Rule For outbound messages, if the Response Code is 210 or if the Response Code is 212 and the Routing Details Forward Duplicate Indicator is true, the Document Reference Receipt Date must exist within the Document Reference Group.
Context /ubl:ApplicationResponse/cac:DocumentResponse/cac:DocumentReference
Pattern vrbl-ar-fr-1p0
Severity fatal

Used Template: Exists

Parameter Value
probe = cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:DocumentReferenceExtension/vrbl:ReceiptDate

Implementation

(
	not(starts-with(/ubl:ApplicationResponse/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:ApplicationResponseExtension/vrbl:RoutingDetails/vrbl:Receiver, 'GENERIC_PPF')) or not(../cac:Response/cbc:ResponseCode = concat($VRBL-FR-Prefix, '210') or (../cac:Response/cbc:ResponseCode = concat($VRBL-FR-Prefix, '212') and ../../cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:ApplicationResponseExtension/vrbl:RoutingDetails/vrbl:ForwardDuplicateIndicator = 'true'))
)
or
(
	boolean(cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:DocumentReferenceExtension/vrbl:ReceiptDate)
)