Book a Demo

Author Topic: Archimate API  (Read 7365 times)

theom

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Archimate API
« on: February 20, 2013, 08:11:07 pm »
Hi,
I'm trying to convert a BizzDesign database to Enterprise Architect by using the API. All works well except for the dynamic relations of type Triggering and Flow.
The connectors that I insert with stereotype Archimate2::Triggering and Archimate2::Flow end up with an 'Internal Application Error' and the moment i issue statement: connector.Update().
I'm using EA 9.3. Any suggestion?
Thanks!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Archimate API
« Reply #1 on: February 20, 2013, 11:19:52 pm »
Just checked with Triggering in V10 - no problem.

Try the following:
- Use an empty repository
- Run consistency check on your working repos
- Try to get hold of connector.getlasterror()

q.
« Last Edit: February 20, 2013, 11:20:46 pm by qwerty »

theom

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Archimate API
« Reply #2 on: March 03, 2013, 12:44:31 am »
Hi q,
thanks, your reply helped me a one step further. Unfortunately, I still have strang errors. The GetLastError returns messages like:
- ControlFlow is not legal for Class --> Activity
- ControlFlow is not legal for Class --> Class
- ControlFlow is not legal for Class --> Component
The strange thing is that within EA itself I can add the Triggering and Flow relations between the involved elements manually without any errors.
Does this mean that the involved elements on both sides of the relationship require to be of a specific stereotype and/or does the relationship needs to be of a specific stereotype? I add the elements itself with a stereotype: Archimate2::ApplicationComponent and the relationship with stereotypes Archimate2::Flow and Archimate2::Triggering.
Thanks!
Theo

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Archimate API
« Reply #3 on: March 03, 2013, 02:57:16 am »
I can't answer the Archimate-specific aspects. But in general EA restricts connectors to be drawn only between certain elements. Maybe the one you try to create is different from that which is created manually. You need to inspect the manually created connector in detail since its metatype can let it appear as something different.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Archimate API
« Reply #4 on: March 04, 2013, 12:17:38 pm »
The "ControlFlow is not legal" errors are coming from the "Strict UML Syntax" option being switched on. In normal use, EA will ignore that option when it's clear you're using some language other than UML, but presumably the API doesn't ignore it. Please switch off the checkbox at Tools > Options > Diagram > Strict UML Syntax and try again and let us know if it works.
The Sparx Team
[email protected]

theom

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Archimate API
« Reply #5 on: March 11, 2013, 01:17:45 am »
Hi Sparx Team,
this really solves the problem! No more exceptions with Flows and Triggering relations. Saves manual conversion work on thousands of records. Thanks very much!!!
Theo
By-the-way: is it possible to set this option through the API itself?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Archimate API
« Reply #6 on: March 12, 2013, 02:22:39 am »
IIRC these are user specific options stored in the registry. You might find it out by saving the EA tree, changing the option and compare it back. For your users it's then important to change that option manually for their account. (However, I'm not 100% sure that this option is part of the registry or if it goes to somewhere in the database - I'd say the latter is unlikely)

q.