Why Document Rules Exist
Siemens Polarion ALM organizes work items inside LiveDoc documents, but it does not natively enforce which work item types belong in which documents. AsystemRequirement can be created in any document, and a userNeed can end up in a design specification. In regulated industries following standards like ISO 26262 or Automotive SPICE, this structural freedom can lead to audit findings and traceability gaps.
Document rules in the domain model act as process guardrails. They do not change Polarion’s underlying storage — they control what Powersheet loads, displays, and permits through the sheet interface.
How Document Rules Work
Document rules are expressed asconstraints on entity types within the domain model YAML. Each constraint type — load, create, and pick — can include a document object that filters based on document properties.
Document Properties in Constraints
All constraint types support the same set of document filter properties:| Property | Description | Example |
|---|---|---|
document.moduleFolder | Restricts to a specific Polarion module folder (space) | Requirements |
document.moduleName | Restricts to a specific document by exact name | System Specification |
document.type | Restricts to a specific Polarion document type | systemSpecification |
document.component | Restricts by component; supports $context expressions | $context.source.document.component |
Load Rules
A load constraint with document rules ensures that only work items from matching documents are displayed in the sheet:SystemRequirement items that reside in documents whose type is systemSpecification.
Create Rules
Create constraints determine the default document location when a user creates a new entity through the sheet:DesignRequirement item, Powersheet automatically places it in the Design Specification document within the Design folder.
Pick Rules
Pick constraints scope the item picker to only show items from matching documents:UserNeed through a relationship, the picker dialog will only show user needs from needsDocument-type documents in the Requirements folder.
Dynamic Document Scoping with Context
For projects where document assignments vary by component or context, document rules support$context expressions. The most common pattern scopes the picker to the same component as the source entity:
Relationship to Other Concepts
Document rules work alongside Link Cardinality and Process Constraints to create a complete enforcement model. Cardinality controls how many links are allowed; document rules control where entities can exist and be selected. For hands-on setup, see Creating Your First Data Model.Sources
Sources
KB ArticlesSource Code
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints-base.yamlmodel.yamlprod-powersheet-src/com.nextedy.powersheet.client/src/modules/ConfigProvider/types/PowersheetConfig.d.tsPolarionQueryProcessor.javaprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/permissions.yaml