Author Topic: Auto-generate ID for each EA element  (Read 11501 times)

José

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Auto-generate ID for each EA element
« on: September 15, 2015, 06:13:28 pm »
We want to put a lot (>1000) of requirements into our Enterprise Architect model. But these requirements do not yet have an unique identifier in EA, which is required. We do not want to give each requirement this ID by hand. Is there a way to auto-generate this ID for all these items in once?

I was thinking that maybe this might already be standard EA functionality. If not, could we otherwise use the scripting functionality?

I hoped to find some information on this online (user community/forum) but I was not able to. Does anyone have any suggestions/examples how they do it within there organisation?

Kind regards, José

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Auto-generate ID for each EA element
« Reply #1 on: September 15, 2015, 06:22:08 pm »
José,

As soon as you import the requirements in EA they automatically get their unique ID (GUID).


Geert

José

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Auto-generate ID for each EA element
« Reply #2 on: September 15, 2015, 06:28:01 pm »
Hi Geert,

I know that, but that's not what I meant. There is also the 'alias' field in which you can give the requirement a name like 'STK-001' or 'US-001' or whatever is determined within the organisation, which is visible for all EA users in your model. I was wondering if there is a way to get this field automatically filled with some value. We then can start referring to this alias in our documents so that everyone knows exactly about which requirement we are talking.

Hopefully this clarifies my question.

Kind regards, José

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Auto-generate ID for each EA element
« Reply #3 on: September 15, 2015, 06:36:30 pm »
Hi José,

No, there's nothing standard in EA that will fill in the Alias for you.
There are auto-naming features, but as far as I know they will only fill in the name, and not the alias.

[highlight]See qwerty's answer :-[[/highlight]

The upside is that writing a script to assign each requirement a unique ID and store that in the alias is a trivial task.

Geert
« Last Edit: September 15, 2015, 06:58:56 pm by Geert.Bellekens »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Auto-generate ID for each EA element
« Reply #4 on: September 15, 2015, 06:53:28 pm »
Auto-name has settings for both name and alias.

q.

José

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Auto-generate ID for each EA element
« Reply #5 on: September 15, 2015, 07:20:26 pm »
Thank you to both... That's indeed what I am looking for.

Kind regards, José

Pawel Zubkiewicz

  • EA User
  • **
  • Posts: 78
  • Karma: +2/-1
    • View Profile
    • zubkiewicz.com
Re: Auto-generate ID for each EA element
« Reply #6 on: September 15, 2015, 11:39:58 pm »
Be aware that EA has internal counter, so when you create an element it will be given the next id, let's say REQ-026. When you will delete that element from model, next time you will create new element, EA will give it REQ-027 even though REQ-026 no longer exists.
Enhanced Requirement Attributes Addin for Enterprise Architect (ERA Addin) - http://zubkiewicz.com/?p=239

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Auto-generate ID for each EA element
« Reply #7 on: September 16, 2015, 12:08:49 am »
I would regard this an issue since requirements do not necessarily have to be numbered consecutive. But (!) EA does not check the uniqueness of the identifiers. Can happen easily that a manual change will produce duplicates. One would need some script/add-in to check for consistent naming.

q.

Pawel Zubkiewicz

  • EA User
  • **
  • Posts: 78
  • Karma: +2/-1
    • View Profile
    • zubkiewicz.com
Re: Auto-generate ID for each EA element
« Reply #8 on: September 16, 2015, 07:07:52 am »
That's an coincidence, I was thinking about adding such feature to my addin today. This should be fairly easy to implement.

The second advantage could be support for many projects in one repository, where each project should have its own numbering. Right now EA does not support that, as far as I know.
Enhanced Requirement Attributes Addin for Enterprise Architect (ERA Addin) - http://zubkiewicz.com/?p=239

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Auto-generate ID for each EA element
« Reply #9 on: September 16, 2015, 07:30:55 am »
No, EA doesn't. But it provides means to enable add-in developers to do so :-)

q.