Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started 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
-
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
-
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
-
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
-
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).
-
Thanks KP...that works!