Book a Demo

Author Topic: Operation Raised Exception access from Automation  (Read 3610 times)

Vladimir Iszer

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Operation Raised Exception access from Automation
« on: October 17, 2014, 09:57:22 pm »
There is possibility to add Raised Exception to an Operation using the EA (http://www.sparxsystems.com/enterprise_architect_user_guide/10/modeling_basics/advanced_properties_of_operati.html).

Is it possible to access this information using the automation ? If yes, how ?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Operation Raised Exception access from Automat
« Reply #1 on: October 17, 2014, 11:12:36 pm »
Not directly. The link to the raised exceptions is not exposed in the API.
But you can get to it using Repository.SQLQuery

This query below works on SQL Server and shows where to find the info.

Code: [Select]
select ob.Object_ID from t_operation o
join t_xref x on o.ea_guid = x.Client
                  and x.Behavior = 'raisedException'
join t_object ob on cast(ob.ea_guid as varchar(100)) = cast (x.Description as varchar(100))
where o.name = 'OperationWithException'

You can use the object_ID to create an EA.Element using Repository.GetElementByID

Geert

Vladimir Iszer

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Operation Raised Exception access from Automat
« Reply #2 on: October 17, 2014, 11:22:48 pm »
Thanx a lot !