Author Topic: Message parameters  (Read 4576 times)

Dani

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Message parameters
« on: October 26, 2004, 03:44:47 am »
Hi there,

Is it possible via the automation interface to get at the message parameters of a sequence connector ?

In the database, this would correspond to field pdata2 in t_connector.

Thanks

LNS_Software

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Message parameters
« Reply #1 on: October 26, 2004, 08:27:01 am »
In automation, this is how you do it.

If your connector refers to an operation, the connector TAG "operation_guid" will identify the GUID for the operation.  You can get the details of the method by:
  • Determining the element on the supplier end of the connection.
  • Scanning through the MethodsEx for the element until you find a matching GUID.  (Note: Methods EX contains a list of all inherited methods, not just the ones created for the current class.)
  • Once you have the method, you can evaluate its parameters via EA.Method.Parameters.
If it doesn't refer to an operation, you have to have some kind of syntax for parsing the "name" for whatever you are specifying in the message text.

Have fun!

Dani

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Message parameters
« Reply #2 on: October 26, 2004, 08:52:22 am »
Thanks for the hint but before I go and implement that. What I'm really after is the info entered in the 'Parameters' field in the 'Message Properties' dialog, which in my case represents the value given to a particular parameter. As far as I can see, this information is in the pdata2 field of t_connector.

I looks like your method would allow me to get at the information about the parameter itself and not the value. Is that correct ?

LNS_Software

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Message parameters
« Reply #3 on: October 26, 2004, 10:04:39 am »
The "name" field for the connector contains:

xyz(name, datetime)

You'd have to look at the method, to determine the type of return, in this example, it is an "int" type.

While the "TransitionGuard" field contains:

retval=value;params="Freddy",new DateTime(2004,10,15);

So the resulting code might be something like:

Code: [Select]
int value = SomeObject.xyz("Freddy",new DateTime(2004,10,15));
« Last Edit: October 26, 2004, 11:41:41 pm by LNS_Software »

Dani

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Message parameters
« Reply #4 on: October 27, 2004, 03:13:49 am »
Ok I see. Following the operation_guid/supplier end/MethodsEx/parameters rigmarole gives me what I want.

However interestingly TransitionEvent, TransitionGuard and TransitionAction in connector, map directly to fields pdata1, pdata2, pdata3 in t_connector which was what I originally was looking for. Not very intuitive I might add.

Thanks again. It works now.