Book a Demo

Author Topic: Creating Association navigability problem  (Read 3151 times)

GBeutler

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Creating Association navigability problem
« on: February 29, 2008, 08:43:19 pm »
Hi All,

I try to create a association. Here's my code:

Code: [Select]
Association
{
%PI="\n  "%
%TRANSFORM_REFERENCE("AttributeAssociation",classGUID)%
Source
{
  %TRANSFORM_REFERENCE("Class",classGUID)%
  navigability="Non-Navigable"
}
Target
{
  GUID=%qt%%classGUID%%qt%
  access="Private"
  role="delegateImpl"
  multiplicity="1"
  containment="Reference"
  navigability="Navigable"
}
%PI="\n"%
}

Everything is working fine except the navigability. The value "Navigable" or "Non-Navigable" are ignored. I checked the debug log and found other sections like

Code: [Select]
Target
  {
...
  navigability="Navigable"
...
  }

for my association (and others where it is working) but on the target panel and at the diagram the navigability is unspecified. I think I missed something. Could somebody give me a hint? Thanks in advance and

best regards,

Guido

« Last Edit: February 29, 2008, 08:43:46 pm by GBeutler »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating Association navigability problem
« Reply #1 on: February 29, 2008, 11:32:28 pm »
Hi Guido,

This is only a guess, but I don't have EA open right now.

Is it possible that you need to explicitly set the direction of the association as well? That's how we have to do it through the API if we want it to show on a diagram.

David
No, you can't have it!

GBeutler

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating Association navigability problem
« Reply #2 on: March 01, 2008, 03:32:03 am »
Hi,

thanks, that's it. For everybody who might run in the same problem here's my code:

Code: [Select]
$COMMENT="  The connector template is used for copying connector        "
$COMMENT="  information.  %TRANSFORM_REFERENCE()% macro calls are       "
$COMMENT="  required to identify the connector and the classes in the   "
$COMMENT="  transformed model that it links.                            "
Association
{
%PI="\n  "%
%TRANSFORM_REFERENCE("AttributeAssociation",classGUID)%
direction="Source -> Destination"
Source
{
  %TRANSFORM_REFERENCE("Class",classGUID)%
  navigability="Non-Navigable"
}
Target
{
  GUID=%qt%%classGUID%%qt%
  navigability="Navigable"
  ordered="0"
  access="Private"
  role="delegateImpl"
  multiplicity="1"
  containment="Reference"
}
%PI="\n"%
}

best regards,

Guido

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating Association navigability problem
« Reply #3 on: March 01, 2008, 03:53:15 am »
Good news Guido,

Thanks for publishing the code.

David
No, you can't have it!