Author Topic: How to access Action Behaviour  (Read 4018 times)

Saul

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
How to access Action Behaviour
« 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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to access Action Behaviour
« Reply #1 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

Saul

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: How to access Action Behaviour
« Reply #2 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

Saul

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: How to access Action Behaviour
« Reply #3 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

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: How to access Action Behaviour
« Reply #4 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).
The Sparx Team
[email protected]

Saul

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: How to access Action Behaviour
« Reply #5 on: October 05, 2011, 02:24:58 pm »
Thanks KP...that works!