Book a Demo

Author Topic: Automating export of a new baseline of a package  (Read 4995 times)

Luc De Graef

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Automating export of a new baseline of a package
« on: October 16, 2012, 08:37:19 pm »
Hello,
I am able to create a new baseline for a package by means of the API.

        repository.GetProjectInterface().CreateBaseline(childPackage.GetPackageGUID(), aVersion, aNote);

Is there an API foreseen to export that specific baseline?

Regards
Luc

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Automating export of a new baseline of a packa
« Reply #1 on: October 16, 2012, 11:44:01 pm »
I don't think there's something to export that baseline, but if you would export the package to xmi, wouldn't that have the same endresult?

If not, there have been a couple of posts lately about exporting/importing baselines. It includes getting the blob from t_document, base64 decoding, and then unzipping it.


Geert

Luc De Graef

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Automating export of a new baseline of a packa
« Reply #2 on: October 17, 2012, 01:06:40 am »
Hello,
When exporting an XMI directly, and from a baseline, the 2 XMI files differ  in size (14.136 KB against 28.272KB) but this is probably some single/double byte difference.
Upon comparing however, there are some 50 differences, most of them a couple of bytes are differing inside some 'binary' clause.

I can indeed use SQL to detect the baseline...
"select  BinContent from dbo.t_document where DocType = 'Baseline'and elementId = '" + childPackage.GetPackageGUID() + "'";


I assume you refer to the forum entry: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1348532739

But it is a pity that one needs to create a JDBC connection to the SQL Server (with Windows Authentication) specifically for that one action.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Automating export of a new baseline of a packa
« Reply #3 on: October 17, 2012, 01:53:46 am »
You can issue the select statement via Repository.SQLQuery(sql). No need for ODBC connections.

q.

Luc De Graef

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Automating export of a new baseline of a packa
« Reply #4 on: October 17, 2012, 02:09:56 am »
Great,
This is what I was hoping for.
Thx to query and Geert.