Difference between revisions of "Centralized ID Management"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
m
m (Flag as needing revision.)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
[[Category:Needs Revision]]
 +
[[Category:Features]]
 +
[[Category:Developer documentation]]
 +
[[Category:Migration]]
 +
See also: [[Migration]] & [[Generating_Migration_Scripts]]
 +
 
== Installation ==
 
== Installation ==
  
Line 19: Line 25:
  
 
DICTIONARY_ID_PASSWORD = Your committer assigned password<br>
 
DICTIONARY_ID_PASSWORD = Your committer assigned password<br>
NOTE: If you're committer and haven't received your password please ask to Carlos Ruiz (globalqss at sourceforge) e-mail
+
For password assignment procedure please ask in adempiere forums.
  
 
[[Image:03_Centralized_ID.gif]]
 
[[Image:03_Centralized_ID.gif]]
Line 34: Line 40:
  
 
After this you just continue creating the needed dictionary objects and Adempiere will assign the ID's from the centralized website developer.adempiere.com
 
After this you just continue creating the needed dictionary objects and Adempiere will assign the ID's from the centralized website developer.adempiere.com
 +
 +
== The Log ==
 +
 +
If you want to review the log of used ID's for a table, you can navigate to the site:
 +
 +
http://developer.adempiere.com/cgi-bin/showlog?AD_Reference
 +
 +
Please replace the AD_Reference name with the table you want to see.
 +
 +
'''IMPORTANT NOTE: When in "Dictionary Maintenance" mode all records for clients System and GardenWorld will get centralized IDs'''
 +
 +
== For Projects with Distributed Developers ==
 +
 +
If you conduct project with distributed developers - with distributed development databases, then you have the same problem as Adempiere Committers to synchronize the dictionary ID's
 +
 +
This implementation can help also for these projects.
 +
 +
You just need to install the cgi scripts provided in:<br>
 +
http://adempiere.svn.sourceforge.net/viewvc/adempiere/contributions/stuff/POC_Central_System_IDs/linux/
 +
 +
Set up a data directory ../data relative to cgi-bin directory for your project:<br>
 +
http://adempiere.svn.sourceforge.net/viewvc/adempiere/contributions/stuff/POC_Central_System_IDs/linux/data/Adempiere/
 +
 +
Register your developers in the file data/PROJECT_NAME/RegisteredDevelopers.pwd
 +
 +
And set the system configurator parameters for project usage:<br>
 +
PROJECT_ID_USE_CENTRALIZED_ID = Y  (default is N)
 +
PROJECT_ID_WEBSITE = with the website provided for the centralized ID management
 +
PROJECT_ID_PROJECT = name of the project set up
 +
PROJECT_ID_USER = your user name for the project
 +
PROJECT_ID_PASSWORD = your password committer for the project
 +
PROJECT_ID_COMMENTS = the comment for the development you're attending
 +
 +
This will assign centralized ID's for all tables that have EntityType column, in the seed those are:
 +
AD_Column
 +
AD_Element
 +
AD_EntityType
 +
AD_Field
 +
AD_FieldGroup
 +
AD_Form
 +
AD_Image
 +
AD_InfoColumn
 +
AD_InfoWindow
 +
AD_Menu
 +
AD_Message
 +
AD_ModelValidator
 +
AD_Modification
 +
AD_Process
 +
AD_Process_Para
 +
AD_Reference
 +
AD_Ref_List
 +
AD_Ref_Table
 +
AD_ReplicationStrategy
 +
AD_ReplicationTable
 +
AD_ReportView
 +
AD_Tab
 +
AD_Table
 +
AD_Task
 +
AD_Val_Rule
 +
AD_WF_NextCondition
 +
AD_WF_Node
 +
AD_WF_NodeNext
 +
AD_WF_Node_Para
 +
AD_WF_Responsible
 +
AD_Window
 +
AD_Workbench
 +
AD_WorkbenchWindow
 +
AD_Workflow
 +
PA_ColorSchema
 +
PA_MeasureCalc
 +
 +
== FAQ ==
 +
1. I will need to migrate some internal modifications to trunk, more exactly some columns that have internal allocated IDs (> 1000000). What is the best way to get IDs from IDs server without creating the columns (because i already have them, i just need to change the IDs) ?
 +
: http://developer.adempiere.com/cgi-bin/get_ID?PROJECT=Adempiere&USER=your_user&PASSWORD=your_password&TABLE=AD_Column&ALTKEY=&COMMENT=Comment
 +
:
 +
:Dissected  :-) '''NOTE: The table names are case sensitive'''
 +
:
 +
:; http://developer.adempiere.com/ : the website providing the ID's where cgi shells are installed
 +
:; cgi-bin/get_ID : the shell that reserves ID's get_ID
 +
:; ?PROJECT=Adempiere : the project Adempiere (centralized ID can be used to manage IDs for other projects but it needs some setup)
 +
:; &USER=your_user : your assigned user (normally the same as sourceforge)
 +
:; &PASSWORD=your_password : your assigned password
 +
:; &TABLE=AD_Column : the table you want to reserve ID (in this example AD_Column - case sensitive!)
 +
:; &ALTKEY= : unused at this moment, to save alternate key for tables like Value
 +
:; &COMMENT=Comment  -- the comments on the reservation
 +
:The result of the call is a page with the assigned ID.
 +
:
 +
: To review the log you can call:
 +
: http://developer.adempiere.com/cgi-bin/showtaillog?AD_Column  (NOTE: Or use showlog for full log, recommended is to use showtaillog)
 +
: That's it, call the showlog.cgi with the table as parameter.

Latest revision as of 07:59, 27 August 2014

See also: Migration & Generating_Migration_Scripts

Installation

Before Adempiere 3.3.1 you need to execute the script 033_centralized_id_sysconfig.sql

Configuration

You need to configure the parameters in the System Configurator Window:

01 Centralized ID.gif

Specially the parameters:

DICTIONARY_ID_USER = Your committer sourceforge ID

02 Centralized ID.gif

and

DICTIONARY_ID_PASSWORD = Your committer assigned password
For password assignment procedure please ask in adempiere forums.

03 Centralized ID.gif

Development

Firstly, please configure the comment in the System Configurator window related to the enhancement, bug or feature request you're solving, example:

04 Centralized ID.gif

When you're ready to develop a trunk enhancement, bug or feature request that requires official dictionary ID's, you need to open a system session and check the flag "Dictionary Maintenance" in Preferences window. Please note this parameter is not saved between sessions - so you need to check it any time you are going to develop something new for the trunk:

05 Centralized ID.gif

After this you just continue creating the needed dictionary objects and Adempiere will assign the ID's from the centralized website developer.adempiere.com

The Log

If you want to review the log of used ID's for a table, you can navigate to the site:

http://developer.adempiere.com/cgi-bin/showlog?AD_Reference

Please replace the AD_Reference name with the table you want to see.

IMPORTANT NOTE: When in "Dictionary Maintenance" mode all records for clients System and GardenWorld will get centralized IDs

For Projects with Distributed Developers

If you conduct project with distributed developers - with distributed development databases, then you have the same problem as Adempiere Committers to synchronize the dictionary ID's

This implementation can help also for these projects.

You just need to install the cgi scripts provided in:
http://adempiere.svn.sourceforge.net/viewvc/adempiere/contributions/stuff/POC_Central_System_IDs/linux/

Set up a data directory ../data relative to cgi-bin directory for your project:
http://adempiere.svn.sourceforge.net/viewvc/adempiere/contributions/stuff/POC_Central_System_IDs/linux/data/Adempiere/

Register your developers in the file data/PROJECT_NAME/RegisteredDevelopers.pwd

And set the system configurator parameters for project usage:

PROJECT_ID_USE_CENTRALIZED_ID = Y  (default is N)
PROJECT_ID_WEBSITE = with the website provided for the centralized ID management
PROJECT_ID_PROJECT = name of the project set up
PROJECT_ID_USER = your user name for the project
PROJECT_ID_PASSWORD = your password committer for the project
PROJECT_ID_COMMENTS = the comment for the development you're attending

This will assign centralized ID's for all tables that have EntityType column, in the seed those are:

AD_Column
AD_Element
AD_EntityType
AD_Field
AD_FieldGroup
AD_Form
AD_Image
AD_InfoColumn
AD_InfoWindow
AD_Menu
AD_Message
AD_ModelValidator
AD_Modification
AD_Process
AD_Process_Para
AD_Reference
AD_Ref_List
AD_Ref_Table
AD_ReplicationStrategy
AD_ReplicationTable
AD_ReportView
AD_Tab
AD_Table
AD_Task
AD_Val_Rule
AD_WF_NextCondition
AD_WF_Node
AD_WF_NodeNext
AD_WF_Node_Para
AD_WF_Responsible
AD_Window
AD_Workbench
AD_WorkbenchWindow
AD_Workflow
PA_ColorSchema
PA_MeasureCalc

FAQ

1. I will need to migrate some internal modifications to trunk, more exactly some columns that have internal allocated IDs (> 1000000). What is the best way to get IDs from IDs server without creating the columns (because i already have them, i just need to change the IDs) ?

http://developer.adempiere.com/cgi-bin/get_ID?PROJECT=Adempiere&USER=your_user&PASSWORD=your_password&TABLE=AD_Column&ALTKEY=&COMMENT=Comment
Dissected  :-) NOTE: The table names are case sensitive
http://developer.adempiere.com/ 
the website providing the ID's where cgi shells are installed
cgi-bin/get_ID 
the shell that reserves ID's get_ID
 ?PROJECT=Adempiere 
the project Adempiere (centralized ID can be used to manage IDs for other projects but it needs some setup)
&USER=your_user 
your assigned user (normally the same as sourceforge)
&PASSWORD=your_password 
your assigned password
&TABLE=AD_Column 
the table you want to reserve ID (in this example AD_Column - case sensitive!)
&ALTKEY= 
unused at this moment, to save alternate key for tables like Value
&COMMENT=Comment -- the comments on the reservation
The result of the call is a page with the assigned ID.
To review the log you can call:
http://developer.adempiere.com/cgi-bin/showtaillog?AD_Column (NOTE: Or use showlog for full log, recommended is to use showtaillog)
That's it, call the showlog.cgi with the table as parameter.