Kuali Rice Bootcamp: Hands-On Exercises
1 / 33

Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 - PowerPoint PPT Presentation

  • Uploaded on

Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager. Environment Set Up. Eclipse Overview. Maven2 How we build - POMs Our standard project structure M2 repository Subervsion/CVS

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008' - paloma-steele

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Kuali rice bootcamp hands on exercises colorado state university january 22 26 2008

Kuali Rice Bootcamp: Hands-On Exercises

Colorado State University, January 22 - 26, 2008

Aaron Godert - Cornell University

Rice Development Manager

Eclipse overview
Eclipse Overview

  • Maven2

    • How we build - POMs

    • Our standard project structure

    • M2 repository

  • Subervsion/CVS

    • Checking out code

    • Sync’ing

    • Standard practices before committing code

Eclipse overview continued
Eclipse Overview Continued

  • Useful features and tools in Eclipse

    • Refactoring

    • Code completion

    • Ctrl+Shift+R

    • Ctrl+Shift+T

    • Organize imports

    • Adding Javadocs

    • Code generation - getters/setters, implements/overrides

The recipes application
The Recipes Application

  • A simple system for maintaining recipes and categories that they fit into

  • Run the web application

  • STOP! Team Review

The data model
The Data Model

  • Two Entities (Business Objects)

    • Recipe

    • Recipe Category

  • Two Tables (DB Tables)



Exercise 1 review the db tables
Exercise 1: Review the DB Tables

  • Open recipes_db_bootstrap.sql in Eclipse

Exercise 2 review the business objects
Exercise 2: Review the Business Objects

  • Open the Java files in package edu.sampleu.recipe.bo.*

How these link together
How These Link Together

  • We use an ORM (Object Relational Mapper) called Apache OJB

  • XML files combined with a set of Apache Java libraries that automatically persist data in our business objects to our DB

  • Soon to be replaced by JPA - a Java standard

    • No more XML, use annotations in Java code instead

Exercise 3 an ojb example
Exercise 3: An OJB Example

  • Open repository.xml in Eclipse and look at the mapping for RecipeCategory

Exercise 4 what jpa will look like
Exercise 4: What JPA Will Look Like



public class RecipeCategory extends PersistableBusinessObjectBase {


private Long id;

private String name;

//note this annotation is not required if column name matches attribute name


private String description;


Exercise 5 recipe ojb mapping
Exercise 5: Recipe OJB Mapping

  • Open repository.xml

  • Open recipes_db_bootstrap.sql

  • Open Recipe.java

Unit testing
Unit Testing

  • We use JUnit for unit and integration testing

  • We are starting to use HtmlUnit for web UI testing

  • Automated tests that are programmed

  • Run by our CI environment: Bamboo

Exercise 6 testing your ojb mapping
Exercise 6: Testing Your OJB Mapping

  • We can use JUnit to test our OJB mapping and the persistence of data between our Bos and DB tables

  • Open RecipeDaoTest class

  • Right click RecipeDaoTest class --> Run --> Run as JUnit Test

  • STOP! Team Coding Exercise

  • When ready, re-run the unit test

Leveraging the kns
Leveraging the KNS

  • We’ll use the KNS to provide search and detail information on categories and recipes

  • Search = Lookup

  • Detail Info = Inquiry

  • We’ll use the KNS to provide maintenance CRUD operations with workflow backing them

  • CRUD = Maintenance Documents

Exercise 7 review recipecategory dd
Exercise 7: Review RecipeCategory DD

  • We use something called the Data Dictionary (DD) to construct our lookups, inquiries, and maintenance documents

  • Open RecipeCategory.xml - this is the business object DD file

    • Lookups

    • Inquiries

  • Open RecipeCategoryMaintenanceDocument.xml - this is the maintenance document XML

    • CRUD, Workflow, Authz

  • Run the web app to correlate DD to functionality

Exercise 8 create recipe dd files
Exercise 8: Create Recipe DD Files

  • Copy and rename RecipeCategory.xml to Recipe.xml

  • Copy and rename RecipeCategoryMaintenanceDocument.xml to RecipeMaintenanceDocument.xml

  • Open RecipesWorkflowBootstrap.xml

  • Open recipes_db_bootstrap.sql

  • STOP! Team Exercise

  • When ready, run the web application

Exercise 9 tweaking a lookup
Exercise 9: Tweaking a Lookup

  • Open RecipeCategory.xml

  • Remove “id” from the lookup fields

  • Restart the application

Exercise 10 tweaking a maint doc
Exercise 10: Tweaking a Maint. Doc.

  • Open RecipeMaintenanceDocument.xml

  • Let’s only have one section, so move the content from the details section and put it into the info section

  • Remove the details section

  • Restart the application

Exercise 11 changing initiation authz
Exercise 11: Changing Initiation Authz

  • Open RecipeCategoryMaintenance.xml

  • Change the authorization workgroup from WorkflowAdmin to kualiUniversalGroup

  • Restart the application; note you can only create a Recipe Category if you are now an admin

Exercise 12 add custom rule checks
Exercise 12: Add Custom Rule Checks

  • Open the RecipeRules class

  • Open RecipeMaintenanceDocument.xml

  • We want to check to see if any of the ingredients is beef, then we need to make sure that the beef category is chosen

  • STOP! Team Exercise

  • When ready, run the web application

Leveraging kew
Leveraging KEW

  • We use KEW for workflow functionality and configuration

  • Apply workflow rules to documents

  • Alter workflow processing chains

  • Call external services to make workflow decisions for us

  • Leverage workflow for limited business process orchestration

Exercise 13 adding a group approval
Exercise 13: Adding a Group Approval

  • Make use of the NamedRuleSelector - template-less rules

  • Open RecipesWorkflowBootstrap.xml

  • Open RecipesUsersWorkgroupsBootstrap.xml

  • We want any Recipe Category changes to be approved by the “RecipeMasters” workgroup

  • STOP! Team Exercise

  • Restart application when changes have been made

Exercise 14 routing on document data
Exercise 14: Routing on Document Data

  • Make use of embedded Groovy scripting in routing rules

  • Look at document data and route to a new group “Chicken Recipe Masters” if any of the ingredients are chicken

  • Open RecipeUtils class

  • Open RecipesWorkflowBootstrap.xml

  • Open RecipesUsersWorkgroupsBootstrap.xml

  • STOP! Team Exercise

  • Restart application when changes have been made

Leveraging ken
Leveraging KEN

  • We use KEN for notifications

  • Extension of KEW

  • Notification List = Action List

  • Can subscribe to notification channels

Exercise 15 creating a new channel
Exercise 15: Creating a New Channel

  • Open recipes_db_bootstrap.sql

  • Review the SQL starting with “-- KEN sample data --”

  • This was already created for us when the DB was loaded, we’re just reviewing

  • Start the application, go to the Kuali Enterprise Notification link

  • STOP! Team Exercise

Exercise 16 sending a notification
Exercise 16: Sending a Notification

  • Manually via form - click the “Send Simple Notification” link

  • STOP! Team Exercise

Exercise 17 subscribing to a channel
Exercise 17: Subscribing to a Channel

  • Click on the Channel Subscriptions link

  • STOP! Team Exercise

Exercise 18 programmatic notifications
Exercise 18: Programmatic Notifications

  • Send programmatically as an XML request, via the NotificationService, within the KEW Post-processor

  • Open RecipesPostProcessor class

  • Open RecipeMaintenanceDocument.xml

  • STOP! Team Exercise

  • Restart the application after changes have been made

Leveraging ksb
Leveraging KSB

  • Inter-application communications

  • Allows services to be invoked via several different protocols

  • Helps to create an SOA based system

Exercise 19 creating a service
Exercise 19: Creating a Service

  • A new “Magazine System” manages magazines and needs to provide a service to show all managed magazines

  • If any of those magazines are used in a recipe, a workgroup approval will need to be made by the Magazine Managers group

  • Open MagazineService class

  • Open MagazineServiceImpl class

  • Open SpringBeans.xml

  • STOP! Team Exercise

Exercise 20 exposing a service on ksb
Exercise 20: Exposing a Service on KSB

  • Open SpringBeans.xml - go to Rice Configurer section

  • Open MagazineServiceTest class

  • STOP! Team Exercise

Exercise 21 invoking a service in kew
Exercise 21: Invoking a Service in KEW

  • We’ll invoke the service we just created as SOAP over the bus, to base routing off of it

  • Open RecipesWorkflowBootstrap.xml

  • Open RecipeUtils class

  • Open RecipeUsersWorkgroupsBootstrap.xml

  • STOP! Team Exercise