Book a Demo

Author Topic: Create trigger  (Read 3240 times)

pspoenemann

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Create trigger
« on: October 24, 2012, 07:09:16 pm »
Is there a way, to create a trigger via api and set the specification to a signal.

I know, that the type  (Signal / call etc.) is the custom property kind.
I can set it to Signal.
But where I can set the specification?

It should create the row in t_xref (Name=MOFProps, Behaviour=event).

In the next step I will connect the trigger to the transition.
Here is also the problem, how to set it?

Using the UI, the triggers can be seen in the Property TransitionEvent of the connector (Transition) as comma separated list. But only the names.
And setting TransitionEvent with the name of the trigger is not enough. It will not create the row in t_xref, which connects the trigger with the connector.

So, how can it be done without directly writing / reading t_xref?

Peter

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Create trigger
« Reply #1 on: October 25, 2012, 12:13:28 am »
Peter,

I'm not sure, but it could very well be that you don't have a choice. Not all elements and features have been exposed to the API, so something we have no choice but to resort to direct SQL queries or updates.

Luckily there a "backdoor" operation that you can use to execute sql update statements: Repsitory.Execute(SQLUpdateString)

Geert