Author Topic: List Context References  (Read 2043 times)

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
List Context References
« on: June 28, 2014, 06:44:48 am »
This is different than the "Copy Context References" discussion...

I am trying to use C# to grab the context references made in a use case.  Context References are not necessarily made via CONNECTORS.  (See the Sparx documentation for Custom References and how to make context references).

Because a context reference can be made without a connector, I need some direction on how to grab the context references for an element (not connectors).

Which class will I find the proper methods or properties for this?  I've looked, researched, etc and this is my final stop.  :-/

Thanks in advance!

A. Engle
TOGAF 9.1

qwerty

  • EA Guru
  • *****
  • Posts: 9665
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: List Context References
« Reply #1 on: June 28, 2014, 06:49:19 am »
Could you point me to where exactly that is documented? This is the first time I hear of such a reference.

q.

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: List Context References
« Reply #2 on: June 28, 2014, 07:02:03 am »
Sure.  You can find it in the Sparx help documentation by searching for context references.

But I've pulled that for you here:  http://www.sparxsystems.com/enterprise_architect_user_guide/10/modeling_basics/set_up_scenario_specification.html

at the bottom of the page you'll find a link for the Context References tab.

here's how to create a custom reference (context reference) between elements:  http://www.sparxsystems.com/enterprise_architect_user_guide/9.0/modeling_basics/crossreferences.html


qwerty, I find it hard to believe you've written books on Sparx and don't know what a context reference is dude...just saying.   :o  but I appreciate your help nonetheless...
« Last Edit: June 28, 2014, 07:03:13 am by aengle »

A. Engle
TOGAF 9.1

qwerty

  • EA Guru
  • *****
  • Posts: 9665
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: List Context References
« Reply #3 on: June 28, 2014, 05:26:45 pm »
Well, there is a recent discussion about those. Actually these ARE based on connectors. You can prove that: create a UC and an Actor. Now create an association between both. The actor is shown in the list. Remove the connector. The actor vanishes. So this is simply a different rendering for a connector.

q.

P.S. http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1402492976
So indeed this is the 2nd time I hear from that. I DID know these, but it simply was placed in the outer rim of my brain. Probably because I knew from the beginning that they were just connector based renderings. Still the term is located in the outer rim. Perhaps the next time I'll as again: "what is that?"  ;)
« Last Edit: June 28, 2014, 05:30:48 pm by qwerty »

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: List Context References
« Reply #4 on: June 30, 2014, 10:21:44 pm »
That is correct.  Your association connection is what is showing in the list, not a reference connection.  Create a context reference per the documentation posted above without drawing a connector, the reference will show under "references" for the element, but there is no connector...connection.

I've tested this a variety of ways, most notably, listing out the connecters for an element and the reference elements are not listed, even on the referenced item.

Hence...why I'm posting my question.   :-/

A. Engle
TOGAF 9.1

qwerty

  • EA Guru
  • *****
  • Posts: 9665
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: List Context References
« Reply #5 on: June 30, 2014, 11:45:06 pm »
Found it. It's in t_xref where Type = 'reference'

But now the question: why do you use this strange construct? Can't you live with simple connectors? There are certainly more "UML-standard" ways to achieve these links.

q.

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: List Context References
« Reply #6 on: June 30, 2014, 11:55:41 pm »
What is that in C#?  I cannot locate it in the object library.

We're working on a proof of concept.  This methodology may not stick, just testing out different scenarios, etc. etc.

THANKS!

A. Engle
TOGAF 9.1

qwerty

  • EA Guru
  • *****
  • Posts: 9665
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: List Context References
« Reply #7 on: July 01, 2014, 12:24:33 am »
You need to use
Code: [Select]
Repository.SQLQuery ("SELECT * FROM t_xref WHERE Type = 'reference' AND Client = '<ea_guid_c>' AND Supplier = '<ea_guid_s>'")Where the two guids are those of the connected element guids.

q.

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: List Context References
« Reply #8 on: July 02, 2014, 04:25:30 am »
thank you sir!  I got it working! :D

A. Engle
TOGAF 9.1

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: List Context References
« Reply #9 on: July 12, 2014, 04:55:54 am »
One last question:  where can I find information on the other "Types" I could query?

A. Engle
TOGAF 9.1

qwerty

  • EA Guru
  • *****
  • Posts: 9665
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: List Context References
« Reply #10 on: July 12, 2014, 08:19:40 am »
Can you put me on rails regarding the "Types". I won't read the whole thread again :-/

q.

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: List Context References
« Reply #11 on: July 14, 2014, 11:13:09 pm »
your query:  "SELECT * FROM t_xref WHERE [highlight]Type [/highlight]= 'reference'

Where can I find a list of the "types"?

A. Engle
TOGAF 9.1

qwerty

  • EA Guru
  • *****
  • Posts: 9665
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: List Context References
« Reply #12 on: July 15, 2014, 03:30:28 am »
On pages 34/35 of my Inside book.

q.

A. Engle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: List Context References
« Reply #13 on: July 15, 2014, 04:48:36 am »
hmm.  Was hoping for a Sparx reference/answer, not a product plug.   :-/

thanks!

A. Engle
TOGAF 9.1