TS_GL_0049_Create Trial Balance in KFS

Enterprise Business Systems Projects
[Technical-Specification-Template]
KFS Technical Specification Document
TS_GL_0049_Create Trial Balance in KFS
Michigan State University
Date Created:
02/09/2010
Date Last Updated:
Disposition:
Draft
Priority :
TBD
Page 1 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
Table of Contents
1
2
Purpose.................................................................................................................................... 3
Design Description.................................................................................................................. 3
2.1 Detailed design description: ............................................................................................. 3
2.2 Class Diagram (Optional): ............................................................................................... 9
2.3 Sequence Diagram (Optional): ......................................................................................... 9
2.4 Collaboration Diagram (Optional): .................................................................................. 9
3
Data Model.............................................................................................................................. 9
3.1 ER Diagram ...................................................................................................................... 9
3.2 New/Affected Data Entities (Field names are required) .................................................. 9
4
Unit Testing ............................................................................................................................ 9
5
Implementation/Deployment Notes ...................................................................................... 10
6
Interface Implementation Details (Required if this is an interface realization otherwise
optional): ....................................................................................................................................... 10
6.1 Interface Implementation Characteristics....................................................................... 10
6.1.1 Source System (s) ................................................................................................... 10
6.1.2 Frequency................................................................................................................ 10
6.1.3 Timing ..................................................................................................................... 10
6.1.4 Sizing ...................................................................................................................... 10
6.1.5 Format ..................................................................................................................... 10
6.1.6 Security ................................................................................................................... 10
6.1.7 Other ....................................................................................................................... 11
6.2 System Outputs .............................................................................................................. 11
6.3 Operational Notes ........................................................................................................... 11
7
Performance Considerations ................................................................................................. 11
8
Reports .................................................................................................................................. 11
9
Functional Specification References..................................................................................... 11
10 Related Issues........................................................................................................................ 11
11 Final Sign Off ....................................................................................................................... 11
Page 2 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
Introduction
The purpose of this document is to describe the technical implementation of the functional requirement
outlined in ‘RQ_GL_0049_Create Trial Balance in KFS.docx’. Please refer to Section 6 for functional
details.
1 Purpose
The purpose of this AER is to generate Trial Balance report with year to date amount directly from Kuali
Financial System. We provide a link called “Trial Balance” from ‘Main menu’ -> report. The role of KFSSYS user is granted with the permission of accessing this link and generating the report.
The trial balance report lookup screen not only has the KFS lookup functionality. It also provides an extra
button called “generate print file”. Using this button, the user can download and print PDF format of trial
balance report. At the same time, the PDF report is also saved in the GL report staging folder which can
be reviewed by the user at the later time. The saved trial balance PDF report can be accessed using the
“Batch File” link from Administration -> System.
2
2.1
Design Description
Detailed design description:
1. Creating a business object class serving for trial balance lookup.
The new Business object (BO) is added to the package:
edu.msu.ebsp.kfs.gl.businessobject.TrialBalanceReport
Since trial balance lookup is based on GL balance table. We can extend Balance BO to Trial
Balance BO. The class diagram is showed below.
delivered org.kuali.kfs.gl.businessobject.
Balance
-...
MSU new BO: edu.msu.ebsp.kfs.gl.businessobject.
-beginningFiscalYear
-debitAmount
-creditAmount
-finChartOfAccountDescription
2. Creating the xml file representing the TrialBalanceReport BO.
In this xml file, besides setting up the property attribute, we should also set up
‘lookupFields” and “resultFields” as the desired format in FDS.
Page 3 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
The new xml file can be found at the path:
edu/msu/ebsp/kfs/gl/businessobject/datadictionary/TrialBalanceReport.xml
3. Added action class, form class and jsp file for web display
Trial balance report main functional screen is a lookup-style screen. Also, this screen
should support generating pdf report functionality. The current RICE lookup framework
has extension limitation to support this extra button for pdf generating. The solution is to
provide the suite of web code include action class, form class and customized jsp file.
The action class extends from KualiLookupAction class and mainly implement three
methods search(), print(),viewResults(). search() is responsible for handing search action
on the Trial Balance Lookup screen. print() is taking care of generating the pdf file,
saving it to the stating folder and sending back as the response to the client browser.
viewResults() helps to display multiple pages of search results.
Added the web display related code to the package:
edu.msu.ebsp.kfs.gl.web.struts.TrialBalanceReportAction
edu.msu.ebsp.kfs.gl.web.struts.TrialBalanceReportForm
kfs/work/web-root/jsp/gl/TrialBalanceReportLookup.jsp
Then, we need to update the report.tag file locating at the ‘WEBINF/tags/portal/channel/main/reports.tag’ to update the link for ‘trial balance’ report.
Also, we should update WEB-INF/struts-config.xml to include this new form and
complete the action mapping.
<form-bean name="TrialBalanceReportForm"
type="edu.msu.ebsp.kfs.gl.web.struts.TrialBalanceReportForm"
/>
…
<action-mappings>
<action path="/glTrialBalance"
name="TrialBalanceReportForm"
type="edu.msu.ebsp.kfs.gl.web.struts.TrialBalanceReportAction"
scope="request" parameter="methodToCall" validate="false"
attribute="KualiForm" >
<forward name="basic"
path="/jsp/gl/TrialBalanceReportLookup.jsp" />
</action>
</action-mappings>
The class diagram is showed below.
Page 4 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
org.kuali.rice.kns.web.struts.action.KualiLookupAction
-...
+...()
edu.msu.ebsp.kfs.gl.web.struts.TrialBalanceReportAction
-addlChgAcctsService
+search()
+viewResults()
+print()
#generatePdfOutStream()
TrialBalanceReportAction
org.kuali.rice.kns.web.struts.form.LookupForm
-...
edu.msu.ebsp.kfs.gl.web.struts.TrialBalanceReportForm
-message
TrialBalanceReportForm
4. Creating Jasper report template xml file
iReport is a visual reporting tool for JasperReports. It relies on the jasper report compiler.
When we using it to generate jasper report template xml, we should use the same version
of Jasper compiler in KFS. Currently, KFS Jasper compiler version is 2.0.4.
We could install iReport 2.0.4 and generate the Jasper report xml. The report xml is
designed in accordance with MSU EBSP report template. The MSU and EBP logo are
inserted into the generated PDF file. When it runs without compilation error, we can
move it to the application folder and use to generate trial balance report.
The xml file is added to the folder at:
src/edu/msu/ebsp/kfs/gl/report/TrialBalanceReport.jrxml
5. Configuring the report information
To help to generate the PDF report, KFS framework provides the Jasper wrapper class
called ReportGenerationService and a information holder class called ReportInfoHolder
to collect the general report information, like report title, the name and directory for
reports etc. We need to set up the bean and its property value in the spring xml
msu/edu/ebsp/kfs/gl/msu-spring-gl.xml.
Page 5 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
<bean id="glTrialBalanceReportInfo"
class="org.kuali.kfs.sys.report.ReportInfoHolder" >
<property name="reportTitle" value="Trial Balance Report" />
<property name="reportFileName" value="gl_trial_balance_report" />
<property name="reportsDirectory" value="${reports.directory}/gl/" />
<property name="resourceBundleBaseName"
value="edu/msu/ebsp/kfs/gl/report/messages" />
<property name="reportTemplateClassPath"
value="edu/msu/ebsp/kfs/gl/report/" />
<property name="reportTemplateName" value="TrialBalanceReport" />
<property name="subReportTemplateClassPath"
value="org/kuali/kfs/module/ec/report/" />
<property name="subReports">
<map>
</map>
</property>
</bean>
6. Creating TrialBalanceLookupableHelperServiceImpl for generating the search results
(getSearchResults()), search result inquiry url (getInquiryUrl()), validate user input of
search criteria(validateSearchParameters()).
Added TrialBalanceLookupableHelperServiceImpl to the package:
edu.msu.ebsp.kfs.gl.businessobject.lookup. TrialBalanceLookupableHelperServiceImpl
Also, we need to update the spring xml to include this service:
msu/edu/ebsp/kfs/gl/msu-spring-gl.xml
<bean id="glTrialBalanceLookupableHelperService"
class="edu.msu.ebsp.kfs.gl.businessobject.lookup.TrialBalanceLookupableHelperServ
iceImpl" scope="prototype">
<property name="trialBalanceService" ref="trialBalanceService" />
</bean>
<bean id="glTrialBalanceReportLookupable"
class="org.kuali.rice.kns.lookup.KualiLookupableImpl" scope="prototype">
<property name="lookupableHelperService">
<ref bean="glTrialBalanceLookupableHelperService" />
</property>
</bean>
Below is the class diagram for TrialBalanceLookupableHelperServiceImpl
Page 6 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl
+validateSearchParameters()
+getInquiryUrl()
+getSearchResults()
edu.msu.ebsp.kfs.gl.businessobject.lookup.
TrialBalanceLookupableHelperServiceImpl
-additionalChargeAccountsService
+getInquiryUrl()
+getSearchResults()
+validateSearchParameters()
#buildBalanceCollection()
#updateReportListWithTotalAmount()
7. Service and DAO
(1) We provide a service class to help generate pdf file using jasper and get the search
results from the balance table.
Added the interface class and its implementation at:
edu.msu.ebsp.kfs.gl.service.TrialBalanceService
edu.msu.ebsp.kfs.gl.service.impl.TrialBalanceServiceImpl
The class diagram is showed as below.
«interface»
edu.msu.ebsp.kfs.gl.service.TrialBalanceService
+findTrialBalance()
+generateReportForExtractProcess()
edu.msu.ebsp.kfs.gl.service.impl.TrialBalanceServiceImpl
+findTrialBalance()
+generateReportForExtractProcess()
(2) For database access, we created a DAO file and DAOJdbc file to get the data from
database. The reason we select JDBC over OJB is due to the performance
consideration for this ad-hoc report. OJB will take much longer time and more
memory space for each proxy object, which is not a good selection for ad-hoc report
generating.
Added the DAO interface and the JDBC code at:
edu.msu.ebsp.kfs.gl.dataaccess.TrialBalanceDao
edu.msu.ebsp.kfs.gl.dataaccess.impl.TrialBalanceDaoJdbc
Page 7 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
The class diagram is showed as below.
«interface»
edu.msu.ebsp.kfs.gl.dataaccess.TrialBalanceDao
+findBalanceByFields()
edu.msu.ebsp.kfs.gl.dataaccess.impl.TrialBalanceDaoJdbc
+findBalanceByFields()
(3) Update the spring xml file for the above service and DAO class
Updated the file at ‘msu/edu/ebsp/kfs/gl/msu-spring-gl.xml’ with the following lines.
<bean id="trialBalanceDao" parent="platformAwareDaoJdbc"
class="edu.msu.ebsp.kfs.gl.dataaccess.impl.TrialBalanceDaoJdbc">
</bean>
<bean id="trialBalanceService"
class="edu.msu.ebsp.kfs.gl.service.impl.TrialBalanceServiceImpl">
<property name="trialBalanceDao" ref="trialBalanceDao" />
<property name="glTrialBalanceReportInfo" ref="glTrialBalanceReportInfo"
/>
<property name="reportGenerationService" ref="reportGenerationService" />
<property name="dateTimeService" ref="dateTimeService" />
<property name="ebsLogoPath"
value="${externalizable.images.url}/ebslogo.jpg" />
<property name="msuLogoPath"
value="${externalizable.images.url}/msulogo.jpg" />
</bean>
…
8. Adding KIM configuration for allowing KFS-SYS user to access “Trial Balance” link.
The sql file in charge of the KIM configuration was committed with the name
98_main.sql
Page 8 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
-- ASR-1212: added the permission for accessing trial balance report screen.
configure 'KFS-SYS user'(role_id=54) with the permission
insert into krim_perm_t(perm_id,ver_nbr,perm_tmpl_id, nmspc_cd, nm, desc_txt,
actv_ind)
values(KRIM_PERM_ID_S.NEXTVAL,1,29,'KFS-GL','Use Screen','Allows users to access
Trial Balance Report screen. ','Y')
/
insert into krim_perm_attr_data_t(attr_data_id,ver_nbr,perm_id, kim_typ_id,
kim_attr_defn_id, attr_val)
values(KRIM_ATTR_DATA_ID_S.nextval,1,KRIM_PERM_ID_S.CURRVAL,12,2,'edu.msu.ebsp.kf
s.gl.web.struts.TrialBalanceReportAction')
/
insert into krim_role_perm_t(role_perm_id,role_id,perm_id)
values(krim_role_perm_id_s.NEXTVAL,54,KRIM_PERM_ID_S.CURRVAL)
/
2.2
Class Diagram (Optional):
2.3
Sequence Diagram (Optional):
Sequence diagram for class interaction related to current realization.
2.4
Collaboration Diagram (Optional):
Collaboration diagram for class interaction related to current realization.
3 Data Model
3.1
ER Diagram
3.2
New/Affected Data Entities (Field names are required)
The SQL files involved in this ASR include: 98_main.sql and the tables being updated include:
krim_perm_t, krim_perm_attr_data_t, krim_role_perm_t
New/Affected Data Entities (Field names are required)
4 Unit Testing
1. Test cases added
TrialBalanceServiceTest#testFindTrialBalance_IncreaseAmt
TrialBalanceServiceTest#testFindTrialBalance_DecreaseAmt
TrialBalanceLookupableHelperServiceTest#testGetSearchResults
TrialBalanceLookupableHelperServiceTest#testGetInquiryUrl_notEmpty
Page 9 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
TrialBalanceLookupableHelperServiceTest#testGetInquiryUrl_empty
TrialBalanceLookupableHelperServiceTest#testValidateSearchParameters_validFiscalYear
TrialBalanceLookupableHelperServiceTest#testValidateSearchParameters_invalidFY
5 Implementation/Deployment Notes
Describe any specific implementation information related to this functionality. Describe any special
deployment options that relate to this functionality such as clustering, load balancing, application server
versions etc.
6 Interface Implementation Details (Required if this is an interface
realization otherwise optional):
6.1
Interface Implementation Characteristics
6.1.1 Source System (s)
[A high level description of the source system(s) that access this interface. Also indicate the type
if possible - Relational Database, Positional Flat File, Delimited Flat File, Java API, C API,
XML File, Other (Indicate the type)]
6.1.2 Frequency
[Indicate how often this interface is accessed, e.g., once a week, 500 times a day, etc. If it is
accessed by multiple systems list them all.]
6.1.3 Timing
[Does this interface need to be run at a certain time, or between certain time periods?]
6.1.4 Sizing
6.1.4.1 Transfer Rates
[Indicate expected transfer rates, e.g., must be able to load X records per minute]
6.1.4.2 Number of records/transfer
[Indicate number of records per transfer]
6.1.4.3 Estimated size of a record
[Indicate estimated size of record (e.g. 100 bytes, 10K, etc.)]
6.1.5 Format
[Reference the interface definition document]
6.1.6 Security
[List known security issues, e.g., login required, firewalls, etc]
Page 10 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1
Enterprise Business Systems Projects
[Technical-Specification-Template]
6.1.7 Other
[Indicate any other “good things to know.]
6.2 System Outputs
[Indicate output and/or error return codes when this interface is executed. Also list any reports
created and their location. ]
6.3 Operational Notes
[Important notes for operations e.g. Log file locations to check, steps to perform for specific
return codes e.g. rerun the batch script etc.]
7 Performance Considerations
Describe any performance considerations that relate to this functionality such as database, application
server, web server, and/or batch process parameters that may need to be set. This section will also
include caching mechanisms that were utilized or indexes that were created to achieve better
performance.
8 Reports
Describe any reports that have been created as part of realizing this functionality.
9 Functional Specification References
The functional specification document can be found in the Global Finalized Document folder in the
Finance
Team’s
Document
Library.
The
name
of
the
document
is:
“RQ_GL_0049_CreateTrialBalanceinKFS_Enhancement”
10 Related Issues
Include ASRs that were resolved while realizing this functionality.
Issue List:
Reference
to Closed
Issue
Number
ASR-1212
Description of Issue Resolution
RQ_GL_0049_Create Trial Balance in KFS
11 Final Sign Off
Stakeholders will record their team/individual names to indicate sign off on this document. This section
must be completed when the functionality has been implemented and tested successfully.
Page 11 of 11
Copyright ©2008 Michigan State University. All rights reserved.
ebsp.msu.edu
Last edited: [12/31/2008]
Filename: Document1