Connector inheritance problem

Hi,

I got problems with connector inheritance (i'm using the RTM bits).

Suppose I start from the Task Flow template.

I add a connector MasterConnector that becomes the base class for the CommentConnector.

When I create an instance of the CommentConnector (I associate a comment to a task), save the diagram and reopen it, the instance of the CommentConnector has doubled (two lines appear instead of one).

Has anybody noticed the same problem

Thanks!

Mike



Answer this question

Connector inheritance problem

  • nishanttheone

    Thanks for the patient.

    I think i can repro it right now. The key point here (for my case) is - i have to save and close the diagram, then reopen it, move the shape around.

    I will look into it and get back to you.

    Thanks,

    -Yu



  • davidacoder

    Did you hit Tranform Text Templates before debugging the DSL

    Also, you have to move the Task Shape to make the second connector appear.

    Mike


  • ivanchain

    Mike,

    Just make sure what I was trying are correct.

    1. Create a new DSL using Task Flow template

    2. In the DSL designer, add a new connector and make it the base class of CommentConnector

    3. Hit F5 to debug the DSL

    4. In the exp hive, open the diagram file, create a task shape, and a comment shape, then connect them with CommentConnector

    5. Save the diagram file, close and reopen

    In my case, the line is still one. Is there anything I missed

    Thanks,

    -Yu



  • Seb.Net

    You are correct. Because in the workaround, we map the relationship to the base connector. But if the base class is abstract, we are not allowed to do this.

    Thanks,

    -Yu



  • AlexBB

    This is a product bug, we will try to fix it in the next release.

    In the meantime, here is one workaround -

    1. After creating the inheritance (of CommentConnector), map your base connector to relationship in the dsl designer. Yes, map it to the same relationship as derived class.

    2. Transform.

    3. Build the solution and will see an error message.

    4. Double click the error message, it will take you to the probelmatic code in Diagram.cs, and change it to -

    DslDiagrams::LinkShape newShape = new CommentConnector(this.Partition);

    Then you should be able to launch the target designer in exp hive and make it work normally.

    Thanks,

    -Yu



  • Marcos Rivilla

    Try this:

    1. Create a new DSL using Task Flow template

    2. In the DSL designer, add a new connector and make it the base class of CommentConnector

    3. Hit Transform Text Templates and F5 to debug the DSL

    4. In the exp hive, open the diagram file, create a task shape, and a comment shape, then connect them with CommentConnector

    5. Save the diagram file and close it

    6. Open the .diagram file, it should look like this:

    < xml version="1.0" encoding="utf-8" >
    <flowDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.5" isCompleteView="false" name="Test">
      <flowGraphMoniker name="/" />
      <nestedChildShapes>
        <actorSwimLane Id="113a2bb0-f1d3-49bf-980f-c0051bf48a9f" absoluteBounds="0, 0, 11, 8.5">
          <actorMoniker name="//Actor1" />
          <nestedChildShapes>
            <taskShape Id="65e6886b-f830-4649-9f8e-a56f6d8f9dcd" absoluteBounds="1.125, 1.25, 1.25, 0.375">
              <taskMoniker name="//Actor1/Task1" />
            </taskShape>
          </nestedChildShapes>
        </actorSwimLane>
        <commentBoxShape Id="70ce3bd1-4bad-40a0-a24c-95f36f915bb5" absoluteBounds="1.25, 2.5, 1.5, 0.25">
          <commentMoniker Id="1d44d63a-4d6c-4d13-a458-8eda88ca6a4e" />
        </commentBoxShape>
        <commentConnector edgePoints="[(1.8125 : 2.5); (1.8125 : 1.625)]" manuallyRouted="false" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="f53d6960-1bc1-4858-91ad-aa78b5324e62">
          <nodes>
            <commentBoxShapeMoniker Id="70ce3bd1-4bad-40a0-a24c-95f36f915bb5" />
            <taskShapeMoniker Id="65e6886b-f830-4649-9f8e-a56f6d8f9dcd" />
          </nodes>
        </commentConnector>

      </nestedChildShapes>
    </flowDiagram>

    7. Reopen the diagram and move the task shape a bit to make the diagram dirty and save it again.

    8. Reopen the .diagram file. In my case, it looks like this (notice the two connectors):

    < xml version="1.0" encoding="utf-8" >
    <flowDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.5" isCompleteView="false" name="Test">
      <flowGraphMoniker name="/" />
      <nestedChildShapes>
        <actorSwimLane Id="113a2bb0-f1d3-49bf-980f-c0051bf48a9f" absoluteBounds="0, 0, 11, 8.5">
          <actorMoniker name="//Actor1" />
          <nestedChildShapes>
            <taskShape Id="65e6886b-f830-4649-9f8e-a56f6d8f9dcd" absoluteBounds="1.25, 1.25, 1.25, 0.375">
              <taskMoniker name="//Actor1/Task1" />
            </taskShape>
          </nestedChildShapes>
        </actorSwimLane>
        <commentBoxShape Id="70ce3bd1-4bad-40a0-a24c-95f36f915bb5" absoluteBounds="1.25, 2.5, 1.5, 0.25">
          <commentMoniker Id="1d44d63a-4d6c-4d13-a458-8eda88ca6a4e" />
        </commentBoxShape>
        <commentConnector edgePoints="[(1.875 : 2.5); (1.875 : 1.625)]" manuallyRouted="false" fixedFrom="Algorithm" fixedTo="Algorithm">
          <nodes>
            <commentBoxShapeMoniker Id="70ce3bd1-4bad-40a0-a24c-95f36f915bb5" />
            <taskShapeMoniker Id="65e6886b-f830-4649-9f8e-a56f6d8f9dcd" />
          </nodes>
        </commentConnector>
        <commentConnector edgePoints="[(2.25 : 2.5); (2.25 : 1.625)]" manuallyRouted="false" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="f53d6960-1bc1-4858-91ad-aa78b5324e62">
          <nodes>
            <commentBoxShapeMoniker Id="70ce3bd1-4bad-40a0-a24c-95f36f915bb5" />
            <taskShapeMoniker Id="65e6886b-f830-4649-9f8e-a56f6d8f9dcd" />
          </nodes>
        </commentConnector>

      </nestedChildShapes>
    </flowDiagram>

    I didn't add the second connector, it has been added automatically.

    Mike


  • Harish.A

    Yes, I did (and tried again in the same solution today). Seems i don't have too much luck here.

    Is there anything else special you did to this DSL

    Thanks,

    -Yu



  • Computer Guy69146

    Thanks for the workaround, it works fine!

    Just for your information, it doesn't work if the base class is abstract.

    Mike


  • Connector inheritance problem