Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Saul on August 24, 2011, 10:05:10 pm

Title: How to access Action Behaviour
Post by: Saul on August 24, 2011, 10:05:10 pm
I have dragged a method onto an Activity diagram to create an Action. Within the GUI, I can see a field called Baheviour set to my original method call:

"«request/reply»Services Model::Domain1::Interface1.getFoo"

The question is, how do I get this method string in the Action element? The only fields I can really see are CustomProperties and none of these contain the value I'm looking for.

Thanks,
Saul
Title: Re: How to access Action Behaviour
Post by: Geert Bellekens on August 24, 2011, 10:26:08 pm
Saul,

First change the "Kind" of action to "CallOperation" (via advanced context menu)
Then you have an extra tab/treenode called "Call" where you can specify this information.

Geert
Title: Re: How to access Action Behaviour
Post by: Saul on August 25, 2011, 09:01:58 am
Hi Geert,

sorry I was not very explicit in my question...the Action is already a CallOperation and I can see the populated tab/treenode "Call".

My problem is how to access the contents of "Call" using the API?

Regards,
Saul
Title: Re: How to access Action Behaviour
Post by: Saul on September 25, 2011, 10:49:16 pm
I'm still having problems with this one....Alex has suggested that I can access the GUID of the referenced method within the Custom Properties of the Action element. When I try this, the only custom properties I see are:

Custom Properties:
Element = 'Action1'      
name: 'kind', value: 'CallOperation'      
name: 'context', value: ''      
name: 'effect', value: ''      
name: 'value', value: ''      

So given that I have an Action element which is a CallOperation, how can I programatically access the method that this Action is calling?

Regards,
Saul
Title: Re: How to access Action Behaviour
Post by: KP on September 26, 2011, 09:54:43 am
The value you want is in the database at t_object.Classifier_guid but it doesn't appear to be exposed by the automation object model. It looks like you will need to execute a SQL select to extract the value (and maybe also put in a bug report asking that the Classifier_guid value be made available).
Title: Re: How to access Action Behaviour
Post by: Saul on October 05, 2011, 02:24:58 pm
Thanks KP...that works!