Friday, March 7, 2008

Setting up product database and seed data for Ofbiz

This post follows the main document on Ofbiz docs site and contains information that are not included in that document or information that is "in between lines".
Ofbiz Setup Guide

  1. Make sure the default delegator in framework/entity/config/entityengine.xml is pointing to the correct database
  2. For production db setup from the ofbiz home run ant run-install-seed , this will install only the seed data which is the bare minimum data required for Ofbiz to come up in the most basic meaningful way and then you can enter your custom data
  3. Create your business specific data by looking at Demo*.xml files in ecommerce, accounting and other applications that comes with Ofbiz. In order to run and customize e-commerce store, you will need at least Accounting/data/DemoOrgnization e-commerce/data/DemoProduct.xml.
  4. Pay close attention to the "id" fields in the data file, these are the primary keys for your data. In order to avoid conflicts with existing data choose alpha numeric keys which begin with a string which identifies your company or business.
  5. Once these data files are created, they can be imported through the WebTools/Import functionality. If the files are successfully imported, you will see message towards teh bottom indicating how many entities were successfully imported. Note: import process is atomic and is part of 1 transaction - so if you have lot of data and if for any reason import fails, none of the data from that import will be saved. So you can import the data in its entirity.

No comments: