Book a Demo

Author Topic: Get All Latest Via Automation Interface - JAVA  (Read 4998 times)

perry

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Get All Latest Via Automation Interface - JAVA
« on: August 27, 2009, 05:35:21 am »
Is there a way to perform the equivalent of a "Get All Latest" via the automation interface?

Manually, the process is:
    1. Open EA
    2. Open The Project
    3. Right click the top level ("Model" in my case)
    4. Highlight Package Control
    5. Select Get All Latest

Steps 1 and 2 are no problem, I just need some help with automating the rest.

Thanks

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Get All Latest Via Automation Interface - JAVA
« Reply #1 on: August 27, 2009, 04:34:32 pm »
I don't think there is a getAllLatest command in the API.
There are however two workarounds that you can use:
1:
- Programmatically connect to the VC and download the latest version into your working folder.
- Use the Project Interface.LoadControlledPackage to get the latest version of your packages

2:
- Loop over all version controlled packages and perform a Package.VersionControlCheckout and a Package.VersionControlCheckin

Geert

perry

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Get All Latest Via Automation Interface - JAVA
« Reply #2 on: August 28, 2009, 03:32:39 am »
Thanks for the suggestions.
I haven't quite got it yet...

For now I am having another user add a package to the model, and trying to automatically update my project so that I can see the new package (as well as any changes that may have been made to the pre-existing packages)

Using the first workaround you listed:
I can execute "svn update" from the from the command line via JAVA no problem. (if i show the output, i can see that the new package (test.xml) is being added - so I know that it has been downloaded fom the server)
Then I tried to run a Project Interface.LoadControlledPackage - passing in the ProjectGUID as the argument. This didn't work. When I open EA manually and load the project, the new Package ("Test") is not there.. As soon as I right-click Model (the top level in my project browser) and do a 'Get All Latest', Test shows up just fine.

Any suggestions?

Thanks a lot,

Perry

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Get All Latest Via Automation Interface - JAVA
« Reply #3 on: August 28, 2009, 03:47:49 pm »
Quote
2:
- Loop over all version controlled packages and perform a Package.VersionControlCheckout and a Package.VersionControlCheckin