The SVG output is not suitable yet for publication, but I have a lot of 
text-based output someone may find useful. It is large, about 1.6Mb, and 
contains some command line characters for bold-face formatting, so I'm thinking 
it'll just get stripped if I attach it and send it to this list. If interested 
in that I could upload it somewhere or email it somewhere which might not strip 
it...I would need to know where.
 
Eventually I'm hoping to read the input XML files and be able to relate the 
output tables and keys to specific XML files. This is a long way off.
 
----- Original Message -----From: Paul Foxworthy <p...@cohsoft.com.au>To: 
user@ofbiz.apache.orgSent: Sun, 28 Jan 2018 02:24:33 -0000 (UTC)Subject: Re: 
loadDefault Source Code

Hi stimits,

Can you contribute the results of your research?

There are data model diagrams 
athttps://cwiki.apache.org/confluence/display/OFBIZ/Data+Model+Diagrams, 
butAFAIK they don't give chains of foreign key dependencies.

Some entities have self-related parent-child relationships, so you need toload 
parents before children within the data for one entity.

Cheers

Paul Foxworthy

On 24 January 2018 at 11:37, <stim...@comcast.net> wrote:

> Hi,>> Thanks, I think this is what I need. I wrote an application which 
> diagrams> PostgreSQL databases and creates SVG maps of table pk and fk> 
> dependencies...it graphically shows what needs to be modified in which> order 
> versus primary/foreign key dependencies. I'm thinking of ways to> extend it 
> to basically click on a table or key icon and have it locate not> only the 
> key dependencies of the database, but also the XML file providing> that data. 
> Not sure yet I can do it, but this is promising. I'll try to use> the 
> hot-deploy with various versions of the component-loader XML files to> 
> test.>> ----- Original Message -----From: Mike <mz4whee...@gmail.com>To: user 
> <> user@ofbiz.apache.org>Sent: Wed, 17 Jan 2018 07:39:02 -0000 (UTC)Subject:> 
> Re: loadDefault Source Code>> Here is the sequence as I understand it.>> 
> Ofbiz first loads: ./framework/base/config/component-load.xml, which has:>> 
> <load-components parent-directory="framework"/> <load-components> 
> parent-directory="themes"/> <load-components 
> parent-directory="applications"/>> <load-components 
> parent-directory="specialpurpose"/> <load-components> 
> parent-directory="hot-deploy"/>>> That is the INITIAL sequence. It takes the 
> first one (framework), andlooks> for component-load.xml... i.e:>> 
> ./framework/component-load.xml>> Reads it, gets the "order" for all framework 
> items... Example:>> <load-component component-location="base"/> 
> <load-component> component-location="entity"/> <load-component 
> component-location="security"/>> <load-component 
> component-location="datafile"/> <load-component> 
> component-location="minilang"/> <load-component> 
> component-location="common"/> <load-component> component-location="service"/> 
> <load-component> component-location="catalina"/> <load-component> 
> component-location="entityext"/> <load-component> 
> component-location="webapp"/> <load-component component-location="widget"/>> 
> <load-component component-location="testtools"/> <load-component> 
> component-location="webtools"/> <load-component> 
> component-location="images"/>>> THAT is the order, in framework, that data is 
> loaded.>> Then, for EACH of the above items in framework (i.e. "base), in> 
> sequence,reads "ofbiz-component.xml"... Example:>> 
> framework/common/ofbiz-component.xml>> Then, if ofbiz-component.xml has 
> "reader-name(s)" entries, as below:>> <entity-resource type="model" 
> reader-name="main" loader="main"location="entitydef/entitymodel.xml"/>> 
> <entity-resource type="data" reader-name="seed" loader="main"location="data/> 
> CommonSecurityPermissionSeedData.xml"/>>> Ofbiz will load the data, as 
> specified by the reader-name, as specified> onyour ant/gradlew command line. 
> By default, the reader-name(s) are> "demo","main", "seed", and 
> "seed-initial".>> You can (and should) create your OWN "reader-name(s)" for 
> your> ownparticular purpose, but that should ONLY be done in "hot-deploy", 
> which> isthe absolute LAST item in:>> 
> ./framework/base/config/component-load.xml>> Don't try to mess with ANY of 
> these default ordered items. There> aredependencies to be followed, and 
> errors will surely follow.>> What you probably want to do (like everyone else 
> does), is load:>> ./ant load-readers "-Ddata-readers=seed,seed-initial" (or 
> the> equivalentgradlew command)>> Which creates a boot-strapped ofbiz... 
> Operational, but empty...> Waitingfor customization.>> Create a sub-directory 
> in "hot-deploy", place your custom data there,> andload in YOUR sequence, as 
> defined in:>> hot-deploy/mydata/ofbiz-component.xml>> That is how everyone 
> loads custom data after seed,seed-initial.>>>> On Tue, Jan 16, 2018 at 12:17 
> PM, Taher Alkhateeb <> slidingfilame...@gmail.com> wrote:>> > Okay so the 
> order of loading data is by component and reader type.>> Component loading 
> order is determined in the related XML files and reader>> loading is defined 
> as per the entityengine configuration loading order>> which goes from seed 
> all the way to ext-demo as I remember it. Now if you>> want to go beyond that 
> (it would be strange if you want to know the exact>> file-by-file sequence) 
> then you'll need to investigate.>> You know it would> be easier instead of me 
> answering you piece by piece to> actually explain> your problem because there 
> might be solutions. If not,> then please go> ahead and read the code at the 
> EntityDataLoadContainer.java> and best of> luck.>> On Jan 16, 2018 10:20 PM, 
> <stim...@comcast.net> wrote:>> The> trouble with that is I'm interested in 
> dumping the logic of how the> load> order is determined specifically with the 
> loadDefault. If there were a>> command such as "./gradlew --explain 
> loadDefault", where it verbosely> named> which file is chosen, what kind of 
> sorting is used, and what it was> doing> with each, then this would work. 
> This is why I wanted to see the> code> actually step through loadDefault...I 
> want to know how it actually> makes> the choices, and perhaps write something 
> to help with> generation/load of my> own test cases (I'm hoping to actually 
> learn> something).>> ----- Original Message -----From: Taher Alkhateeb <>> 
> slidingfilame...@gmail.com>To: user@ofbiz.apache.orgSent: Tue, 16 Jan> 2018> 
> 18:50:59 -0000 (UTC)Subject: Re: loadDefault Source Code>> Okay so in> this 
> case my recommendation is to skip looking at the sourcecode> and> instead 
> learn the syntax for loading data. ./gradlew "ofbiz--help" and>> README.md 
> are good sources for that. There you will find plentyof options>> for loading 
> data including specifying readers, components,files,>> directories etc ...>> 
> On Jan 16, 2018 9:15 PM, <stim...@comcast.net>> wrote:>> > I am interested in 
> how the list of files is chosen, along with> the rules>> for order of 
> choosing. I am thinking of custom loading for my> own testing,>> but mostly I 
> just feel I need to better understand what the> "All" of>> "loadAll" is.>> 
> ----- Original Message -----From: Jacques Le> Roux <>> 
> jacques.le.r...@les7arts.com>To: user@ofbiz.apache.orgSent: Tue,> 16 Jan>> 
> 2018 07:11:45 -0000 (UTC)Subject: Re: loadDefault Source Code>> I> agree,> 
> maybe you can try starting from ContainerLoader.java>> Jacques>>> Le> 
> 16/01/2018 &agrave; 07:48, Taher Alkhateeb a &eacute;crit :>>> loadDefault> 
> translates to loading all data sets (seed,seed-initial,>>> demo,ext, etc> 
> ...)>> The code for that is big and scattered in many>> different places> 
> because a> lot of things happen during data load (SAX>> parser, DOM> 
> modeling, DB> translations, and a lot more). So it depends on>> what you are> 
> looking for> and perhaps more importantly, why>> On Jan 16,>> 2018 4:05 AM,> 
> <> stim...@comcast.net> wrote:>>> Hi,>>>> I guess what I>> should do is> 
> rephrase...if I wanted to run this under a>> debugger and> get> a stack> 
> frame (which I'm not actually set up to do), where>> would I> find> the> 
> source code which specifically understands which XML files>> to> read> and> 
> load for loadDefault? The build.gradle is more of a> declaration>> and> not> 
> so much the actual source code, and I'm more of a> C++ guy (I do ok>>> with> 
> Java, but I don't know the web toolkits and> APIs).>>>> ----- Original>> 
> Message -----From: gil portenseigne <>>> gil.portensei...@nereide.fr>To:>> 
> user@ofbiz.apache.orgSent: Mon, 15> Jan>> 2018 08:10:30 -0000>> 
> (UTC)Subject:> Re: loadDefault Source Code>>>>> Hello,>>>> You will find> 
> loadDefault task> implementation within the file> build.gradle>> at OFBiz> 
> root directory.> (see line 320)>>>> Regards,>>>>> Gil>>>> On 14/01/2018> 
> 22:18,> stim...@comcast.net wrote:> This is> probably a naive>> question,> 
> but on> 16.11.04 I am searching for the> actual code which runs for>> the>> 
> "loadDefault" part of:> ./gradlew> loadDefault> > I'm looking for what I>>>> 
> might edit to create my own> version of loadDefault after observing what>> 
> the>> existing loadDefault> actually executes. I see some shell scripts>> 
> passing>> this on, and> suspect this is part of one of the jar files, but>> 
> was unable>> to find> the actual code.> > Thanks!>>>>>>>>



-- Coherent Software Australia Pty LtdPO Box 2773Cheltenham Vic 3192Australia

Phone: +61 3 9585 6788Web: http://www.coherentsoftware.com.au/Email: 
i...@coherentsoftware.com.au

Reply via email to