Author Topic: API: Baseline and XMI  (Read 5006 times)

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
API: Baseline and XMI
« on: October 31, 2012, 11:58:48 pm »
Hello,

You can understand from this code that I'm creating baselines, but the problem is I could not trace them. The designer's creating his package. This package contains other packages with diagrams. Designer makes changes, does baseline with my Addin option to create baseline, continues with his changes, wants roll them back and Oooops. How many baselines he's created? Where to find them?

myProject = rep.GetProjectInterface();
foreach (EA.Diagram curDiagram in selPackage.Diagrams)
{
    foreach (EA.DiagramObject curObject in curDiagram.DiagramObjects)
    {
         selElement = rep.GetElementByID(curObject.ElementID);
         if (String.Compare(selElement.Type, "Package", true) == 0)
         {
            baselineName = selElement.Name + DateTime.Now.ToLongTimeString();
           myProject.CreateBaseline(selElement.ElementGUID, baselineName, "");                              
          }//if
     }//foreach
}//foreach

baselineName = selPackage.Name + " " + DateTime.Now.ToLongTimeString();                myProject.CreateBaseline(selPackage.PackageGUID,baselineName,"");

I need a solution how to rollback to some point of changes. Let's say how to save different version of one package with rollback option. Keep in mind that package inside the other package it's very problematic because "subpackages" are used by many other users and they can do lots of changes also and "my designer" must have his version to rollback  :o.

Thank you in advance.

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: API: Baseline and XMI
« Reply #1 on: November 01, 2012, 12:04:26 am »
Forgot to mention, some one recommended to export package in .xmi, but it does not solve my problem, because I need the rollback option.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: API: Baseline and XMI
« Reply #2 on: November 01, 2012, 12:26:47 am »
OT: Just as a hint for your system architect: if rollback is so important then probably the design rules have flaws. Design should go only in one direction: the future.

q.

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: API: Baseline and XMI
« Reply #3 on: November 01, 2012, 12:31:30 am »
You are right, only future :) , but in my case, someone would like to go to the past  :-/.