Skip to main content

Constraint Types Overview

RTM constraints operate at three levels: entity constraints (which documents can contain a work item type), relationship constraints (which link roles are valid between entities), and validation constraints (which rules must be satisfied for workflow transitions). diagram
Constraints are enforced at create time (entityFactory validation), link time (relationship validation), and publish time (workflow state validation). Violations prevent work item creation or document publishing.

Document Constraints

Document constraints control which Polarion modules (documents) can contain specific work item types and establish organizational structure for the V-Model.
NameTypeDefaultDescription
documentModulePathstring(required)Polarion module path where work items of this type are stored (e.g., Requirements/CustomerRequirements)
documentTypeenum(required)Polarion document type filter (e.g., Document, Specification, TestLog); constrains which document types can contain the entity
scopeDocumentbooleantrueIf true, PowerSheet queries are scoped to the currently open document; if false, queries span all documents of the type
allowMultipleModulesbooleanfalseIf true, entity instances can be distributed across multiple modules; if false, all instances must be in the single documentModulePath
autoCreateTargetstring(empty)Module path where entityFactory auto-creates linked work items (e.g., when user creates a new VerificationTestCase, it targets Testing/DesignVerificationSpecification)

Document Module Path Patterns

TestAuto2 uses organizational patterns for document modules:
Entity TypeTypical Module PathV-Model Phase
CustomerRequirementRequirements/CustomerRequirementsLeft-side (concept)
SystemRequirementRequirements/SystemRequirementsLeft-side (system design)
DesignRequirementRequirements/DesignRequirementsLeft-side (detailed design)
FunctionDesign/FunctionsLeft-side (design)
CharacteristicDesign/CharacteristicsLeft-side (design)
HazardRisks/HAZIDLeft-side (HARA analysis)
FailureModeRisks/SFMEA, Risks/DFMEA, Risks/PFMEALeft-side (FMEA analysis)
VerificationTestCaseTesting/SystemVerification, Testing/DesignVerificationRight-side (V-Model verification)
ValidationTestCaseTesting/ValidationRight-side (V-Model validation)

Entity Factory Configuration

Entity Factory constraints define auto-creation targets for linked work items:
entities:
  VerificationTestCase:
    displayName: Verification Test Case
    documentModulePath: Testing/DesignVerification
    autoCreateTarget: Testing/DesignVerification
    documentType: Specification
When a user creates a link from a DesignRequirement to a new VerificationTestCase in the Design Verification PowerSheet:
  1. Link creation is initiated — user adds a new test case row
  2. Entity Factory validation — system checks if VerificationTestCase can be created in Testing/DesignVerification
  3. Auto-creation — system creates new VerificationTestCase work item in the target module
  4. Link establishment — system creates the verificationTestCases link between requirement and newly created test case
  5. Constraints applied — the new work item inherits context from parent (e.g., component scope, document assignment)
If autoCreateTarget does not match a valid PowerSheet documentFilters path, link creation fails silently. The error logs to Polarion’s backend; users see “Unable to create linked item.” Always verify that autoCreateTarget paths exist in Polarion before deployment.

Relationship Constraints

Relationship constraints define which link roles are valid between specific entity type pairs and enforce cardinality rules.
NameTypeDefaultDescription
linkRolestring(required)Polarion link role identifier (e.g., verifies, verificationTestCases, mitigates)
sourceEntityTypestring(required)Entity type that initiates the link (e.g., SystemRequirement)
targetEntityTypestring(required)Entity type that receives the link (e.g., VerificationTestCase)
cardinalityenumN:NAllowed cardinality: 1:1 (one-to-one), 1:N (one-to-many), N:1 (many-to-one), N:N (many-to-many)
bidirectionalbooleantrueIf true, the link role and its reverse can both be traversed in PowerSheet queries
validateOnCreatebooleantrueIf true, creating this link validates that both source and target entities exist and are valid
allowMultipleTargetsbooleantrueIf false, source entity can only link to one target of this type (enforces 1:N constraint at data level)

Relationship Matrix

TestAuto2’s RTM model defines relationships across the V-Model:
SourceLink RoleTargetCardinalityPurpose
CustomerRequirementrefinesSystemRequirement1:NRequirements refinement (concept to system level)
SystemRequirementrefinesDesignRequirement1:NRequirements refinement (system to design level)
DesignRequirementrefinesCharacteristic1:NDesign requirement allocation to characteristics
SystemRequirementverifiesVerificationTestCase1:NSystem verification traceability
DesignRequirementverifiesVerificationTestCase1:NDesign verification traceability
CustomerRequirementvalidatesValidationTestCase1:NUser need validation traceability
FailureModeassessesFunction1:NFailure mode analysis for functions
FailureModeassessesCharacteristic1:NFailure mode analysis for design characteristics
FailureModemitigatesRiskControl1:NRisk control mitigation linking
HazardcausesSafetyGoal1:NHazard-to-safety-goal derivation
FunctiondecomposesFunctionN:NFunctional decomposition (parent-child functions)

Constraint Validation Rules

When establishing a link between two work items: diagram

Field Validation Constraints

Field-level constraints enforce data types, enumeration values, and required fields for each entity type.
Constraint TypeNameExampleValidation Rule
EnumerationasilASIL A, ASIL B, ASIL C, ASIL D, QMWork item field must match one of allowed enum values from ../enumerations/hara-asil.md
EnumerationseverityS0 (no injury), S1 (light injury), S2 (serious injury), S3 (fatal)HARA severity must match ../enumerations/hara-severity.md
EnumerationexposureE0 (never), E1 (very low), E2 (low), E3 (medium), E4 (high)HARA exposure must match ../enumerations/hara-exposure.md
EnumerationcontrollabilityC0 (fully controllable), C1 (generally controllable), C2 (barely controllable), C3 (not controllable)HARA controllability must match ../enumerations/hara-controllability.md
EnumerationactionPriorityHigh, Medium, LowFMEA action priority must match ../enumerations/action-priority.md
TypedescriptionFree text (up to 2000 chars)String field; no enum validation
TyperationaleFree textString field; optional in most entities
RequiredobjectIdHAZ-001, SG-002, FM-045Every work item must have unique identifier; auto-generated or manually assigned per project convention
RequiredtitleFailure to detect obstacleEvery work item must have non-empty title
CardinalitylinkedWorkItemsLink to one or more upstream requirementsFor compliance, most work items must have at least one incoming link (e.g., FailureMode must link to upstream Characteristic or Function)

Custom Field Constraints (Example: Hazard)

Hazard work items include domain-specific custom fields with validation:
Hazard:
  customFields:
    hazardId:
      type: string
      required: true
      pattern: "^HAZ-\\d{3}$"  # Matches HAZ-001, HAZ-002, etc.
      description: Unique hazard identifier
    
    severity:
      type: enum
      required: true
      values: [S0, S1, S2, S3]
      description: HARA Severity rating per ISO 26262
    
    exposure:
      type: enum
      required: true
      values: [E0, E1, E2, E3, E4]
      description: HARA Exposure rating per ISO 26262
    
    controllability:
      type: enum
      required: true
      values: [C0, C1, C2, C3]
      description: HARA Controllability rating per ISO 26262
    
    asil:
      type: enum
      readOnly: true
      computed: "calculateASIL(severity, exposure, controllability)"
      values: [QM, A, B, C, D]
      description: Auto-calculated ASIL from S-E-C matrix
The asil field is typically read-only and computed from severity, exposure, and controllability using the ISO 26262 ASIL matrix. This enforces consistency: if a user changes severity/exposure/controllability, the ASIL automatically recalculates per the standard.

Workflow State Constraints

Workflow constraints control state transitions and enforce document lifecycle rules required for compliance.
ConstraintStateAllowed Next StatesValidation Rules
Document WorkflowDraftReview, PublishedRequirements must be linked; coverage checks optional
Document WorkflowReviewPublished, ReworkAll work items must have status ≥ “Ready for Review”
Document WorkflowPublishedDraft (history only)Document is immutable until rolled back to Draft
Document WorkflowReworkReviewAuthor must address review comments; re-submit for approval
Work Item WorkflowDraftReady for ReviewAll required fields completed; min 1 incoming link if compliance-tracked
Work Item WorkflowReady for ReviewApprovedAssigned reviewer approves; no open review comments
Work Item WorkflowApprovedClosedItem is frozen; can only be archived

Transition Validation Decision Matrix

When a user attempts a workflow transition, the system validates:
  • All work items exist (count > 0)
  • All mandatory fields populated
  • All enums match allowed values
  • Traceability coverage meets threshold
  • No broken cross-document links
  • All reviewers assigned
  • Document metadata valid
If all checks pass, the document transitions to Review state. If any check fails, transition is blocked with error message:
"Cannot transition document to Review: 12 requirements missing ASIL assignment. 
 Please complete HARA analysis before resubmitting."

Validation Rules by Standard

Different standards enforce different constraint sets:
StandardKey Constraints
ISO 26262ASIL assignment required; S-E-C severity/exposure/controllability enum validation; safety goal traceability mandatory; post-mitigation FMEA coverage required
AIAG-VDA FMEAAction Priority (H/M/L) required for all failure modes; severity/occurrence/detection (1-10) numeric ranges; process FMEA links to control plans
IATF 16949SC/CC classification required for design characteristics; control plan item cardinality (1:1 with characteristics); process step cross-reference
ISO 21448 (SOTIF)Hazard source enum values (functional vs. non-functional); operational phase classification; SOTIF-specific safety goal derivation

Constraint Violation Handling

When a constraint is violated, Polarion returns an error message with context:
Error: Constraint Validation Failed

Entity: FailureMode FM-045
Link Role: assesses
Target: Characteristic CHAR-018

Violation: Cardinality constraint exceeded
Message: FailureMode FM-045 is already linked to 3 Characteristics 
         via 'assesses' role, but cardinality rule allows maximum 1.
         
Suggested Action: Use 'affects' link role for multiple characteristics,
                  or split failure mode into sub-modes.

Handling Strategy

Violation TypeResolution
Missing Required FieldComplete the field; document shows field highlight until populated
Invalid Enum ValueSelect valid value from dropdown; clear field and re-enter if data is corrupted
Cardinality ExceededRemove excess links or split entity into multiple work items with separate analyses
Broken Cross-Document LinkRe-establish link using PowerSheet RTM UI or manual link dialog
Missing TraceabilityAdd upstream or downstream links; use Coverage Report to identify gaps
Workflow Transition BlockedAddress all violations listed in error message; re-submit when all constraints satisfied
While Polarion administrators can disable constraints via project configuration, bypassing validation is not recommended for safety-critical projects. Disabled constraints increase risk of incomplete analyses and compliance violations. Always resolve constraints before publishing safety documents.

See Also