Book a Demo

Author Topic: Cloning structure of root node to seconary node  (Read 3786 times)

MeX

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Cloning structure of root node to seconary node
« on: September 23, 2010, 03:00:29 am »
I ask you for help with following: we need to create clone of our root node  tree (Model) cloning this tree to create a new root Model (node) in one (Oracle 11 DB) repository. How we can achieve this task?

Existing structure:
+ROOT_NODE
++ Some
+++ Package1
+++ Package2
+++ Package3
++ Structure
+++ Package4
++ Tree
+++ Package5

Requested (new) structure:
+ROOT_NODE
++ Some
+++ Package1
+++ Package2
+++ Package3
++ Structure
+++ Package4
++ Tree
+++ Package5
+ROOT_NODE_copy
++ Some
+++ Package1
+++ Package2
+++ Package3
++ Structure
+++ Package4
++ Tree
+++ Package5

Packages names and content (packages, diagrams, connectors etc.) must be same name and also relations must fit.

There is option in export/import dialog to strip GUIDs, but we can not use this facility due to very complex structure of this tree and it will take weeks to do this task "manually".

Please help. Thanks.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Cloning structure of root node to seconary nod
« Reply #1 on: September 23, 2010, 08:38:27 am »
The answer I would recommend is strip guids.  Why does your structure prevent that from being used?

The only other alternative I see is to use automation to duplicate everything.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Cloning structure of root node to secondary no
« Reply #2 on: September 23, 2010, 10:28:19 am »
Quote
The answer I would recommend is strip guids.  Why does your structure prevent that from being used?
[size=18]...[/size]
Hi Mex,

Simon is absolutely right!  Did you try stripping GUID and it failed?  If so - you've found a bug and it needs to be reported and fixed immediately!

This functionality is crucial to a lot of operations within EA and so it needs to work properly.

I have to admit in my 6 years of EA usage and using this functionality often, I've never had a problem with it.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

MeX

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Cloning structure of root node to seconary nod
« Reply #3 on: September 23, 2010, 04:07:39 pm »
There is no problem to strip GUIDs, but this operation can take weeks. There is problem to export large structures with export facility due to some Oracle DB errors like "Maximum expressions in list is 1000" (or very similar error message). So this could be done only by multiple export and multiple imports which means, in our case, lot of work, seriously it can take weeks. So I'm looking to find some way how to avoid this. There is operation "copy structure to clipboard", but paste operation does not work in this case as I want to copy whole structure and paste it to secondary node.

Could you please advice how to automate this task to avoid manual export/import? Thanks.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Cloning structure of root node to secondary no
« Reply #4 on: September 23, 2010, 04:18:02 pm »
Hi MeX,

You probably have other issues with your repository.   How many packages/elements do you have?

Have you tried a Tools|Data Management|Project Integrity Check... [Shift+F9]?

You should never attempt any large scale operation without having EA check that everything is OK.

If your repository is OK and you still have problems, try to transfer the project to an .EAP file, using Tools|Data Management|Project Transfer.  You should be able to export/re-import from there.  Once you've exported, you can try importing back to the Oracle Repository and if that fails, re-import to the EAP then transfer back...

I know it's a bit long winded, but I'm pretty sure there's other stuff going on - your experience is NOT common.

HTH,
Paolo
« Last Edit: September 23, 2010, 04:19:14 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Cloning structure of root node to seconary nod
« Reply #5 on: September 23, 2010, 04:35:11 pm »
Mex,

What you could try is a project transfer to a local eap file, import export there to to duplicate the folder structure, and then transfer the project back to Oracle.
This means however that you can't work on the oracle model why you are doing this, as the project transfer will destroy the Oracle repository.

Another option is to automate the export/import of each package individually.
The Project Interface contains operations
ExportPackageXMI (string PackageGUID, enumXMIType XMIType, long DiagramXML, long DiagramImage, long FormatXML, long UseDTD, string FileName)
and
ImportPackageXMI (string PackageGUID, string Filename, long ImportDiagrams, long StripGUID)

So calling those in the correct order should result in the required duplicate.

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Cloning structure of root node to secondary no
« Reply #6 on: September 23, 2010, 04:38:34 pm »
Quote
I know it's a bit long winded, but I'm pretty sure there's other stuff going on - your experience is NOT common.
Paolo,

I think this is a rather common issue with Oracle repositories. I remember having the same type of issues when I was working with Oracle repositories a few years ago. (My current client uses SQL Server, so I don't know if there was any progress with the Oracle issues).
But of course it can't hurt to do a project integrity check anyway.

Geert

MeX

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Cloning structure of root node to seconary nod
« Reply #7 on: September 25, 2010, 01:16:07 am »
Attached are outputs from try to transfer from DBMS to EAP file. Just before and after transfer operation I try to do consistency check and you can see that there are no errors. So this option is not an option.

http://imgupload.sk/viewer.php?file=99996181894073438358.png
http://imgupload.sk/viewer.php?file=87045555987062083197.png

Please see also repo-size:
http://imgupload.sk/viewer.php?file=54414125522133476924.png
« Last Edit: September 25, 2010, 01:35:23 am by mex »