370 likes | 483 Vues
Exlibris : Developers Meet Developers Feb. 1-2, 2010 Voyager To NUFinancials ( peoplesoft ) System ( for Invoice Payment ) Michael North Northwestern University firstname.lastname@example.org. Our Need. University financial system implemented a new Peoplesoft Financial System.
E N D
Exlibris: Developers Meet DevelopersFeb. 1-2, 2010Voyager To NUFinancials(peoplesoft) System(for Invoice Payment)Michael NorthNorthwestern Universitymemail@example.com
Our Need University financial system implemented a new Peoplesoft Financial System. Need a method to transfer Voyager acquisition data (invoices) to this new system so Library does not have to "cut checks." 3 year project that finished last year. Programming Team: Steve DiDomenico (heavy lifter) and Michael North.
Issues to Consider Object Oriented Programming techniques Perl is not a OOP language but used OOP techniques - provides modularity ! Matching "payment" vendor address. (remit_sequence_nbrin line5 of payment address – matching Voyager payment address to the address in Peoplesoft) Accounting Chart String (peoplesoft). Stored in institution ID of FUND record. Running Script Options Production (batch), test (no sending), Individual Invoice (or list of invoice numbers) Allow for Memo Voucher – "do not send" Built-in Error Checking File Locking RunDate Tracking Log File log the xml sent to Peoplesoft server
Peoplesoft Vendor Code and Remit SeqAddress Link PS Vendor Code Remit Seq Address
RunDate Tracking, File Locking, Log FileFiles other than Perl programs • timefile.config - a configuration file containing the lastrundate and nextrundate, which determines if the script should run, and how far back it should query the database for invoices • lockfile.lock - a lockfile which, when locked, prevents other instances of the script from running. The presence of the lockfile doesn't determine locking; the *locking* of the lockfile does. • log.txt - a log of the script's activity
Additional Perl Modules (other than those which come with Voyager install) Need to add the following Perl modules: XML::Writer - Perl extension for writing XML documents. XML::Writer is a helper module for Perl programs that write an XML document. LWP::UserAgent - Web user agent class The LWP::UserAgent is a class implementing a web user agent. LWP::UserAgent objects can be used to dispatch web requests. HTTP::Request - HTTP style request message HTTP::Request is a class encapsulating HTTP style requests, consisting of a request line, some headers, and a content body. HTTP::Response - HTTP style responsemessage Response objects are returned by the request() method of the LWP::UserAgent: Installed second Perl install to minimize impact of Voyager upgrades.
Component Parts of Voyager Interface Voycafe.pl (can run as prod, test, or using a list of invoice ID's) Café.pm VoyDatabase.pm Voucher.pm VoucherLline.pm DistribLine.pm Send.pm Report.pm timefile.conf(stores lastrundate and nextrundate) Log<date>.txt Lockfile.lock
Log File – first part Test Run – we normally have 300+ invoices with fewer errors