Difference between pages "Lazy loading Trees" and "Libero EE01 Install Manual"

From ADempiere
(Difference between pages)
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(Testcases=)
 
 
Line 1: Line 1:
= Lazy loading Trees - Functional Specifications =
+
=Install Libero Manufacturing Entity Type EE01=
== Status  ==
+
<div style="float: left; margin-right: 10px; width: 100%;">
+
{| width="100%" cellspacing="0" cellpadding="5" border="1" style="font-size: 0.86em; line-height: 0.9em;"
+
|-
+
! style="width: 180px; color: rgb(255, 255, 255); background-color: grey;" | User, Date
+
! style="width: 170px; color: rgb(255, 255, 255); background-color: grey;" | Status
+
! style="width: 70%; color: rgb(255, 255, 255); background-color: grey;" | Description
+
! style="width: 50px; color: rgb(255, 255, 255); background-color: grey;" | Points
+
|-
+
| [[Benutzer:Mo|Mo]] 11:15, 17. Dec. 2012 (CEST)
+
| In Development
+
| First development iteration. Implementation of lazy loading tree nodes. Loading trees with some million nodes on several levels is now possible.There are still some todos in the current code.
+
| <br>
+
|-
+
| [[Benutzer:Mo|Mo]] 08:23, 20. Dec. 2012 (CEST)
+
| In Development
+
| Second development iteration. Cleaner code, buxfixes, improvements, more stability.
+
| <br>
+
|-
+
| [[Benutzer:Mo|Mo]] 11:42, 12. Jul. 2010 (CEST)
+
| Technical Team: Approval
+
| ... Further Information ...
+
| <br>
+
|-
+
| [[Benutzer:Mo|Mo]] 14:46, 23. Nov. 2010 (CET)
+
| Functional Team: Approval
+
| ... Further Information ...
+
| <br>
+
|-
+
| [[Benutzer:Ts|Ts]] 18:55, 26. Nov. 2010 (CET)
+
| Other Status ...
+
| ... Further Information ...
+
| <br>
+
|}
+
</div> <div style="clear: both;"></div>
+
  
== Contributors ==
+
=Manual Info=
This feature is contributed by [http://www.evenos.de evenos GmbH]
+
  
== Overview ==
+
Authors : [mailto:victor.perez@e-evolution.com Victor Perez]
Currently Trees in adempiere are implemented not very well. When a tree is loaded (e. g. via VTreePanel in the swing client or via ADTreePanel in the webui), the whole tree is loaded at once by MTree.java. With lazy loading, a tree should only load a node when it needs the node. This means, if only the first level of the tree is shown, the second level is not loaded now. Only if a first level node is opened, the second level nodes for only this node are loaded. Also most of the loading behaviour should be placed in the nodes itselfs or in the model, not in MTree.
+
Document Name: EE01 Libero Manufacturing Install Manual
 +
Version: 1.00
 +
Company: [http://www.e-evolution.com e-Evolution,SC]
 +
Status: Draft
 +
Document Date: 11/09/2007
  
== Purpose ==
 
The purpose for this development is simple: it's needed. Imagin a tree with 100 noded. Each node has 100 subnodes itself and each of the subnodes has again 100 subnodes. Together, in this tree there are 1,000,000 nodes. Adempiere would not only need to query the million nodes from the database, it also would need to create a million MTreeNode objects. This will probably take some time. In fact, if you try to create a tree like this and open it with adempiere, the swing client will be not responsive for several minutes. The webui will possible throw an error like "Java heap space".
 
  
In this feature, we will refactore the whole tree handling without losing functionality.
+
==Setup Environment==
  
== Miscellaneous ==
+
*[http://www.adempiere.com/wiki/index.php/ADempiere_Installing Install ADempiere]
Some parts of the tree functionality didn't work as expected. We fixed some of these issues including:
+
* after you ran RUN_setup.sh
*Removing sections from the Favourites Bar when no node is left in this section
+
* [http://adempiere.svn.sourceforge.net/viewvc/*checkout*/adempiere/branches/libero/2pack/EE01.zip EE01 Download]
*Show Tooltips with the node description when hovering with the mouse over a node
+
*Searching in Trees now makes use of the name AND the description of a node
+
*Dropping a node on one of its children or itself is not possible anymore
+
*Deleting a summary node moves all its children to its parent instead of removing the nodes from the tree. This is a better solution because otherwise there would be entries in the grid which never show up in the tree!
+
*Pasting the same node multiple times is not possible anymore because we clear the clipboard after the paste
+
*Moving a node now saves the correct seqno (see https://groups.google.com/forum/#!topic/idempiere/ETF7fymVZRM 2nd post)
+
  
== Design Considerations ==
+
==Create EE01 Entity Type ==
=== Assumptions ===
+
*A Node is loaded when it is needed
+
*No more loading the whole tree at once
+
*Cleaner code / responsibilities
+
*Cleaner seperation between Swing Client / Webui
+
  
=== Dependencies ===
+
Please go Entity Type Window and add new Entity Type as show into o the image:
None. This feature should work out of the box by replacing the changed files. There are no other/new dependencies.
+
  
=== Constraints ===
+
[[Image:entitytype.png|center]]
*There is some code which may only work with PostgreSQL (SQL: "with recursive...") which need some adjustment to work with oracle and mysql (probably in the "convert" classes).
+
*Searching in the tree is not top to bottom anymore but random due to the problem that we don't have the whole tree loaded which we can search from top to bottom
+
*A node can still be cut (ctrl+x) even if there is already a node in the clipboard. This causes the previous cutted node to disappear (till cache is resetted or user log out and in again which causes the tree to reload)
+
*A node can be dragged or pasted into trees of other windows
+
  
== Glossary ==
+
==Create the into InPack==
== Functional Requirements ==
+
There are no functional requirements. Just replace the changed files.
+
  
== Acceptance criteria  ==
+
*Create a new record as show into of the image
== QA and test cases ==
+
These Trees should work like before and as expected.
+
  
===Prerequisites===
+
[[Image:packin.png|center]]
First we need a really big tree so we can see what the problem is with the default behaviour compared to our lazy implementation. We decided to use the Organization since we don't need much information to create a tree there.
+
  
Run the following script on your database (PostgreSQL) to create to create a tree with 100 nodes each level and 3 levels:
+
Note: please you need review the right path into the Package Source (Here you should to set the complete path where are EE01.zip) , Package Dir (Here you should to set the complete path where are install Adempiere "ADEMPIERE_Home" )
--generate toplevel nodes
+
INSERT INTO adempiere.ad_treenode (ad_tree_id, node_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, parent_id, seqno)
+
SELECT 50, 2000000 + y.id, 0, 0, 'Y', now(), 0, now(), 0, 0, 999
+
FROM generate_series(1,99) AS y(id);
+
+
--generate subnodes
+
INSERT INTO ad_treenode (ad_tree_id, node_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, parent_id, seqno)
+
SELECT 50, 2000000 + y.id + x.id*100, 0, 0, 'Y', now(), 0, now(), 0, 2000000 + x.id, 999
+
FROM generate_series(1,99) AS x(id), generate_series(1,99) AS y(id);
+
+
--generate subsubnodes
+
INSERT INTO ad_treenode (ad_tree_id, node_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, parent_id, seqno)
+
SELECT 50, 2000000 + y.id + x.id*100 + z.id*10000, 0, 0, 'Y', now(), 0, now(), 0, 2000000 + y.id + x.id *100 , 999
+
FROM generate_series(1,99) AS x(id), generate_series(1,99) AS y(id), generate_series(1,99) AS z(id);
+
+
--generate toplevel organizations
+
INSERT INTO ad_org
+
SELECT 2000000 + y.id , 0, 'Y', now(), 100, now(), 100, 2000000 + y.id, 2000000 + y.id, 2000000 + y.id, 'Y', NULL
+
FROM generate_series(1,99) AS y(id);
+
+
--generate suborganizations
+
INSERT INTO ad_org
+
SELECT 2000000 + y.id + x.id*100, 0, 'Y', now(), 100, now(), 100, 2000000 + y.id + x.id*100, 2000000 + y.id + x.id*100, 2000000 + y.id + x.id*100, 'Y', NULL
+
FROM generate_series(1,99) AS x(id), generate_series(1,99) AS y(id);
+
+
--generate subsuborganizations
+
INSERT INTO ad_org
+
SELECT 2000000 + y.id + x.id*100 + z.id*10000, 0, 'Y', now(), 100, now(), 100, 2000000 + y.id + x.id*100 + z.id*10000, 2000000 + y.id + x.id*100 + z.id*10000, 2000000 + y.id + x.id*100 + z.id*10000, 'Y', NULL
+
FROM generate_series(1,99) AS x(id), generate_series(1,99) AS y(id), generate_series(1,99) AS z(id);
+
+
--generate toplevel orginfo
+
INSERT INTO ad_orginfo (ad_org_id, ad_client_id, isactive, created, createdby, updated, updatedby, duns, taxid)
+
SELECT 2000000 + y.id, 0, 'Y', now(), 100, now(), 100, 0, 0
+
FROM generate_series(1,99) AS y(id);
+
+
--generate suborginfo
+
INSERT INTO ad_orginfo (ad_org_id, ad_client_id, isactive, created, createdby, updated, updatedby, duns, taxid)
+
SELECT 2000000 + y.id + x.id*100, 0, 'Y', now(), 100, now(), 100, 0, 0
+
FROM generate_series(1,99) AS x(id), generate_series(1,99) AS y(id);
+
+
--generate subsuborginfo
+
INSERT INTO ad_orginfo (ad_org_id, ad_client_id, isactive, created, createdby, updated, updatedby, duns, taxid)
+
SELECT 2000000 + y.id + x.id*100 + z.id*10000, 0, 'Y', now(), 100, now(), 100, 0, 0
+
FROM generate_series(1,99) AS x(id), generate_series(1,99) AS y(id), generate_series(1,99) AS z(id);
+
  
If you want to delete all the nodes/organizations later, just run:
+
*Push button Packin
delete from ad_treenode where node_id > 2000000;
+
delete from ad_org where ad_org_id > 2000000;
+
  
 +
[[Image:packin-import-package.png|center]]
  
===Testcases===
 
<div style="float: left; margin-right: 10px; width: 100%;">
 
{| width="100%" cellspacing="0" cellpadding="5" border="1" style="font-size: 0.86em; line-height: 0.9em;"
 
|-
 
! style="width: 180px; color: rgb(255, 255, 255); background-color: grey;" | Task
 
! style="width: 170px; color: rgb(255, 255, 255); background-color: grey;" | Expectation
 
! style="width: 70%; color: rgb(255, 255, 255); background-color: grey;" | Result
 
! style="width: 50px; color: rgb(255, 255, 255); background-color: grey;" | Status
 
|-
 
| asd
 
| asd
 
| asd
 
| asd<br>
 
|-
 
| [[Benutzer:Mo|Mo]] 08:23, 20. Dec. 2012 (CEST)
 
| In Development
 
| Second development iteration. Cleaner code, buxfixes, improvements, more stability.
 
| <br>
 
|}
 
</div> <div style="clear: both;"></div>
 
  
== Development infrastructure ==
+
*Please you need wait some minutes ....
== Technical Requirements ==
+
 
== Data Requirements ==
+
[[Image:packin-processing.png|center]]
== Non-Functional Requirements ==
+
 
== Open Discussion Items ==
+
*When you get OK then 2Pack finish rightly.
== Closed Discussion Items ==
+
 
 +
[[Image:packin-ok.png|center]]
 +
 
 +
*The last step you need to run RUN_silentsetup.sh, is very important run it command the reason is because it include new libero.jar into Adempiere.jar and assign again the package
 +
* Now if you are here then you install EE01 Libero successfully, please run RUN_Adempiere.sh
 +
 
 +
kind regards
 +
Victor Perez
 +
CEO
 +
[http://www.e-evolution.com e-Evolution]
 +
 
 +
[[Category:Developer documentation]]
 +
[[Category:ADempiere Virtual Appliance]]

Revision as of 17:36, 11 September 2007

Install Libero Manufacturing Entity Type EE01

Manual Info

Authors : Victor Perez
Document Name: EE01 Libero Manufacturing Install Manual
Version: 1.00
Company: e-Evolution,SC
Status: Draft
Document Date: 11/09/2007


Setup Environment

Create EE01 Entity Type

Please go Entity Type Window and add new Entity Type as show into o the image:

Entitytype.png

Create the into InPack

  • Create a new record as show into of the image
Packin.png

Note: please you need review the right path into the Package Source (Here you should to set the complete path where are EE01.zip) , Package Dir (Here you should to set the complete path where are install Adempiere "ADEMPIERE_Home" )

  • Push button Packin
Packin-import-package.png


  • Please you need wait some minutes ....
Packin-processing.png
  • When you get OK then 2Pack finish rightly.
Packin-ok.png
  • The last step you need to run RUN_silentsetup.sh, is very important run it command the reason is because it include new libero.jar into Adempiere.jar and assign again the package
  • Now if you are here then you install EE01 Libero successfully, please run RUN_Adempiere.sh

kind regards Victor Perez CEO e-Evolution