Building Logic Tutorial - BusLogicIntro

Under construction.

Create Project BusLogicIntroOX

Create project as described below.  All required artifacts (source, jars, etc) are at the bottom of this page - download them using the arrow on the right (don't just click the name!):
  1. Create Java project named per title in  OpenXava worksapce
  2. Run OpenXavaTemplate/CreateNewProject.xml
  3. Copy the jars 
  4. Add autobizlogic and buslogicext to your classpath
  5. Add Library jUnit4 to your classpath
  6. Copy in the src and test folders, and add test to the source path
    1. See here for database structure
Minor issue: BusLogicIntroTest required a line to be commented out.  Don't know why.

Configure Persistence

Configure persistence/META-INF/persistence.xml:

<!-- Activate ABL -->

<property name="hibernate.current_session_context_class" value="com.autobizlogic.abl.session.LogicThreadLocalSessionContext"/>        

Configure tomcat (in Servers/Tomcat v6.0 Server at localhost-config/context.xml):

<Resource name="jdbc/BusLogicIntroOXDS" 
    auth="Container" type="javax.sql.DataSource"
    maxActive="20" maxIdle="5" maxWait="10000"
    username="root" password="" 

Create MySQL database BusLogicIntro

Create the MySQL physical database called buslogicintro, then use the sql scripts (bottom of page) to create the tables and rows.


Tree - nodeProperties undefined

Tried to follow this documentation (find tree on the page), but ran http://localhost:8080/BusLogicIntroOX/modules/Department with the following result:

Resolved Issues

Open Purchaseorder with "node properties undefined" - define an @view

If you attempt to use a complicated database, and observe OpenXava stack traces with "Node Properties undefined", try defining an @view.  For example, BusLogicIntro was made to work with the following:

@View (members="orderNumber, amountTotal, amountUnPaid, amountPaid;" + 

                "Items {lineitems}," +

                "PaymentAllocations {paymentPurchaseorderAllocations}" +

                "LineItemUsages {lineitemUsages} ")

public class Purchaseorder implements {

Naviox does not open - additional instructions

You may encounter issues getting Naviox to run, as shown below.   In the case of BusLogicIntro, these were resolved as described in Working with OpenXava.

buslogicintro create rows.sql
Val Huber,
Jun 30, 2012, 9:09 PM
buslogicintro create tables.sql
Val Huber,
Jun 30, 2012, 5:46 PM
Val Huber,
Jun 30, 2012, 9:09 PM
Val Huber,
Jun 30, 2012, 4:04 PM
Val Huber,
Jun 30, 2012, 3:49 PM