Author Topic: Native XML Project Transfer API support  (Read 9452 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1078
  • Karma: +34/-2
    • View Profile
    • www.umlchannel.com
Native XML Project Transfer API support
« on: February 05, 2020, 10:47:38 pm »
It would be nice to add to the API Project Class a method to run the new Native XML Project transfer (export, import).
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


VK

  • EA Administrator
  • EA User
  • *****
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Native XML Project Transfer API support
« Reply #1 on: February 06, 2020, 08:38:25 am »
The method ExportProjectXML() in the Project class allows exporting an entire Project to Native XML.
But, currently, no such method exists for importing Project Native XML files.

Help Topic Page : https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/automation/project_2.html
« Last Edit: February 06, 2020, 08:40:49 am by VK »

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1078
  • Karma: +34/-2
    • View Profile
    • www.umlchannel.com
Re: Native XML Project Transfer API support
« Reply #2 on: February 06, 2020, 06:09:09 pm »
Interesting to know. I'll have to test it (I take it works with a Cloud connexion).
Hopefully an import method will be available soon.

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Guillaume

  • EA Practitioner
  • ***
  • Posts: 1078
  • Karma: +34/-2
    • View Profile
    • www.umlchannel.com
Re: Native XML Project Transfer API support
« Reply #3 on: March 08, 2021, 06:56:28 pm »
Hello,

Is there any plan to release the API method to run the Native XML import on a project?

Thanks
Guillaume
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7571
  • Karma: +94/-18
    • View Profile
Re: Native XML Project Transfer API support
« Reply #4 on: March 10, 2021, 08:44:43 am »
No. For the same reason the API doesn't allow you to transfer to an existing repository.
Eve

support@sparxsystems.com

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1078
  • Karma: +34/-2
    • View Profile
    • www.umlchannel.com
Re: Native XML Project Transfer API support
« Reply #5 on: March 10, 2021, 05:30:29 pm »
Hi Eve,

I was not aware of the limitation for the Project.ProjectTransfer method. Is there a technical reason that prevents this method from being used with a target DBMS?
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7571
  • Karma: +94/-18
    • View Profile
Re: Native XML Project Transfer API support
« Reply #6 on: March 11, 2021, 08:51:05 am »
No, it's a choice that we made that we didn't want a project being overridden completely through bad code.
Eve

support@sparxsystems.com

qwerty

  • EA Guru
  • *****
  • Posts: 12334
  • Karma: +347/-287
  • I'm no guru at all
    • View Profile
Re: Native XML Project Transfer API support
« Reply #7 on: March 11, 2021, 09:07:41 am »
Isn't that already possible?
Code: [Select]
repository.execute("delete from t_object")can be done by anyone.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7571
  • Karma: +94/-18
    • View Profile
Re: Native XML Project Transfer API support
« Reply #8 on: March 11, 2021, 09:37:03 am »
No, that's malicious code and still less damaging than what could be accomplished by reversing two arguments of ProjectTransfer (if it was allowed)
Eve

support@sparxsystems.com

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1078
  • Karma: +34/-2
    • View Profile
    • www.umlchannel.com
Re: Native XML Project Transfer API support
« Reply #9 on: March 17, 2021, 07:40:42 pm »
About the XML Native Transfer, would it be possible at least to provide the equivalent of the ProjectTransfer API support i.e. an API method to run the import onto a local file?

I'm working on a process that generates a public version of a EA project. The XML Native offers a great advantage e.g. to simply remove the EA security and locks by deleting 2 XML file before running the import.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Guillaume

  • EA Practitioner
  • ***
  • Posts: 1078
  • Karma: +34/-2
    • View Profile
    • www.umlchannel.com
Re: Native XML Project Transfer API support
« Reply #10 on: July 16, 2021, 03:48:10 pm »
A quick update on this thread: I wrote an article on Sparx Community site about a custom command line tool to achieve what I was looking for.

https://community.sparxsystems.com/community-resources/1403-import-native-xml-enterprise-architect-postgresql
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com