Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations

Presentation on theme: "Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January 22 - 26, 2008 Aaron Godert - Cornell University Rice Development Manager."— Presentation transcript:

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

2 Environment Set Up

3 Eclipse Overview Maven2 How we build - POMs Our standard project structure M2 repository Subervsion/CVS Checking out code Syncing Standard practices before committing code

4 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

5 The Recipes Application A simple system for maintaining recipes and categories that they fit into Run the web application STOP! Team Review

6 The Data Model Two Entities (Business Objects) Recipe Recipe Category Two Tables (DB Tables) RECIPES_T RECIPES_CATEGORIES_T

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

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

9 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

10 Exercise 3: An OJB Example Open repository.xml in Eclipse and look at the mapping for RecipeCategory

11 Exercise 4: What JPA Will Look Like @Entity @Table(name=RECIPE_CATEGORY_T") public class RecipeCategory extends PersistableBusinessObjectBase { @Id private Long id; private String name; //note this annotation is not required if column name matches attribute name @Column(name=DESCRIPTION) private String description; … }

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

13 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

14 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

15 Leveraging the KNS Well use the KNS to provide search and detail information on categories and recipes Search = Lookup Detail Info = Inquiry Well use the KNS to provide maintenance CRUD operations with workflow backing them CRUD = Maintenance Documents

16 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

17 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

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

19 Exercise 10: Tweaking a Maint. Doc. Open RecipeMaintenanceDocument.xml Lets 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

20 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

21 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

22 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

23 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

24 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

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

26 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, were just reviewing Start the application, go to the Kuali Enterprise Notification link STOP! Team Exercise

27 Exercise 16: Sending a Notification Manually via form - click the Send Simple Notification link STOP! Team Exercise

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

29 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

30 Leveraging KSB Inter-application communications Allows services to be invoked via several different protocols Helps to create an SOA based system

31 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

32 Exercise 20: Exposing a Service on KSB Open SpringBeans.xml - go to Rice Configurer section Open MagazineServiceTest class STOP! Team Exercise

33 Exercise 21: Invoking a Service in KEW Well 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

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

Similar presentations

Ads by Google