Book a Demo

Author Topic: Tranformation creating connector, please help!  (Read 3179 times)

manfredw

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
  • gaudeo ligneo!
    • View Profile
Tranformation creating connector, please help!
« on: October 02, 2012, 07:31:04 pm »
Hello everybody,

I'm currently writing a transformation but I cannot seem to get connectors being created between the transformed element and the element that it has been transformed from.

This is my context:
I have one use case "Use Case1" and transform it to a requirement "Req_Use Case1". Then I try to link both using this script:
Code: [Select]
Requirement
{
  name = "REQ_%className%"
  notes = "%classNotes%"
  $reqName = "REQ_" + %className%
  
}

Dependency
  {
    %TRANSFORM_REFERENCE($reqName,classGUID)%
    stereotype="transformedFrom"
    Source
    {
      %TRANSFORM_REFERENCE($reqName,classGUID)%
    }
    Target
    {
      GUID=%qt%%classGUID%%qt%
    }
  }

the requirement gets created, however the dependency link does not.
I would be happy if someone could help me!
many thanks in advance,

best regards
Manfred

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Tranformation creating connector, please help!
« Reply #1 on: October 18, 2012, 08:50:58 am »
You're missing a TRANSFORM_REFERENCE in the definition of your requirement, so the source can't be linked.

Also, I strongly recommend you don't include the name of the element in $reqName. It's intended to be a reference to the types of elements created from the transformations. If you include the name it will break if you rename anything.

Code: [Select]
Requirement
{
  name = "REQ_%className%"
  notes = "%classNotes%"
  %TRANSFORM_REFERENCE("Requirement",classGUID)%
  
}

Dependency
  {
    %TRANSFORM_REFERENCE("transformedFrom",classGUID)%
    stereotype="transformedFrom"
    Source
    {
      %TRANSFORM_REFERENCE("Requirement",classGUID)%
    }
    Target
    {
      GUID=%qt%%classGUID%%qt%
    }
  }

manfredw

  • EA User
  • **
  • Posts: 47
  • Karma: +0/-0
  • gaudeo ligneo!
    • View Profile
Re: Tranformation creating connector, please help!
« Reply #2 on: October 18, 2012, 05:52:23 pm »
Hello Simon,

thank you very much four your reply!
Works fine!  :)

have a nice day,

best regards
Manfred