+ All Categories
Home > Documents > Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron...

Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron...

Date post: 29-Mar-2015
Category:
Upload: kyla-gedney
View: 215 times
Download: 1 times
Share this document with a friend
Popular Tags:
33
Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager
Transcript
Page 1: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Kuali Rice Bootcamp: Hands-On Exercises

Colorado State University, January 22 - 26, 2008

Aaron Godert - Cornell UniversityRice Development Manager

Page 2: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Environment Set Up

Page 3: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 4: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 5: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

The Recipes Application A simple system for maintaining

recipes and categories that they fit into

Run the web application STOP! Team Review

Page 6: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

The Data Model Two Entities (Business Objects)

Recipe Recipe Category

Two Tables (DB Tables) RECIPES_T RECIPES_CATEGORIES_T

Page 7: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 1: Review the DB Tables Open recipes_db_bootstrap.sql in

Eclipse

Page 8: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 2: Review the Business Objects Open the Java files in package

edu.sampleu.recipe.bo.*

Page 9: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 10: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 3: An OJB Example Open repository.xml in Eclipse and

look at the mapping for RecipeCategory

Page 11: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 4: What JPA Will Look Like@Entity@Table(name=“RECIPE_CATEGORY_T")public class RecipeCategory extends PersistableBusinessObjectBase {

@Idprivate Long id;

private String name;

//note this annotation is not required if column name matches attribute name @Column(name=“DESCRIPTION”)

private String description;…

}

Page 12: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 5: Recipe OJB Mapping Open repository.xml Open recipes_db_bootstrap.sql Open Recipe.java

Page 13: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 14: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 15: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 16: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 17: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 18: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 9: Tweaking a Lookup Open RecipeCategory.xml Remove “id” from the lookup fields Restart the application

Page 19: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 20: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 21: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 22: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 23: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 24: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 25: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Leveraging KEN We use KEN for notifications Extension of KEW Notification List = Action List Can subscribe to notification channels

Page 26: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 27: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 16: Sending a Notification Manually via form - click the “Send

Simple Notification” link STOP! Team Exercise

Page 28: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 17: Subscribing to a Channel Click on the Channel Subscriptions link STOP! Team Exercise

Page 29: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 30: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Leveraging KSB Inter-application communications Allows services to be invoked via

several different protocols Helps to create an SOA based system

Page 31: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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

Page 32: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

Exercise 20: Exposing a Service on KSB Open SpringBeans.xml - go to Rice

Configurer section Open MagazineServiceTest class STOP! Team Exercise

Page 33: Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager.

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


Recommended