Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: pmueller on June 19, 2010, 02:28:21 am

Title: How to retrieve state mach. Trigger Specification?
Post by: pmueller on June 19, 2010, 02:28:21 am
I am modifying the C++ code generation templates for state machines. I need to retrieve the Specification value from Triggers. But EA ver. 7.5 does not provide an EASL property to retrieve the specification of a trigger. Am I overlooking something?

Below are the properties that EA exports:
AsynchDestinationState
DependentProperty
Event
Name
Type
Title: Re: How to retrieve state mach. Trigger Specificat
Post by: Nizam Mohamed on June 22, 2010, 09:31:09 am
The specifications can be retrieved from the event information, please refer to the properties of the respective events, i.e. ChangeEvent, TimeEvent ,  CallEvent and SignalEvent in the  help   (http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/easl_properties.htm)or refer to their usages in the original "Trigger" template.
Title: Re: How to retrieve state mach. Trigger Specificat
Post by: pmueller on June 25, 2010, 05:30:19 am
Thanks for responding.
This still does not give me the 'Specification' of an event as shown in the Transition Properties dialog.

For example, for the CallEvent, the only property that is documented is:
Operation
      The operation of the CallEvent.

while the ChangeEvent has:
ChangeExpression

Is there a 'hidden' property to get the Specification?
Thanks again
Title: Re: How to retrieve state mach. Trigger Specificat
Post by: Nizam Mohamed on June 25, 2010, 08:27:45 am
The "specificaiton" in EA is a simplified way to model various event kinds.

For Change and Time triggers, the "When" and "ChangeExpression" will give the specification(shown in the transition's properties)

But, for Signal and Call triggers, the "Operation" and "Signal" will now(EA 8.0) return the GUID of the associated Operation or Signal respectively.
which can be retrieved something like
Code: [Select]
$sOpGUID =  %EASL_GET("Property", $Event, "Operation")%
$sExpression = %EASL_GET("Property", $sOpGUID, "Name")%

$sSigGUID =  %EASL_GET("Property", $Event, "Signal")%
$sExpression = %EASL_GET("Property", $sSigGUID, "Name")%

where $sExpression will give you the name of the associated operation or signal's name

AFAIK There are no hidden properties as such!
Title: Re: How to retrieve state mach. Trigger Specificat
Post by: pmueller on June 26, 2010, 02:43:30 pm
Ah, thank you much. I may need to try out 8.0.
Thanks again  :)