Specify at most one business process parameter

Error FX-SCH-A-000024 Factur-X

Element 'ram:BusinessProcessSpecifiedDocumentContextParameter' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The rsm:ExchangedDocumentContext contains more than one ram:BusinessProcessSpecifiedDocumentContextParameter. This element may occur there at most once.

What the rule means

The business process parameter provides the associated process context. This rule limits the declaration to at most one element per document context.

Please specify no more than one business process parameter

ram:BusinessProcessSpecifiedDocumentContextParameter occurs more than once in rsm:ExchangedDocumentContext. You can adjust the context so that this element occurs there no more than once.

What to do
  1. Locate the document’s rsm:ExchangedDocumentContext.
  2. Check its ram:BusinessProcessSpecifiedDocumentContextParameter elements and remove any occurrences beyond the first.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<rsm:ExchangedDocumentContext>
  <ram:BusinessProcessSpecifiedDocumentContextParameter/>
  <ram:BusinessProcessSpecifiedDocumentContextParameter/>
</rsm:ExchangedDocumentContext>
✓ Correct
<rsm:ExchangedDocumentContext>
  <ram:BusinessProcessSpecifiedDocumentContextParameter/>
</rsm:ExchangedDocumentContext>
Technical details

The XPath test counts ram:BusinessProcessSpecifiedDocumentContextParameter elements in the current rsm:ExchangedDocumentContext and passes when there is at most one.

Where the rule applies

The rule applies within the document’s rsm:ExchangedDocumentContext.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext
Test expression (assert/@test)
count(ram:BusinessProcessSpecifiedDocumentContextParameter)<=1