1 / 53

Application Modernization:

Application Modernization:. Brotherhood Mutual Insurance Co.’s Claims Application Mike Prinster – Sirius Computer Solutions michael.prinster@siriuscom.com. Goals of the Claims System. “Create a graphical interface for the current claims system.”

nishan
Download Presentation

Application Modernization:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Application Modernization: Brotherhood Mutual Insurance Co.’s Claims Application Mike Prinster – Sirius Computer Solutions michael.prinster@siriuscom.com

  2. Goals of the Claims System • “Create a graphical interface for the current claims system.” • All business logic, whether existing or new, must reside in RPG code. • Users will interact with the Claims system using a web browser.

  3. The Players • DB2 on iSeries Database • RPG for Business Logic • IBM Toolbox for Java for Java-to-RPG communications • Java and Struts on WebSphere Application Server on the iSeries for user interface

  4. Presentation Layer • Business Logic Abstraction Layer • iSeries Business Logic Layer (RPG)

  5. “Show me claim #123…”

  6. Presentation Layer • Struts Web Application Framework • Model-View-Controller (MVC) Architecture • We won’t spend much time here tonight…

  7. Business Logic Abstraction Layer • Facades hide details from higher-level layers • Facades manage RIO interactions, iSeries connections • RIOs encapsulate 1+ RPG method calls

  8. iSeries Business Logic Layer • RPG Request Broker receives all calls from Java, delegates to appropriate RPG program(s) • Information exchanged with Java via PCML calls or on data queue (or both)

  9. A Day In The Life of a RIO Java Reflection, IBM Toolbox for Java and XML used to retrieve values from data queue Java reflection, IBM Toolbox for Java and XML used to place values on data queue Return code and parms sent back to invoking Java method that called PCML (e.g. error, success) PCML used to invoke RPG broker via IBM Toolbox for Java Broker invokes designated RPG program RPG program returns response and/or places values on data queue

  10. Boy, that’s a lot of layers! • If you anticipate only a few RPG-Java interactions, a framework like Claims’ is more than you need (Claims has over 100) • If you anticipate many projects, each with a few RPG-Java interactions, you’ll still end up ahead in the long run with a framework • If performance is a requirement, consider a framework (more on this later)

  11. Claims Architecture Benefits • “But the wizard in WDSc takes two minutes!” • iSeries connection pooling for performance • Standardized, repeatable solution – adding each new RPG-Java interaction is straightforward once framework is in place • Can swap out or add technologies on the lower layers without breaking the system • Robust performance: over 99% uptime

  12. Thank you! Questions? • michael.prinster@siriuscom.com

  13. Hurdles of Java Development Robin Anglin ranglin@brotherhoodmutual.com November 8, 2005

  14. Hurdles • MVC Architecture • Java Inheritance • Java Multi-Threading

  15. Model / View / Controller Architecture

  16. Model Controller View • Manages data • Java Beans • IBM Toolbox MVC – Model

  17. Model Controller View • Manages data • Java Beans • IBM Toolbox • Graphical • presentation • Java Server • Pages MVC – View

  18. Model Controller View • Manages data • Java Beans • IBM Toolbox • Connects Model • with View • Struts • Java Server • Faces • Graphical • presentation • Java Server • Pages MVC – Controller

  19. MVC – Transitioning from RPG View Controller Model

  20. Java Inheritance

  21. Cycle Wheel Pedal Must have 2 pedals Inheritance – Objects “is a” relationship (extends) Tricycle Wheel Pedal Must have 2 pedals Handlebar

  22. Claim Façade getWorkersCompPageSetup() getCasualtyPageSetup() getPropertyPageSetup() BaseRIO StatRIO PolicyBasicRIO Inheritance - Risk Before

  23. Claim Façade getWorkersCompPageSetup() getCasualtyPageSetup() getPropertyPageSetup() BaseRIO StatRIO PolicyBasicRIO GenericCoverage ExtRIO Inheritance - Risk After

  24. Java Multi-Threading

  25. Single Threading • Single stream of execution Enter check information Print check Update check register

  26. Multi-Threading • More than one stream of execution Enter check information Print check Update check register

  27. Selected Entries Coverage ExtensionDescriptionCause of Loss Antennas 0101 Church Breakage-M1 Next > Set Reserves Line Cause Description Multi-Threading (invokes PropertyAction class) <INPUT type=“submit" name="Next" value="Next &gt;" class="bmiButtonText" onclick="return doSubmit('Next',this.form)">

  28. Hurdles • MVC Architecture • Java Inheritance • Java Multi-Threading

  29. Resources • Books Java Design Building Better Apps & Applets By Coad, Mayfield, & Kern, Yourdon Press Java Server Faces in Action By Kito Mann, Manning Publications Struts in Action By Husted, Dumoulin, Franciscus, & Winterfeldt, Manning Publications

  30. Resources • Favorite Websites Apache Struts http://struts.apache.org/index.html IBM developerWorks http://www-130.ibm.com/developerworks/ Java Technology http://developer.java.sun.com/ The ServerSide http://www.theserverside.com/tss

  31. RolePlayingGames Jared Gerber jgerber@brotherhoodmutual.com 260-481-9906 November 8, 2005

  32. A Holistic View • My job is a whole lot more than writing code • This project has taught me a lot about … • Insurance claims and how they work • The inter-continental office • Using a methodology to develop a system • User designed applications • Project tracking and coordination • The process is as important as the product

  33. Session ID 32A Unique to each browser session User ID 10A Derived from LDAP and passed by Java Request/Action 32A This tell the Broker program what to do Key Type 10A Indicates the type of key value being passed Key Value 24A Actual key value being passed Status 1A E,W,I,S (see note) Message 64A Detail informational message # of DQ Entries 5A Number of entries in the data queue

  34. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> • <!-- Get single claim detail for agent in uc71 --> • - <request name="getAgencyClaimDetail" cached="false" UC="71"> • <requestDesc>Get Agent Claim Detail</requestDesc> • - <pcml fileName="claimsBase"> • <parm keyType="agencyID (format: nnnn) or *ALL (to disregard agencyid for BMI users)" optional="false" /> • <parm keyValue="ClaimNumber (format: nnnnnn)" optional="false" /> • </pcml> • <rfml fileName="fieldMap.xml"> • <!-- Return agent claim. --> • <retrieveDQ struct="agentClaimDetail" key="claimDetail" layout="DQCRAGTCLM" /> <!-- Return list of claim payments. --> • <retrieveDQ struct="agentPayment" key="payment" layout="DQCRAGTPMT" /> • <!-- Return list of claimants. --> • <retrieveDQ struct="agentClaimant" key="claimant" layout="DCCRAGTCMT" /> • <!-- Return list of Generic Descriptions for vehicle or property, etc. --> • <retrieveDQ struct="genericDescription" key="genericDescription" layout="DQCRGENDSC" /> • <!-- Return list of drivers for auto claims --> • <retrieveDQ struct="text" key="drivers" layout="comma separated (1000 bytes)" /> • </rfml> • </request>

  35. Key Elements • Consistent interface (Broker program) • Interface document (contract between Java and RPG)

  36. RPG Coding Standards • These were in addition to current shop standards • New programs were written /free • Created pgms using a named activation group (QILE) • Prototyped all calls, procedure, & *entry parms (D-specs) • No key lists chain (state:type:policy#) polhdr; • Each program would do one and only one task • Made every effort to keep main logic concise • Introduced Date and Timestamp fields to database • Introduced Varying Length fields • Extensive use of BIF’s • Required code to be efficient • Implemented Peer Code Reviews • Modular, reusable, top down flow

  37. /TITLE Claims Get Generic Cause of Loss *===================================================================== * Compile with DFTACTGRP(*NO) ACTGRP(QILE) BNDDIR(BMIBNDDIR) *===================================================================== * Program runs in an environment that Shares Open Data Paths *===================================================================== ********************************************************************** * Program: OL0549 * Description: Claims Get Generic State Abrv and Name - getGenStates * ********************************************************************** Ftblstal2 if e k disk *===================================================================== * Prototype for Input Parameters (*ENTRY replacement) *===================================================================== d ol0549 pr extpgm('OL0549') d 178 d ol0549 pi d Linkage 178

  38. *=====================================================================*===================================================================== * Prototype for Calls to External Programs *===================================================================== * API to Send Data to Data Queue d qsnddtaq pr extpgm('QSNDDTAQ') * Data Queue Name d 10 * Data Queue Library d 10 * Data Sent Length d 5 0 * Data Sent d 1024 * Data Queue Key Length d 3 0 * Data Queue Key d 64 *===================================================================== * Linkage Structure and Format Data Structures *===================================================================== d Prog_parms e ds extname(CRBROPARMS) d GenericDescDS e ds extname(DQCRGENDSC) *===================================================================== * Procedure Prototypes *===================================================================== * File Procedures /Define ProtoOnly /Copy *libl/qrpgsrc,mdstring

  39. *=====================================================================*===================================================================== * Work Variables *===================================================================== D quenam s 10 inz('CRDTAQ') D quelib s 10 inz('*LIBL') D datalen s 5 0 D data s 1024 D keyLen s 3 0 D key s 64 D dqcount s 5 0 d errors s n

  40. /free // ============================================================== // Main Process // ============================================================== Prog_parms = linkage; dqcount = *zeros; setll *loval tblstal2; dou %eof(tblstal2); read tblstal2; if %eof(tblstal2); leave; endif; gndesc = PropCase(stname); gnkey = stabrv + %editc(stnumb:'X'); // Fix mixed case issues if stname = 'WASHINGTON DC'; %subst(gndesc:13:01) = 'C'; endif;

  41. // Put data in data queue datalen = %len(GenericDescDS); data = GenericDescDS; keylen = 64; key = p_sesID + 'GenericStates'; callp(e) qsnddtaq(quenam:quelib:datalen:data:keylen:key); if %error; eval errors = *on; P_Status = 'E'; P_Msg = 'Error putting data in Data Queue'; leave; endif; dqcount = dqcount + 1; enddo; if not errors; p_status = 'S'; P_msg = *blanks; p_dqent = %editc(dqcount:'X'); endif; linkage = Prog_parms; return; /end-free

  42. RPG Concepts and Approaches • Each program satisfies an event or Java request (gets/puts) • Memory Resident, Reentrant (no LR) for performance • Shared ODP (Open Data Paths) for performance • Keyed data queues (64A)

  43. Session ID 32A Unique to each browser session User ID 10A Derived from LDAP and passed by Java Request/Action 32A This tell the Broker program what to do Key Type 10A Indicates the type of key value being passed Key Value 24A Actual key value being passed Status 1A E,W,I,S (see note) Message 64A Detail informational message # of DQ Entries 5A Number of entries in the data queue

  44. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> • <!-- Get single claim detail for agent in uc71 --> • - <request name="getAgencyClaimDetail" cached="false" UC="71"> • <requestDesc>Get Agent Claim Detail</requestDesc> • - <pcml fileName="claimsBase"> • <parm keyType="agencyID (format: nnnn) or *ALL (to disregard agencyid for BMI users)" optional="false" /> • <parm keyValue="ClaimNumber (format: nnnnnn)" optional="false" /> • </pcml> • <rfml fileName="fieldMap.xml"> • <!-- Return agent claim. --> • <retrieveDQ struct="agentClaimDetail" key="claimDetail" layout="DQCRAGTCLM" /> <!-- Return list of claim payments. --> • <retrieveDQ struct="agentPayment" key="payment" layout="DQCRAGTPMT" /> • <!-- Return list of claimants. --> • <retrieveDQ struct="agentClaimant" key="claimant" layout="DCCRAGTCMT" /> • <!-- Return list of Generic Descriptions for vehicle or property, etc. --> • <retrieveDQ struct="genericDescription" key="genericDescription" layout="DQCRGENDSC" /> • <!-- Return list of drivers for auto claims --> • <retrieveDQ struct="text" key="drivers" layout="comma separated (1000 bytes)" /> • </rfml> • </request>

  45. RPG Concepts and Approaches • Each program satisfies an event or Java request (gets/puts) • Memory Resident, Reentrant (no LR) for performance • Shared ODP (Open Data Paths) for performance • Keyed data queues • Limited use of old code • Imbedded SQL • SQL on iSeries was new to shop • Primarily used for searches (programs written by Sirius consultant) • A real life saver

  46. Testing • Simple in the sense that if the data queue entries were right, you passed • Need to simulate a request to the broker • Viewing data queue entries (pass/fail) • Memory resident/reentrant so you need to reclaim activation group if you recompile • Complex data queue entries usually needed Java programmer involvement

  47. PGM /* Test Broker */ /*===================================================================*/ /* Program variables: */ DCL VAR(&P1) TYPE(*CHAR) LEN(32) DCL VAR(&P2) TYPE(*CHAR) LEN(10) DCL VAR(&P3) TYPE(*CHAR) LEN(32) DCL VAR(&P4) TYPE(*CHAR) LEN(10) DCL VAR(&P5) TYPE(*CHAR) LEN(24) DCL VAR(&P6) TYPE(*CHAR) LEN( 1) DCL VAR(&P7) TYPE(*CHAR) LEN(64) DCL VAR(&P8) TYPE(*CHAR) LEN( 5) DCL VAR(&MSG) TYPE(*CHAR) LEN(78) /*===================================================================*/ CHGVAR VAR(&P1) + VALUE('WKr3zNnaoYHfCKmGhx71NQ3 ') CHGVAR VAR(&P2) + VALUE('JGERBER ') CHGVAR VAR(&P3) + VALUE('getGenStates ') CHGVAR VAR(&P4) + VALUE(' ') CHGVAR VAR(&P5) + VALUE(' ') CHGVAR VAR(&P6) VALUE(' ') CHGVAR VAR(&P7) VALUE(' ') CHGVAR VAR(&P8) VALUE(' ') CALL PGM(OLCRBROKER) PARM(&P1 &P2 &P3 &P4 &P5 &P6 + &P7 &P8) CHGVAR VAR(&MSG) VALUE(&P8 *BCAT &P6 *BCAT &P7) SNDPGMMSG MSG(&MSG) /*===================================================================*/ END: ENDPGM

More Related