Author Topic: Connector.StyleEx - LinkedToElementFeature  (Read 2783 times)

David Rains (bioform)

  • EA User
  • **
  • Posts: 83
  • Karma: +0/-0
    • View Profile
Connector.StyleEx - LinkedToElementFeature
« on: July 11, 2013, 05:24:37 am »
Doing some work prototyping a solution to derive connector tagged values based on what element feature (operation or attribute) the connector is linked too... PART of my effort to implement SBV within requirement engineering using EA...

t_connector.StyleEx seems to use LFEP/LSEP prefixes regardless if it is an operation or an attribute.

vbScript function - to extract GUID of LinkedToElementFeature

public function IsConnector_LinkedToFeature( byval styleEx_Value, byval connectorEnd2Check, byref targetFeaturedGUID )
      'Example: Links to Attributes
      ' LFEP={B7306EA4-E8F3-4743-80EE-BDF36534E1AF}L;LFSP={0C85C78D-9173-4cf4-A2C2-85BE7C8FB7B4}R;
      'Note: Prefix LFEP/LFSP are the same regardless of link to feature's attribute or operation
      dim strTargetPrefix, iStartPosOfGUID
      dim blnResult
      blnResult = False
      if len( styleEx_Value ) > 0 then
            select case lcase(connectorEnd2Check)
                  case gcStrTARGET_END
                        strTargetPrefix = "LFEP="
                  case gcStrSOURCE_END
                        strTargetPrefix = "LFSP="
                  case else
                        msgbox "reClassLibrary.IsConnector_LinkedToFeature - Expected value of 'target' or 'source'"
            end select
            'Search for start of Target GUID
            iStartPosOfGUID = instr( styleEx_Value, strTargetPrefix )
            if iStartPosOfGUID > 0 then
                  blnResult = True
                  targetFeaturedGUID  = mid( styleEx_Value, iStartPosOfGUID + len( strTargetPrefix ), gcEA_GUID_LENGTH )
            end if
      end if
      IsConnector_LinkedToFeature= blnResult
end function

ANYONE interesting in SBV & SBVR give me a holler!  :)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11852
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connector.StyleEx - LinkedToElementFeature
« Reply #1 on: July 11, 2013, 04:13:24 pm »
Cool, I've been working on these linkedfeature stuff as well recently in order to make them available in the EA Navigator.

Here the important part in my code ConnectorWrapper.cs

Code: [Select]
   private UML.UMLItem getLinkedFeature(bool start)
    {
          string styleEx = this.wrappedConnector.StyleEx;
          string key;
          UML.UMLItem linkedFeature = null;
          
               if (start)
               {
                key = "LFSP=";
               }else
               {
                     key = "LFEP=";
               }
               int guidStart = styleEx.IndexOf(key) + key.Length ;
               if (guidStart >= key.Length)
          {
                string featureGUID = styleEx.Substring(guidStart,this.WrappedConnector.ConnectorGUID.Length);
                linkedFeature = this.model.getItemFromGUID(featureGUID);
          }
          return linkedFeature;
    }

You see it in action in the next version of the EA Navigator :EANavigator_Setup_v2.4.4.0_beta.msi

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11852
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connector.StyleEx - LinkedToElementFeature
« Reply #2 on: March 31, 2017, 05:10:00 pm »
ANYONE interesting in SBV & SBVR give me a holler!  :)
David,

I'm interested in SBVR. Whatever you have will be very welcome.

Thanks

Geert

Helmut Ortmann

  • EA User
  • **
  • Posts: 953
  • Karma: +41/-1
    • View Profile
Re: Connector.StyleEx - LinkedToElementFeature
« Reply #3 on: April 03, 2017, 04:27:14 pm »
Hi David,

could you please elaborate a bit on SBVR (Semantics of Business Vocabulary and Business Rules) and your experiences.

Thanks a lot!

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11852
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connector.StyleEx - LinkedToElementFeature
« Reply #4 on: April 04, 2017, 04:30:19 pm »
Hi David,

could you please elaborate a bit on SBVR (Semantics of Business Vocabulary and Business Rules) and your experiences.

Thanks a lot!

Helmut

I'm afraid David is MIA, I've tried all communication means I could think of but no word from him yet.

I'll let you know if I hear from him.

Geert