Lab 03 - Create a domain model

Lab Goal

To create a new domain model with the JBoss BRMS domain modeler

Create new domain model

  • Head over to the project authoring perspective:
    • AUTHORING -> PROJECT AUTHORING

Create new domain model

  • Open the domain modeler with first object to be created:
    • NEW ITEM -> DATA OBJECT

Create new domain model

  • Create Product in pop-up
    • Name: Product
    • Package: com.redhat.demos.coolstore
  • Click on +OK

Create new domain model

  • Add all fields, hitting CREATE for each one:
    • desc, Description, String
    • itemId, Item ID, String
    • name, Name, String
    • price, Price, DOUBLE

Create new domain model

  • Finished Product object in our domain model for now
  • be sure to SAVE data object before moving on...

Create new domain model

  • Add PromoEvent object to our domain model

Create new domain model

  • PromoEvent is an EVENT object, so add this as it's ROLE

Create new domain model

  • Add all fields to PromoEvent
  • be sure to SAVE data object before moving on...

Create new domain model

  • Create ShoppingCart object

Create new domain model

  • Add all fields for ShoppingCart object
  • be sure to SAVE data object before moving on...

Create new domain model

  • Create ShoppingCartItem object

Create new domain model

  • Add all fields for ShoppingCartItem object
  • note: shoppingCart is found in Type drop down menu
  • be sure to SAVE data object before moving on...

Create new domain model

  • Now we need to re-open ShoppingCart to add a new field
  • First we need to drill down to our object model in the Project Explorer

Create new domain model

  • Add a ShoppingCartItemList to ShoppingCart
  • check List box after selecting Type in drop down menu
  • be sure to SAVE data object before moving on...

Lable your domain model

  • Open each data object in your model again to add a Label
  • Click on righ pane tab Data Object and fill in Label:

Ensure project builds

  • right pane -> OPEN PROJECT EDITOR -> BUILD (top right) -> BUILD & DEPLOY
  • (should see green pop-up 'Build Successful')

Lab results...

Eric D. Schabell
JBoss Technology Evangelist
@ericschabell
http://schabell.org

JBoss BRMS Workshop

Lab 04 - Create Domain Specific Language (DSL)