TeamServer/Open API and continuous build

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

TeamServer/Open API and continuous build

Postby Gilles Di Guglielmo » Wed Jan 31, 2007 7:42 am

I'm trying to integrate an UML model in a continuous integration build: i would
like to extract a team server project (MD12) to an XMI file through ANT tasks or
java.Main.

The process require to be fully headless and lunched as a cron script.
Any idea, contributions or experiences to share ?

Regards,
Gilles
Gilles Di Guglielmo
 
Posts Rating:

Re: TeamServer/Open API and continuous build

Postby Martynas Lelevicius » Thu Feb 01, 2007 4:33 am

Hello Gilles,

It is possible to retrieve project from TeamworkServer and save it to XMI without user input, but X server will be required in any
case.

Regards,
--
Martynas Lelevicius
Programmer
No Magic Lithuanian Development Center
Savanoriu pr. 363, LT-49425, Kaunas
P.O. box 2166, LT-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail : marte
WWW: http://www.magicdraw.com

Martynas Lelevicius
 
Posts Rating:

Re: TeamServer/Open API and continuous build

Postby Gilles Di Guglielmo » Thu Feb 01, 2007 8:33 am

Hy Martynas,

Do you have any code sample, doc pointer on the topic. I hope to implement that
quickly.

I have read the doc about MD12 OpenAPI & teamserver, and there is nothing to
help me.

Is there any command line tools to checkout some XMI contents, shipped in the
teamserver installation ?

Thanks for your help.

Gilles
Gilles Di Guglielmo
 
Posts Rating:

Re: TeamServer/Open API and continuous build

Postby Martynas Lelevicius » Fri Feb 02, 2007 4:51 am

Hi,

The following code saves teamwork project (modules are not saved).

Application app = Application.getInstance();
app.start(false, true, false, args, null);

try
{
String remoteName = "remoteProjectName";
ProjectDescriptor projectDescriptor = TeamworkUtils.getRemoteProjectDescriptorByName(remoteName);
ProjectsManager projectsManager = app.getProjectsManager();
projectsManager.loadProject(projectDescriptor, true);

Project project = app.getProject();
if (project != null)
{
ProjectDescriptor localProjectDescriptor = ProjectDescriptorsFactory.createLocalProjectDescriptor(project, new
File("e:\testTW.mdzip"));
projectsManager.saveProject(localProjectDescriptor, true);
}
}
catch (RemoteException e)
{
e.printStackTrace();
}

app.shutdown();


Before executing this code, you should start MD login to the required Teamwork Server (in the login dialog select "Auto login to
server") and exit.

Regards,
--
Martynas Lelevicius
Programmer
No Magic Lithuanian Development Center
Savanoriu pr. 363, LT-49425, Kaunas
P.O. box 2166, LT-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail : marte
WWW: http://www.magicdraw.com

Martynas Lelevicius
 
Posts Rating:

Re: TeamServer/Open API and continuous build

Postby Gilles Di Guglielmo » Fri Feb 02, 2007 11:44 am

Thanks a lot for the code,

It seems not very clean to have to install Magicdraw, run it a first time and
launch my build process with a display on my nightbuild server.

It could be very usefull to simply use an ant task, that allows to specify
- login/password
- project/revision
- server hostname
- output format like UML1.4, UML2, EMF
- output filename
- the ouput XMI should broke the various references to the teamserver project
and unlocked all the elements.

The ant task should be runnable without any MD installation (the task could be
delivered with the team server installation).

Regards

Gilles
Gilles Di Guglielmo
 
Posts Rating:

Re: TeamServer/Open API and continuous build

Postby Juergen Weismueller » Mon Feb 05, 2007 12:41 pm

Gilles Di Guglielmo wrote:
> It could be very usefull to simply use an ant task, that allows to specify
> [...]

Hello,

this would be very nice - and I think if Magicdraw wants to be a real
good MDA-supporting competitor with its tool, this is one of the first
function which is needed.

Another is (e.g.) a better model-validation-support.

I have given up to trigger the magicdraw-export automatically. Let it be
the the user-interactive part in your build-process. In our project, the
generator-run is also user-interactive - there are too many problems and
pitfalls to handle it automatically.

Regards,
Juergen Weismueller
Juergen Weismueller
 
Posts Rating:

Re: TeamServer/Open API and continuous build

Postby Andrius Strazdauskas » Tue Feb 06, 2007 4:51 am

Gilles,

currently it is not possible. We will consider your request as
possibility for future improvements.
From MagicDraw 12.5 (June) you will be able store teamwork projects in
Subversion and Clearcase repositories. They probably have a better
OpenAPI, so this brings one more possible solution to your issues.

Best regards,

--
Andrius Strazdauskas
Product Research and Development Manager
No Magic Lithuanian Development Center
Savanoriu pr. 363, LT 49425 Kaunas
Phone: +370 37 705889 Fax: +370 37 320670
E-mail: andriuss
WWW: http://www.magicdraw.com
--
MagicDraw - Architecture Made Simple



nntp://news.nomagic.com/nomagic.products.magicdrawuml.openapi wrote:
> Thanks a lot for the code,
>
> It seems not very clean to have to install Magicdraw, run it a first
> time and launch my build process with a display on my nightbuild server.
>
> It could be very usefull to simply use an ant task, that allows to
> specify
> - login/password
> - project/revision
> - server hostname
> - output format like UML1.4, UML2, EMF
> - output filename
> - the ouput XMI should broke the various references to the
> teamserver project and unlocked all the elements.
>
> The ant task should be runnable without any MD installation (the task
> could be delivered with the team server installation).
>
> Regards
>
> Gilles
>
>

Andrius Strazdauskas
 
Posts Rating:


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 1 guest