Author Topic: Test for Identical elements ?  (Read 4060 times)

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Test for Identical elements ?
« on: October 28, 2013, 11:12:18 pm »
Does anyone know of a way to test if two elements, created using the ClonePackage call, are identical i.e. has the clone been changed ?
Clearly, the GUIDs will always be different, so I need to ignore that, but there seems to be an almost limitless depths to checks needed to say whether one has changed: not just basic attribute values (Name, Status), but Attributes & Methods (and all their internal sub-structure e.g. parameters), Tagged value names and values, sub-elements like Constraints.....
There must be an easier way ? Maybe ? (and No, I don't want to create baselines : this is for an element-by-element comparison)
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Test for Identical elements ?
« Reply #1 on: October 29, 2013, 01:49:39 am »
Ian,
You probably have to bite the bullet and do a comparison of "everything possible". However, I'd say it's just a question of diligence ;)

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Test for Identical elements ?
« Reply #2 on: October 29, 2013, 03:52:14 am »
I'm not aware of one. A few years back (v. 8?) I implemented something along those lines for my then-employer, and ended up traversing the structures. The Modified timestamp is not enough, I know that.

But seeing as both baselines and model audit (maybe even gap analysis?) have this type of function, it seems reasonable to assume there's some sort of clever underlying implementation so it might be worth it to ask (beg) Sparx to open it up in the API.

/Uffe
My theories are always correct, just apply them to the right reality.

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: Test for Identical elements ?
« Reply #3 on: October 29, 2013, 04:32:53 am »
@Sparx - does this function exist internally?
Please can you externalize it ? It would make the CloneProject function REALLY useful....
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Test for Identical elements ?
« Reply #4 on: October 29, 2013, 09:51:30 am »
Baseline comparison is always model to XMI with a matching guid.

Auditing there is only a list of changes to that element to work with (not before/after)

I don't think the function is available for export.