IBM Support

PM59473: The NAF utility: 'Convert NSV-01 Resource Hierachy into NSV-01 Resource Interaction Spec.' do not work

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Configuration:
    --------------
    Tool = Rational System Architect
    Version = 11.4.1.1
    
    Description:
    ------------
    The NAF utility: 'Convert NSV-01 Resource Hierarchy into NSV-01
    Resource Interaction Spec.' do not work
    
    Actual result:
    --------------
    The diagram is created but the symbols are not saved or click
    able
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Configuration:
    --------------
    Tool = Rational System Architect
    Version = 11.4.1.1
    
    Description:
    ------------
    The NAF utility: "Convert NSV-01 Resource Hierarchy into
    NSV-01 Resource Interaction Spec." do not work
    
    Actual result:
    --------------
    The diagram is created but the symbols are not saved or
    click able
    

Problem conclusion

  • The problem has been corrected for both macros; each of the
    diagram types mentioned has a macro which converts it to the
    other.
    
    WORKAROUND:
    
    The user can employ the macro below to correct the problem.
    They merely need to save the diagram after running the
    macro.
    
    ' Reports and corrects, using ObjectIdentifier setting in
    preference over Defined By relationship
    ' Will pick up existing definition of the same name, based
    on represented definition types of symbol;
    'the first definition found is used, of the first type
    tested.
    ' Diagram is left unsaved - must save it to make the changes
    permanent.
    Sub CheckRepresentsFieldsBasedOnDefinitionRelation()
        Dim dgm As Diagram
        Dim sym As Symbol
        Dim sao As SAObjects
        Dim sao2 As SAObjects
        Dim str As String
        Dim def As Definition
        Dim imf As SA2001.ISAImf
        Dim bNoDef As Boolean
        Dim lngDDID As Long
        Dim iret As Integer
        Dim objmc As MetaClass
        Dim objmi As MetaItem
        Dim objmi2 As MetaItem
    
        Const ObjectIdentifier = "Object Identifier"
        Const ObjectTypeNumber = "Object Type Number"
        Const ObjectClassNumber = "Object Class Number"
        Const SymbolRepresents = "Symbol Represents"
    
        Set objmc = SA2001.Encyclopedia.MetaModel.MetaClasses(2)
        Set imf = SA2001.Interface("isaimf")
        Set dgm = SA2001.Encyclopedia.GetActiveDiagram
        If Not dgm Is Nothing Then
     Set sao = dgm.GetAllSymbols()
     If Not sao Is Nothing Then
         sao.ReadAll
         For Each sym In sao
      Set objmi = objmc.MetaItems(sym.SATYPE)
      If (objmi.Represents.RepresentationalType =
    enuSASYM_EXPLREL Or objmi.Represents.RepresentationalType =
    enuSASYM_NODE) And _
         objmi.Represents.MetaObjects.COUNT ? 0
    Then
          Debug.Print sym.name ? " (" ?
    sym.TypeName ? ")"
    
          Set def = Nothing
          On Error Resume Next
          Set def = sym.Definition
          On Error GoTo 0
          If def Is Nothing Then
       bNoDef = True
          Else
       bNoDef = False
       Debug.Print "- has definition
    relationship to " ? def.ddId
       lngDDID = def.ddId
          End If
    
          str = sym.GetProperty(ObjectIdentifier)
          On Error Resume Next
          Set def = Nothing
          Set def =
    SA2001.Encyclopedia.GetDefinitionById(CLng(str))
          On Error GoTo 0
          If Not def Is Nothing Then
       If Not def.ddId = lngDDID And Not
    bNoDef Then
           ' use the definition the symbol
    was related to, in preference
           On Error Resume Next
           Set def = Nothing
           Set def =
    SA2001.Encyclopedia.GetDefinitionById(lngDDID)
           On Error GoTo 0
           sym.SetProperty
    ObjectIdentifier, def.ddId
           Debug.Print ObjectIdentifier ? "
    set to " ? def.ddId ? "(what definition relation
    referenced)"
    
           'On Error Resume Next
           'iret = imf.SADeleteRelation(21,
    def.ddId, sym.ddId)
           'iret = iret +
    imf.SADeleteRelation(20, sym.ddId, def.ddId)
           'On Error GoTo 0
           'bNoDef = True
           'Debug.Print "Existing
    definition relationship didn't match " ? ObjectIdentifier ?
    " reference and was removed."
       End If
          ElseIf Not bNoDef Then
       ' use the definition the symbol was
    related to.
       On Error Resume Next
       Set def = Nothing
       Set def =
    SA2001.Encyclopedia.GetDefinitionById(lngDDID)
       On Error GoTo 0
       sym.SetProperty ObjectIdentifier,
    def.ddId
       Debug.Print ObjectIdentifier ? " set
    to " ? def.ddId ? "(what definition relation referenced)"
          End If
    
          If bNoDef Then
       If Not def Is Nothing Then
           On Error Resume Next
           iret = imf.SAAddRelation(21,
    def.ddId, sym.ddId)
           iret = iret +
    imf.SAAddRelation(20, sym.ddId, def.ddId)
           On Error GoTo 0
           If iret = 0 Then
        Debug.Print "Added
    definition relationship"
           End If
       Else
           ' attempt to find definition
    based on symbol name...
           For Each objmi2 In
    objmi.Represents.MetaObjects
        Set sao2 =
    SA2001.Encyclopedia.GetFilteredDefinitions(sym.name,
    objmi2.TypeNumber)
        If Not sao2 Is Nothing Then
            sao2.ReadAll
            If sao2.COUNT ? 0 Then
         Set def =
    sao2.Item(1)
         Exit For
            End If
        End If
           Next
           If def Is Nothing Then
        Debug.Print "Could not add
    definition relationship (no definition)"
           Else
        Debug.Print "Located
    definition of type " ? objmi2.TypeName ? " with matching
    name."
    
        On Error Resume Next
        iret = imf.SAAddRelation(21,
    def.ddId, sym.ddId)
        iret = iret +
    imf.SAAddRelation(20, sym.ddId, def.ddId)
        On Error GoTo 0
        If iret = 0 Then
            Debug.Print "Added
    definition relationship"
        End If
    
        sym.SetProperty
    ObjectIdentifier, def.ddId
        Debug.Print ObjectIdentifier
    ? " set to " ? def.ddId
           End If
       End If
          End If
    
          If "" =
    sym.GetProperty(SymbolRepresents) Then
       If Not def Is Nothing Then
           sym.SetProperty
    SymbolRepresents, def.TypeName
           Debug.Print SymbolRepresents ? "
    set to " ? def.TypeName
       End If
          End If
    
          If "" =
    sym.GetProperty(ObjectTypeNumber) Then
       If Not def Is Nothing Then
           sym.SetProperty
    ObjectTypeNumber, def.SATYPE
           Debug.Print "Set " ?
    ObjectTypeNumber ? " to " ? def.SATYPE
       End If
          End If
    
          If "" =
    sym.GetProperty(ObjectClassNumber) Then
       If Not def Is Nothing Then
           sym.SetProperty
    ObjectClassNumber, def.SATYPE
           Debug.Print "Set " ?
    ObjectClassNumber ? " to " ? def.SAClass
       End If
          End If
    
          Debug.Print ObjectIdentifier ? "?" ?
    sym.GetProperty(ObjectIdentifier) ? "?"
          Debug.Print ObjectTypeNumber ? "?" ?
    sym.GetProperty(ObjectTypeNumber) ? "?"
          Debug.Print ObjectClassNumber ? "?" ?
    sym.GetProperty(ObjectClassNumber) ? "?"
          Debug.Print SymbolRepresents ? "?" ?
    sym.GetProperty(SymbolRepresents) ? "?"
          Debug.Print
    
          If False And sym.SATYPE = 1139 Then
       Debug.Print sym.name ? " (" ?
    sym.TypeName ? ")"
    
       Debug.Print "from ?" ?
    def.GetProperty("from") ? "?"
       Debug.Print "to ?" ?
    def.GetProperty("to") ? "?"
       Debug.Print "from line end ?" ?
    def.GetProperty("from line end") ? "?"
       Debug.Print "to line end ?" ?
    def.GetProperty("to line end") ? "?"
    
       Debug.Print
          End If
      End If
         Next
     End If
        End If
    End Sub
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM59473

  • Reported component name

    TLOGIC SYS ARCH

  • Reported component ID

    5724V68SA

  • Reported release

    B41

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-03-01

  • Closed date

    2012-06-18

  • Last modified date

    2012-06-18

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC SYS ARCH

  • Fixed component ID

    5724V68SA

Applicable component levels

  • RB41 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS6RBX","label":"Rational System Architect"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.4.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
18 June 2012