Check out this tech note:
/////
Subject: Error: Illegal Connection, must connect to a note.
PRODUCT: Rose 2001
OS: Windows
DEFECT #:
PATCH #:
REFERENCES: Technote 19527
CREATED: 23-Jan-2001
REVISED: 31-jan-2001
SYMPTOM:
When loading in Rose 2001 a model created with a previous version
of Rose I get the error in the Rose Log:
Error: Illegal Connection, must connect to a note.
CAUSE:
In Rose 2001 a Note cannot be anchored to a Focus of Control (FOC).
This was allowed in Rose 2000e. Rose 2001 displays
the error above when it loads a model containing a note anchored to
a FOC
and subsequently loads the model entirely (in particular, the note
is visible,
and it is still anchored to the FOC).
RESOLUTION:
Locate the note and anchor it to a different item, most probably you'll
want
to anchor it to the message corresponding to the FOC.
The following script will help you to locate the notes that cause this
problem
by writing to the rose log the qualified name of the Diagram in which
they are
located and the Text they contain.
To run the script: save it as 'FindNoteLinkedToFOC.ebs
Load the model, open the script file from Tools->Open Script
and choose Debugger->Go (F5).
'************************************************************
'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 ([EMAIL PROTECTED]) 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 "<empty Text>"
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
For more information, contact Rational Software Technical Support.
/////
Regards
Vishu
Roger St-Amand wrote:
Hi all,
I experiment very strange trouble with Rational Rose 2001a Patch #2 on Windows NT 2000. I have a model with different controllable units. All the categories are writable. I change some of them and I save all of them too. From now, all is OK. No warning or error in the RR log. I close RR and I try to reload my model. BANG!!! One of my controllable units can't be reload. I got the following error
18:43:05| Error: Illegal connection, must connect to a note.
18:43:10| Error: Error (3985) at file line 134148.
18:43:10| Warning: The model has stopped loading at this point. The model is not complete.- Any body know how this category was corrupted and how can I repair it?
- Where I can find more information about the error 3985 ???Thanks for all your suggestion.
Roger St-Amand
Sr. Analyst/C2B, RecruitsoftP: 418.524.5665, x 270
E: [EMAIL PROTECTED]
--
---
Annamalai "Vishu" Viswanathan -- [EMAIL PROTECTED]
Rose Technical Support Engineer
Rational WW Customer Service
We value your feedback and encourage you to respond to the Rational
Customer Service survey you may receive regarding this case.
---
