The Three-Layer Architecture
RISKSHEET operates as a specialized view layer on top of Polarion’s work item management system. Think of it as a rendering engine that transforms standard Polarion data structures into an interactive spreadsheet interface optimized for risk analysis.Layer 1: Data Storage (Polarion Work Items)
At the foundation, RISKSHEET stores all risk data as standard Polarion work items within a LiveDoc document. This layer ensures:- Persistence: All data survives RISKSHEET updates or even complete uninstallation
- API access: External tools can query risk data via Polarion’s REST or SOAP APIs
- Traceability: Standard Polarion link roles connect risks to requirements, tests, and mitigations
- Version control: Polarion’s baseline and branching features provide audit trails
- Work item type:
risk(with custom fields: failureMode, cause, severity, occurrence, detection) - Work item type:
task(standard Polarion task with assignee, status, dueDate) - Link role:
mitigates(connects tasks to risks)
Layer 2: Configuration (risksheet.json)
Therisksheet.json file acts as a blueprint that transforms raw Polarion data into a structured risk analysis interface. This configuration file defines:
| Configuration Section | Purpose | Key Properties |
|---|---|---|
| Columns | Which work item fields appear as spreadsheet columns | id, header, bindings, width, level |
| Levels | How rows merge to create hierarchical groupings | name, controlColumn, zoomColumn |
| Data Types | Which Polarion types represent risks vs. mitigation tasks | type, role, name |
| Formulas | JavaScript functions calculating derived values | Named functions referencing info.item['field'] |
| Cell Decorators | Conditional styling based on cell values | CSS class toggling functions |
| Styles | Visual customization rules | CSS rule definitions |
| Reviews | Review workflow configuration | reviewManager, typeProperties |
Layer 3: Presentation (Browser UI)
The client-side application renders the configured structure as an interactive spreadsheet:- Grid rendering: Displays work items as rows with merged cells for hierarchical levels
- Formula engine: Evaluates JavaScript formulas in real-time as users edit cells
- Event handlers: Capture user actions (cell edits, row additions, saves) and translate them to Polarion API calls
- Styling engine: Applies conditional formatting based on cell values and decorators
Document-to-Risksheet Relationship
Understanding the 1:1 document-to-RISKSHEET relationship is critical for architecture design:Why 1:1 Architecture?
This design choice provides several benefits:- Clear ownership: Each document represents a single risk analysis scope (product, component, release)
- Predictable behavior: All work items in the document appear in RISKSHEET (subject to query filters)
- Simplified permissions: Polarion document permissions automatically control RISKSHEET access
- Configuration isolation: Each document can have unique column layouts without affecting others
Configuration Hierarchy and Template Inheritance
RISKSHEET’s configuration system supports a template-to-instance hierarchy that balances standardization with flexibility:Configuration Search Order
When RISKSHEET loads, it searches forrisksheet.json in this order:
- Attached to current document: Check if the LiveDoc being viewed has
risksheet.jsonattached - Attached to template document: Check if the document’s
templateDoccustom field points to another document withrisksheet.json - Built-in default: Fall back to RISKSHEET’s built-in configuration if no custom config exists
- Team standardization: All projects start with approved organizational templates
- Project flexibility: Individual documents can override configurations for unique needs
- Centralized updates: Template changes propagate to all documents automatically (unless overridden)
Link Traversal and Traceability Architecture
RISKSHEET displays two categories of work items in the grid:- Primary items (Levels 1-N): Work items contained in the document (typically risk items)
- Downstream items (Level N+1): Work items linked to primary items (typically mitigation tasks)
Downstream Item Resolution
ThedataTypes.task configuration controls how RISKSHEET finds linked items by specifying the Polarion work item type, link role name, display name, and zoom column. See Configure Downstream Tasks for configuration details.
When rendering the grid, RISKSHEET:
- Loads all work items from the document (primary items)
- For each primary item, queries Polarion for linked items matching
typeandrole - Filters results to ensure only items of the specified type appear
- Sorts results by work item ID for consistent display
The
project parameter in typeProperties only works for direct links. RISKSHEET cannot traverse transitive/multi-hop links across projects.Supported: Risk in Project A → Task in Project B (direct link)Not supported: Risk in Project A → Harm in Project A → Requirement in Project B (transitive link)For complex cross-project traceability, use separate RISKSHEETs per project or consolidate linked items into the primary project.Session and State Management
RISKSHEET operates as a stateful client application:Server-Side State
- Data storage: Polarion database stores all work items and links
- Configuration:
risksheet.jsonfile attached to Polarion documents - Permissions: Polarion project and document permissions control access
Client-Side State
- Grid data: Loaded into browser memory on page load
- User edits: Tracked in client-side change buffer until save
- Formula results: Calculated in browser, not stored in Polarion
- Session: Lost on page refresh unless saved
Save Operation
When users click Save:- Client collects all modified work items from change buffer
- Sends batch update request to Polarion API
- Polarion validates permissions and field constraints
- Polarion persists changes to database
- If
global.refreshOnSave: true, RISKSHEET reloads data to reflect server state
Revision and Baseline Support
RISKSHEET integrates with Polarion’s version control architecture:Current/Head View
By default, RISKSHEET displays the latest version of all work items. Users can edit, add, and delete items freely (subject to permissions).Historical/Revision View
Users can view specific document revisions or baselines via URL parameters:- RISKSHEET loads work item data from the specified revision
- All editing controls are disabled (read-only mode)
- Downstream items display their state at the time of the revision
- Formulas calculate based on historical field values
Topic Visibility and Access Control
RISKSHEET appears in Polarion as a topic in the sidebar navigation. Topic visibility is controlled by Polarion’s view configuration under Administration > Portal > Topics by adding a<topic id="risksheet"/> entry.
Multi-View Environments
In organizations using Polarion’s role-based views (e.g., separate views for engineers vs. managers), administrators must ensure the RISKSHEET topic entry exists in all active view configurations. If the topic entry is missing from a view, users assigned to that view cannot access RISKSHEET — even if they have proper document permissions. See Troubleshooting Access Denied Errors.Performance and Scalability Considerations
RISKSHEET’s architecture is optimized for documents containing hundreds of work items:Client-Side Rendering
- Grid virtualization renders only visible rows, enabling smooth scrolling with 500+ items
- Formula evaluation is lazy—only visible cells are calculated initially
- Cell reuse minimizes DOM manipulation during scroll operations
Server-Side Optimizations
- Batch API calls load all document work items in a single request
- Downstream item queries execute in parallel for all primary items
- Caching reduces repeated field mapping lookups
Known Limitations
- Documents with >1000 work items may experience slower initial load times
- Complex formulas with many field references can slow editing responsiveness
- Large baseline comparisons may timeout if document history is extensive
Next Steps
- Understand data mapping: Read Data Model and Work Items to learn how Polarion fields map to RISKSHEET columns
- Learn configuration: Explore Configuration System to understand the
risksheet.jsonstructure - Set up traceability: Review Traceability and Linking to configure risk-to-mitigation relationships
- Configure levels: See Work Item Visibility and Levels to control hierarchical grouping
- Create your first RISKSHEET: Follow Create Your First Risksheet to apply these concepts