Solution ID: 144850030 Type:External 表題: エラー: 接続が不正です。ノートに接続してください 製品: Rose 2001A バージョン: 7.5 OS: Windows DEFECT #: N/A PATCH #: N/A 参照事項: Solution 14800 の和訳 成年月日: 18-Nov-2002 改訂年月日: 質問: Rose2000e から Rose2001A にアップグレードして、Rose2000e で作成した モデルを Rose2001A で開いたところ、以下のエラーが多数発生します。 回避策を教えて下さい。 10:22:43| エラー: 接続が不正です。ノートに接続してください。 回答: 「エラー: 接続が不正です。ノートに接続してください。」というエラーは、 Rose2001A のシーケンス図においてノートと制御フォーカス(シーケンス図中 でライフラインを修飾する細長い長方形)をアンカーで結ぶことが出来ない為 に発生します。(Rose2000e 以前のバージョンでは可能です。) 回避策としては、以下のスクリプトを実行し、ノートと制御フォーカスを結んで いるアンカーを削除します。 1. Roseを起動して、問題のモデルを開きます。 2. [ツール]→[新規スクリプト作成] をクリックします。 3.「Sub Main End Sub」を削除し、以下のスクリプトをコピー&ペースト します。 4. [デバッガ] →[実行] をクリックすると、問題のあるノートの数が 表示されます。 5. [OK] をクリックして、ダイアログボックスを閉じます。 6. ログに、どのノートのアンカーが削除されたか表示されるので図を 確認します。 7. ノートと制御フォーカスを結んでいたアンカーは削除されているので、 制御フォーカス以外の適当なアイテムとノートを結び付けます。 '************************************************************ 'FindNoteLinkedToFOC.ebs ' 'In Rose 2001 Notes connected to a FOC cause 'the following error upon startup: ' 'Error: Illegal Connection, must connect to a note. 'This script reports in the Rose Log all the Notes 'connected to a FOC. 'For each note it lists: 'the text of the note and the diagram it belongs to. ' ' 'Written by: Lara Ziosi (lziosi@rational.com) 01/23/2001 ' '************************************************************ Sub findNoteLinkedToFOC(thescen As scenariodiagram, _ ByRef NF As Integer) Dim theitemView As RoseItemView Dim thenotes As noteviewcollection Dim thenote As noteview Dim mycoll As New noteviewcollection For i = 1 To thescen.itemviews.count Set theitemview = thescen.itemviews.getat(i) Set thenotes = theitemview.getattachednotes() If thenotes.count > 0 And _ theitemview.getpropertyclassname = "FocusOfCtl" Then For k = 1 To thenotes.count Set thenote = thenotes.getat(k) NF = NF+1 roseapp.writeerrorlog str(NF)+ _ ". FOC connected to Note: " roseapp.writeerrorlog "[Diagram Name] " roseapp.writeerrorlog _ thescen.getqualifiedname If thenote.text = "" Then roseapp.writeerrorlog "[Note Text]" roseapp.writeerrorlog "" Else roseapp.writeerrorlog "[Note Text] " roseapp.writeerrorlog thenote.text End If Next k End If Next i End Sub Sub Main Dim themodel As model Dim thescen As scenariodiagram Set themodel = roseapp.currentmodel Dim thecat As category Dim theUC As UseCase Dim NotesFound As Integer NotesFound = 0 roseapp.writeerrorlog _ "[Start Looking for Notes attached to FOCs]" 'Search in categories For i = 1 To themodel.getallcategories.count Set thecat = themodel.getallcategories.getat(i) For j = 1 To thecat.scenariodiagrams.count Set thescen = thecat.scenariodiagrams.getat(j) Call findNoteLinkedToFOC(thescen,NotesFound) Next j Next i 'Search in Use cases For i = 1 To themodel.getallusecases.count Set theUC = themodel.getallusecases.getat(i) For j = 1 To theUC.scenariodiagrams.count Set thescen = theUC.scenariodiagrams.getat(j) Call findNoteLinkedToFOC(thescen,NotesFound) Next j Next i roseapp.writeerrorlog _ "[Finished Looking for Notes attached to FOCs]" If NotesFound > 0 Then msgbox str(NotesFound)+_ " Note(s) found, connected to FOCs -- see the log for details" Else msgbox "No Note(s) found, connected to FOCs" End If End Sub ご不明な点等ありましたら、ラショナルカスタマサービスへお問い合わせ下さい。