1. Summary
To use some of the build in functions provided by Build.One out of the box, the usage of the SelfHdl is needed. This is a unique ID for each data entry in the DB and will be assigned when creating data through B1 UI.
To generate the ID it is necessary to assign for each table an ID, this will be done in the table-definition file
2. Result
You’ll have created or updated a table-definition file for your OpenEdge database
3. Step by Step Guide
- Check, if there is already a table-definition file for your DB existing, see path
src/backend/DB/<YOUR_DB>/table-definition-<YOUR_DB>.xml
- To execute the ABL command to run the generation program, you have to open the ABL scratchpad in the B1 UI. The screen for that is called
wUrmel
- For updating an existing table-definition file use
- These are the 3 parameter of the program:
- Comma-separated DB list,
- Example
customer1db,customer2db
- Path to new or to be updated files, must be in the DB folder.
- Example:
/workspace/app/backend/DB/customerdb
(only a path is needed; file names will be generated automatically based on the database name. - Example:
/workspace/app/backend/DB/customerdb/table-definition-customer1db.xml
A separate file will be generated for each database. - Path to existing files, leave empty if you create a new one.
- Example
/workspace/app/backend/DB/customerdb/table-existing-definition-customerdb.xml
- Check the generated file
- If you would like to do changes on the table-definition file, please commit first and change it in a new workspace
RUN Akioma/Swat/Util/buildMultipleDatabasesTableDefinitions.p("<COMMA-SEPARATED DB LIST>", "<NEW PATH OF DEFINITON FILES>", "<EXISTING DB DEFINITION FILE LIST>").
Real world example
RUN Akioma/Swat/Util/buildMultipleDatabasesTableDefinitions.p("sportsdb", "/workspace/app/backend/DB/sportsdb", "/workspace/app/backend/DB/sportsdb/table-definition-sportsdb.xml").
IMPORTANT: If you are using an existing file, make sure the “Name” and “nameOfDB” values are set correctly. Otherwise, the existing database table will not be identified correctly.
IMPORTANT: Akioma/Swat/Util/buildTableDefinitionFile.p is deprecated and should not be used. It does not support multiple databases.
4. Documentation
To find more information, you can check the following documentation.
DB CLI - Working with Databases in Development Workspaces
Back to Use Cases
Back to Home Page