© 2006, The Trustees of Cornell University © 2006, The Trustees of Indiana University Kuali...
-
Upload
martin-russell -
Category
Documents
-
view
217 -
download
0
Transcript of © 2006, The Trustees of Cornell University © 2006, The Trustees of Indiana University Kuali...
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Kuali Nervous System
Aaron Godert, Kuali Development Manager
Brian McGough, Kuali Lead Architect
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Session Goals
• Overview of the Kuali Nervous System (KNS)
• Strategy behind the KNS
• Component review and code samples
• Conclusions
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
What is the KNS?
• The core technical module
• Reusable code components that embody functionality
Architecture/Tools
Kuali Nervous System
Kuali Application Exte
rnal
Functional Modules
Technical Module
TechnicalFoundation
Chart of AccountsFinancial Transaction
Processing
Research Administration General Ledger
Accounts Receivables
Contract and Grants
Workflow
CAS
LDAP
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Strategy
• A framework to enforce consistency
• Adhere to development standards and architectural principals
• A stable core for efficient development
• Reduce and reuse
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Strategy• First shot at team chemistry and co-
located development
• Incur upfront costs– January 2005 to
June 2005– Reconvened in
December 2005 to “tidy up”
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
KNS Components
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
Attachments(Java IO)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
Lookups
Inquiries
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
Custom Tags(JSTL)
Authentication(Servlet Filter/
CAS)
Authorization(Kuali/Workflow) APC
RulesService
CustomAttributes
DocumentAuthorizer
Service
Notes
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
KNS Components
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Document Components• Requirement: electronic documents to
perform business transactions– Integrate workflow, full audit trail,
notes/attachments
• Two types to start…
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Document ComponentsMaintenance Documents
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Document ComponentsFinancial Transaction Processing Documents
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Document Components
MaintenanceFinancial
TransactionProcessing
Document
• Commonalities led to a document paradigm– Created inheritance structure for all layers:
• Web – Struts actions and forms• Business – business objects• Persistence – DAO, Services, etc
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Maintenance Documents
• Could be generalized to dynamically persist, render, and control business objects for maintenance purposes
• Needed a way to describe behaviors of these types of documents
• Several iterations produced the Data Dictionary (DD) concept
Document Components
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Data Dictionary
• XML document for describing behaviors of business objects– Attributes – lengths, UI rendering info
(control type)– “Required-ness”– Customization - labels, help content, regex
validation
Document Components
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Data Dictionary, Continued• Eventual organization
– Business object data dictionary file• Embraced reuse across documents• Added support for attribute references
– Maintenance document data dictionary file– Transaction processing document data
dictionary file
• Document paradigm led to pluggable business rule classes, authorizer classes, document level help content
Document Components
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
<attributes> <attributeReference name="chartOfAccountsCode“
sourceClassName="org.kuali.module.chart.bo.Chart“ sourceAttributeName="chartOfAccountsCode" />
<attribute name="accountNumber" forceUppercase="true"> <label>Account Number</label> <shortLabel>Account</shortLabel> <maxLength>7</maxLength> <validationPattern> <alphaNumeric exactLength="7" allowWhitespace="false" allowUnderscore="false" /> </validationPattern> <required>true</required> <control> <text size="10" /> </control> <summary>Account Number</summary> <description>Account Number</description> </attribute> ...
</attributes>
Document ComponentsBusiness Object Data Dictionary Sample
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Document Components
Document “Formula” =
DB Table
* POJOs (BOs)
OJB mapping
BO DD file
Document DD file
* Rule plug-in class
* Authorization plug-in class
+ Kuali Enterprise Workflow (KEW) configuration
Kuali Document
* Denotes use of inheritance
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Document Components
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
APCRules
Service
DocumentAuthorizer
Service
Authorization(Kuali/Workflow)
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Lookups and Inquiries• Requirement: need a way to look up
records and view their details– Kuali Enterprise Workflow’s (KEW)
provided document searching– Needed something to look at the data that
maintenance documents manage
• Lookup – allows for searching against data of record
• Inquiry – “drill down” and view details of records
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Lookups and InquiriesLookups
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Lookups and InquiriesInquiries
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Lookups and Inquiries• Integrated into data dictionary for
dynamic search page and record detail rendering
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
<lookup> <title>Account Lookup</title> <menubar> <![CDATA[<a href="maintenance.do">Create New</a>]]> </menubar> <instructions>Lookup an Account</instructions> <defaultSort attributeName="accountNumber" sortAscending="true" />
<lookupFields> <lookupField attributeName="accountNumber" required="false" /> … </lookupFields>
<resultFields> <field attributeName="accountNumber" forceInquiry=“true” /> <field attributeName="accountFiscalOfficerUser.personName“ /> <field attributeName="accountManagerUser.personName“ /> … </resultFields></lookup>
Lookups and InquiriesLookup Data Dictionary Sample (BO DD)
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
<inquiry> <title>Account Inquiry</title> <inquiryFields> <field attributeName="chartOfAccountsCode" /> <field attributeName="accountNumber" /> … </inquiryFields></inquiry>
Lookups and InquiriesInquiry Data Dictionary Sample (BO DD)
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Lookups and Inquiries
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
Lookups
Inquiries
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
Authorization(Kuali/Workflow) APC
RulesService
DocumentAuthorizer
Service
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core Services• Requirement: provide common utilities
to Kuali developers– Employ our SOA architectural principal
• Leveraged Spring IoC– Interface/Implementation– KualiSpringBeans.xml
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core ServicesBusiness Object Service
• Recognized that Spring/OJB integration boiled down to:– PersistenceBroker.store(businessObject);
– PersistenceBroker.queryByCriteria(BusinessObject.class, criteria);
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core ServicesBusiness Object Service, Continued
• Allowed us to significantly reduce the number of DAOs
• Able to use Spring’s AOP Method Results Caching
• Used this service in other components– Lookups– Inquiries
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core ServicesDocument Service• A common set of service methods to
take actions on a document– Similar to the business object service– Persist documents and integrate with
workflow
• Used Spring’s transaction management features
• Samples:– documentService.save(document);– documentService.approve(document);
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core ServicesData Dictionary Services
• Our gateway to business object and document metadata
• Used throughout the KNS– Workflow services – document type
information– Custom tags – access to attribute labels– Business rules – required attribute checks
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core ServicesData Dictionary Services, Continued
• Samples– businessObjectDictionaryService.getLookupTitle(Account.class);
– dictionaryValidationService.validateBusinessObject(account);
– transactionalDocumentDictionaryService.getBusinessRulesClass(transactionalDocument);
– transactionalDocumentDictionaryService.getAllowsCopy(transactionalDocument);
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core ServicesWorkflow Document Services
• Integration point with KEW
• Leverages KEW libraries
• Talks securely to KEW via Apache Axis Web Services
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Core Services
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
Lookups
Inquiries
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
Authorization(Kuali/Workflow) APC
RulesService
DocumentAuthorizer
Service
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
UI ComponentsCustom Tags
• Allows for reusable pieces of JSP, JSTL, and HTML
• Samples– <kul:lookup businessObjectClassName=“Account” />
– <kul:inquiry businessObjectClassName=“Account” />
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
UI ComponentsAJAX
• Minimal usage because of our accessibility standards
• Value added
• Using JavaScript XMLHttpRequest()– GET requests sent to a central Struts
action class that handles all AJAX calls
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
UI ComponentsCSS
• Extensive set of style sheets
• Cohesive and aesthetically pleasing look and feel
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
<kul:documentPage showDocumentInfo="true" documentTypeName="KualiGeneralErrorCorrectionDocument" htmlFormAction="financialGeneralErrorCorrection" renderMultipart="true" showTabButtons="true">
<html:hidden property="document.nextSourceLineNumber"/><html:hidden property="document.nextTargetLineNumber"/><kul:hiddenDocumentFields />
<kul:documentOverview editingMode="${KualiForm.editingMode}"/><fin:accountingLines
editingMode="${KualiForm.editingMode}" editableAccounts="${KualiForm.editableAccounts}"/>
<kul:generalLedgerPendingEntries/><kul:notes/><kul:adHocRecipients/><kul:routeLog/><kul:panelFooter/><kul:documentControls transactionalDocument="true" />
</kul:documentPage>
UI ComponentsJSP Sample
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
UI Components
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
Lookups
Inquiries
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
Authorization(Kuali/Workflow) APC
RulesService
DocumentAuthorizer
Service
Custom Tags(JSTL)
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Customization and Configuration Components
• Requirement: the system must be customizable and configurable
• Application Parameter Constants– Extract hard coded business rules checks
out to the DB– Maintained with a maintenance document
• Data Dictionary
• KEW routing rules configuration
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
• Custom attributes– Custom fields for business objects– Turn on in data dictionary file– Reporting needs, not business rules
• “Pluggable” business rules– Specify business rule implementation in
document’s data dictionary file
Customization and Configuration Components
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Customization Components
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
Lookups
Inquiries
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
Authorization(Kuali/Workflow) APC
RulesService
DocumentAuthorizer
Service
Custom Tags(JSTL)
CustomAttributes
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Security Components
Authentication
• WebAuthenticationService
• WebAuthenticationServiceCas– Used CAS for implementation– J2EE Servlet filter uses the service
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Security Components
Authorization
• KualiAuthorizationService
• Implemented as two types• Application Roles
– Action Z requires group Y membership for user X– Does user X belong to group Y?
• Document Inherent – Application Role + Document Role + Document
State = Permission
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Security ComponentsAuthorization DD File Code Sample…<documentClass> org.kuali.module.financial.document.TransferOfFundsDocument</documentClass><documentAuthorizerClass> org.kuali.module.financial.document.FinancialDocumentAuthorizer</documentAuthorizerClass><authorizations> <authorization action="initiate"> <workgroups> <workgroup>KUALI_ROLE_ADMINISTRATORS</workgroup> </workgroups> </authorization></authorizations>…
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Security Components
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
Lookups
Inquiries
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
Custom Tags(JSTL)
Authentication(Servlet Filter/
CAS)
Authorization(Kuali/Workflow) APC
RulesService
CustomAttributes
DocumentAuthorizer
Service
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Other Components• Notes and attachments
• Data dictionary driven help screens
• Question component for confirmation dialogs
• PojoProcessor plug-in for Struts form processing– Reuse business objects for automatic form
processing and field formatting
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Other Components
Document
MaintenanceDocument Financial
TransactionProcessingDocument
WorkflowIntegration
(Apache Axis)
Attachments(Java IO)
PersistenceServices
(OJB)
MaintenanceData
Dictionary(XML)
TransactionProcessing
DataDictionary
(XML)BusinessObject(POJO)
Lookups
Inquiries
BusinessObjectData
Dictionary(XML)
Data DictionaryServices
(XStream)
Custom Tags(JSTL)
Authentication(Servlet Filter/
CAS)
Authorization(Kuali/Workflow) APC
RulesService
CustomAttributes
DocumentAuthorizer
Service
Notes
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Lessons and Dirty Laundry
• Spring transaction management– Don’t mix transactional services with non-
transactional services
• Documentation – “great here, bad there”
• Some inter-module dependencies
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
KNS Future Potential
• Solves pattern problems in an elegant fashion
• Why just Kuali?
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Enablers
© 2006, The Trustees of Cornell University© 2006, The Trustees of Indiana University
Questions?
Technical Q&A SessionTuesday, 4/11 at 9:00AM
Aaron GodertDevelopment Manager
Brian McGoughLead Architect