This article provides an example of a Fault Tree Graph using the configurable Graphs view. Alternatively, there is a FaultTreeGraph extension view available.


Example Data 


Example Configuration 

<Graph>
  <Options>
    <ObjIcons/>
    <Legend/>
  </Options>
  <Layout name="incrementalHierarchical">
    <Setting name="layoutOrientation" value="topToBottom"/>
    <Setting name="nodeToNodeDistance" value="50"/>
    <Setting name="busRouting" value="True"/>
  </Layout>
  <NodeStyles>
    <NodeStyle name="AND" fillColor="#eeeeee" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" legendLabel="And Gate">
      <Shape>
        <AndGate/>
      </Shape>
    </NodeStyle>
    <NodeStyle name="OR" fillColor="#eeeeee" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" legendLabel="Or Gate">
      <Shape>
        <OrGate/>
      </Shape>
    </NodeStyle>
    <NodeStyle name="BasicEvent" fillColor="#ffffff" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" legendLabel="Attack Event">
      <Shape>
        <Ellipse/>
      </Shape>
    </NodeStyle>
    <NodeStyle name="ExternalEvent" fillColor="#ffffff" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" legendLabel="External Event">
      <Shape>
        <RectangularPentagon/>
      </Shape>
    </NodeStyle>
    <NodeStyle name="IntermediateNode" fillColor="#eeeeee" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" legendLabel="Gate Description"/>
    <NodeStyle name="input" fillColor="#E5AEA3" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" legendLabel="Incoming Requirement"/>
    <NodeStyle name="component" fillColor="#F5DEB3" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" legendLabel="System component"/>
    <NodeStyle name="Threat" fillColor="#ffcccc" fillColor2="#ffffff" borderThickness="2" borderColor="#000000" legendLabel="Threat"/>
  </NodeStyles>
  <EdgeStyles>
    <EdgeStyle name="mitigatedBy" color="#0000FF" thickness="2" lineType="dash" fromArrowType="none" toArrowType="none" legendLabel="Mitigated by"/>
    <EdgeStyle name="FaultScope" color="#FF0000" thickness="2" lineType="dash" fromArrowType="none" toArrowType="none" legendLabel="Fault scope"/>
  </EdgeStyles>
  <Context name="FTAContext">
    <AddParts owner="main" sid="SP0574" part="MainToFaultEvent" defobj="+FaultEvent"/>
    <AddParts owner="main" sid="SP0538" part="MainToFaultEvent" defobj="+FaultEvent"/>
    <AddParts owner="main" sid="SP0555" part="Requirement" defobj="+Requirement"/>
    <AddParts owner="FaultEvent" sid="SP0538" part="FaultEventToFaultEvent" defobj="+FaultEvent"/>
    <AddParts owner="FaultEvent" sid="SP0555" part="Requirement" defobj="+Requirement"/>
    <AddParts owner="main" sid="SP0597" part="FaultScope" defobj="+Component"/>
    <AddParts owner="FaultEvent" sid="SP0597" part="FaultScope" defobj="+Component"/>
  </Context>
  <ForEachInContext name="FTAContext" group="main">
    <If test="SID != 'SI0421'">
      <ApplyTemplate name="generateFaultTree"/>
    </If>
  </ForEachInContext>
  <ForEachInContext name="FTAContext" group="FaultEvent">
    <ApplyTemplate name="generateFaultTree"/>
  </ForEachInContext>

  <Template name="generateFaultTree">
    <Choose>
      <When test="SID in ['SI0395', 'SI0394']">
        <ApplyTemplate name="createGate"/>
      </When>
      <Otherwise>
        <Variable name="currentItem" as="Items" select="."/>
        <Node style="BasicEvent" caption="#{? Name + printAttr('Failure rate', @SA0826.ToString) + printAttr('ASIL', @SA0814.ToString)" rowId="faultTree" columnId="faultTreeCol">
        </Node>
        <ForEach select="Context:/part::Requirement">
          <Edge from="Owner" to="DefObj" style="mitigatedBy" caption="@SA0535" objects="Owner">
          </Edge>
        </ForEach>
      </Otherwise>
    </Choose>
    <ForEach select="Context:/part::FaultScope">
      <Edge from="Owner" to="DefObj" style="FaultScope" objects="Owner">
      </Edge>
    </ForEach>
  </Template>
  <Template name="createGate">
    <Node objects="." id="Intermediate_#{Handle}" style="IntermediateNode" caption="#{? Name + printAttr('Failure rate', @SA0826.ToString) + printAttr('ASIL', @SA0814.ToString)" rowId="faultTree" columnId="faultTreeCol">
    </Node>
    <Node style="#{?if SID='SI0395' then 'OR' else 'AND'" caption="" rowId="faultTree" columnId="faultTreeCol">
    </Node>
    <Edge from="'Intermediate_' + Handle" to="." objects="."/>
    <ForEach select="Context:/part::FaultEventToFaultEvent or /part::MainToFaultEvent">
      <Choose>
        <!--Gate-->
        <When test="DefObj.SID in ['SI0395', 'SI0394']">
          <Edge from="Owner" to="'Intermediate_' + DefObj.Handle" objects=".">
          </Edge>
        </When>
        <Otherwise>
          <Edge from="Owner" to="DefObj" objects=".">
          </Edge>
        </Otherwise>
      </Choose>
    </ForEach>
    <ForEach select="Context:/part::Requirement">
      <Edge from="DefObj" to="'Intermediate_' + Owner.Handle" style="mitigatedBy" objects="Owner">
      </Edge>
    </ForEach>
  </Template>
  <Function name="printAttr" as="String">
    <Parameter name="label" as="String"/>
    <Parameter name="value" as="String"/>
    <Value select="if $value ='' then '' else NewLine + $label + '=' + $value"/>
  </Function>
</Graph>


Example Result