This script is designed to automatically link artifacts from a diagnostic coverage checklist to the correct components and failure modes within FMEDA models, using the full hierarchical path provided in a profile property.
What It Does
Parses full hierarchical paths from the user_full_path profile property of each selected checklist item.
Navigates nested component hierarchies inside each FMEDA model (e.g., FMEDA1::MCU::Die1::CPU).
Determines the last path element:
If it's a component, the artifact is linked to that component.
If it's a failure mode, the script searches for matching failure modes under the specified component and links all valid matches.
Adds all resolved targets (components or failure modes) to the item’s artifacts.
Input Format
The path is stored in the user_full_path profile property (type: string).
Multiple paths can be provided, separated by a space.
Each path must follow this format:
<FMEDA Name>::<Component 1>::<Component 2>::...::<Target>
Examples
| Full Path | Interpretation |
|---|
FMEDA1::MCU::Die::CPU | Links to the CPU component under MCU > Die |
FMEDA1::MCU::Die1::CPU::A Permanent | Links to Failure Mode “A Permanent” under CPU |
FMEDA::Die::CPU::D Transient | Links to all “D Transient” failure modes in CPU |
FMEDA1::CPU::B Transient | Links to all “B Transient” failure modes in top-level CPU |
Key Features
Full hierarchy parsing: Allows arbitrary component nesting.
Multi-path support: Add multiple full paths per checklist item.
Handles duplicate failure mode names: All matching failure modes are linked (useful for variants/goals).
Robust error handling and logging: Skips invalid paths and logs helpful messages in the console.
Requirements
Each selected checklist item must have the profile property: user_full_path.
All FMEDA models should be accessible from the current project.
Component and failure mode names must match exactly, case-insensitive.