3 Replies Latest reply on Oct 4, 2013 3:36 PM by AGM

    How to embed the defined domains into a design?


      Hello everyone,

      I'm working on a design that is in SVN and that initially was not using domains.

      I created some domains in my defaultdomain.xml, changed some fields to use to these new domains, saved the project and commit to svn the changes.


      But when a colleague did the project checkout  these fields appear with the data type "Unknow".

      I've had to share my defaultdomain.xml file to import the domains on his PC.


      Searching the forum found this post:

      Unable to create new domain file https://forums.oracle.com/message/11116239#11116239

      Basically you should

      1. Create /datamodeler/types/defaultdomains.xml if it already does not exists

      See Tutorial: Data Modeling for a Small Database

      2. Create (open) some design and import domains file from File->Import->Domains

      3. After design is saved new directory /domains with design level domains file inside design tree will be created

      I did these steps but in my case, the step 3 doesn't happen: I checked the project folder and I see no new /domains directory created inside the design tree, so the design does not embeds the domains in the SVN project.


      I do not know if I'm doing something wrong but I suppose yes because does not seem very practical to share the domains file to each member of the dev team.

      Some idea of why when I import the domains file (the same that already I have in defaultdomain.xml) these are not embedded into the design?



        • 1. Re: How to embed the defined domains into a design?



          Did you have the checkbox 'Import in default domains' unchecked during the import of the design?

          Maybe you start first without a SVN based project. Create new project, import domains file, save design to file system, check directory contents.

          This works for me without problems.



          • 2. Re: How to embed the defined domains into a design?
            Kent Graziano

            I found that when using SVN when you first put the model under version control, you have to follow the steps in the video exactly or the domain file does not end up in the versioned directory (and therefore will not get saved to SVN where other can then see it.)


            Since you created domains after the design was versioned, it may be that the domain file is not saved in the right place. Here is what to check:


            1. Go to Tools -> Preferences ->Data Modeler

            2. Check the property "Default System Types Directory"

            3. Is it pointing to the local directory where your versioned design is saved? (if it is not then set that directory and try again)

            4. If it is, then go to View -> Team -> Versioning Navigator and drill into the repository folder that holds the versioned design. Is the defaultdomains.xml file there?

            5. If it is, then when the other developers check out, it will go to there local versioned directory. They may need to set then "Default System Types Directory" to look there (that was the problem my team had)


            Now the issue we have is that we have multiple designs each with their own domain file (not ideal). Each design has a different local directory so we have to remember to rest the default systems directory every time we open a different design.


            Hopefully this will give oyu some clues to diagnose the issue. Once it is setup right, change to your domain file will get saved back to SVN as Outbound Change , then the other developers will see those when they open the design next time.

            1 person found this helpful
            • 3. Re: How to embed the defined domains into a design?

              Thanks Kent  for the help, I've been checking what you suggested and the file was not created.

              Even doing what was suggested by the user13430807 (the checkbox 'Import in default domains' unchecked during the import to the design) also not solved.


              But with your suggestions reminded that the application could have a validation of the names for imported domains, and if they existed in the defaultdomains.xml were not imported into the design (even with the checkbox uncheked).


              So the step 3 in may case doesn't happen because the names coincide with those already in default domains file, and therefore the domain file does not end up added in the versioned directory.


              The way that I solve it was:

              1. Copy the file defaultdomains.xml that contains all domains that I've created and are in use to another folder, renaming as myDomains.xml.
              2. Close the design. Go to Tools -> Domain Administration, remove all the domains that I have created and save.
              3. Open the design and go to Import -> Domains, select the myDomains.xml and import (the option "Import in default Domains" is unchecked)
              4. Save the project.
              5. The application automatically creates and adds to svn the folder /domains with the myDomains.xml file inside.
              6. Close and reopen the design in order the tables display correctly the columns using these domains.


              A minor issue was add the new domain folder to svn, the 4EA2 gives an error about it, but using tortoise was added without major problems. This error seems be the same already reported in https://forums.oracle.com/thread/2588157 .


              It was not necessary to change the directory for default  domains, I will check with another team member but I think this will solve the issue that Kent indicated about multiple designs, indeed I need to do more tests.


              Thanks for the help.