Run a project ID server
When several developers build the same plug-in in separate development databases, each local sequence hands out the same IDs. Their dictionary records then clash when you merge the work. Run your own ID server and point every development database at it, so all developers get IDs from one sequence.
Centralized ID management is planned to be deprecated. There is no ticket or date yet. See Request centralized IDs.
When this does not apply
- You contribute to iDempiere core. Core uses the official ID server. See Request centralized IDs.
- One developer works on the plug-in, or all developers share one database. The local sequence is enough.
How it works
- The
PROJECT_ID_*keys apply when Dictionary Maintenance is off. - They cover every table with an
EntityTypecolumn, for exampleAD_Column,AD_Element,AD_WindowandAD_SysConfig. - Log and runtime tables, such as
AD_PInstanceandAD_ChangeLog, always use the local sequence. - After each reservation, iDempiere moves the local sequence past the reserved ID.
Set up the server
- Install the CGI scripts from globalqss/idempiere-stuff in the
cgi-bindirectory of a web server. - Create a data directory for the project at
../data/<PROJECT_NAME>relative tocgi-bin. The web server must be able to write to it. - Register the developers in
data/<PROJECT_NAME>/RegisteredDevelopers.pwd, oneuser|passwordline each.
Configure each development database
Set these keys in the System Configurator window at System level:
| Key | Value |
|---|---|
PROJECT_ID_USE_CENTRALIZED_ID | Y (default N) |
PROJECT_ID_WEBSITE | http://<your_server>/cgi-bin/get_ID |
PROJECT_ID_PROJECT | <PROJECT_NAME> |
PROJECT_ID_USER | The developer's user name |
PROJECT_ID_PASSWORD | The developer's password |
iDempiere sends the user name and password in the URL of each request. Serve the scripts over https:// with a valid certificate if the server is reachable from outside your network.
Test it
Open this URL in a browser:
http://<your_server>/cgi-bin/get_ID?PROJECT=<PROJECT_NAME>&USER=<user>&PASSWORD=<password>&TABLE=AD_Column&ALTKEY=&COMMENT=Test
The page shows an ID. The number must go up each time you reload the page. Table names are case sensitive.