############################################################################

TechnoteID: 14191

Subject: Why do I get errror when loading my model in Rose 2001? It loaded in
previous version.

PRODUCT: Rose
OS:   PC
DEFECT #: N/A
PATCH #: N/A
REFERENCES:

CREATED: 08-dec-2000
REVISED: dd-mmm-yyyy


QUESTION:
Why do I get errors when loading my model in Rose 2001?   It's loading without
any errors in previous version of Rose.

ANSWER:
Rose 2001 has enhanced capability to verify that the model is modeled
correctly.

An example.
In Rose 2000e it was possible to attach a note to the focus of control for an
object when modeling sequence diagrams.   This is easily done by mistake when
trying to attach the note to a message.   Rose 2000e would not report this as a
problem.   Loading such a model would give the following errors:
15:57:47|     Loading unit Logical View::Startup Use Cases from file
C:\Models\Use Cases.cat
15:57:47|   Error: Illegal connection, must connect to a note.
15:57:47|   Error: Illegal connection, must connect to a note.
15:57:47|   Error: Illegal connection, must connect to a note.
15:57:47|   Error: Illegal connection, must connect to a note.

This error is reporting that a note is not attached correctly.   Identify the
note and redraw the note anchor to the message instead of the focus of control
and the error will not appear again.

For more information, contact Rational Software Technical Support

############################################################################

TechnoteID: 14800

Subject: Error: Illegal Connection, must connect to a note.

PRODUCT: Rose 2001
OS:   Windows
DEFECT #:
PATCH #:
REFERENCES:

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.

############################################################################

Patrick Kennedy
 Rational Support

On Jun 8, 11:31, Styve, Arne wrote:
> Subject: (ROSE) Attatching notes to diagram-items....
>
> Hi,
>
> I'm testing the latest (I think) version of Rose on an older model-file I
> had, and when loading the old model-file in v3001.03.00 of Rose, I get
> error-messages when loading some of my sequence-diagrams. It turns out that
> the errors are related to Note Ancors between a Note and a Focus Of Control
> (FOC). This was allowed in previous version of Rose, but apparently not in
> this version. Is this correct ? If so, does anyone know WHY it's not
> possible anymore ?
>
> According to the online-help:
>
> --- quote ---
>
> You can draw the following relationships:
>
> Draw  From a Note to:
> Note Anchor   Any item that can be selected in a diagram
> Note Anchor   Multiple items
> Note: Anchors cannot be attached to other note anchors.
>
> Copyright � 2000 Rational Software Corporation. All rights reserved.
>
> --- unquote -----
>
> it should be possible to draw a note anchor from a note to a FOC, since FOC
> is certanly an "..item that can be selected in a diagram"....
>
> Regards
>
> Arne Styve
> This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
> TANDBERG Television. If received in error please notify the sender and
> destroy the original message and attachments.
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
>-- End of excerpt from Styve, Arne


************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to