application modernization:

53
Application Modernization: Brotherhood Mutual Insurance Co.’s Claims Application Mike Prinster – Sirius Computer Solutions

Upload: nishan

Post on 08-Jan-2016

91 views

Category:

Documents


4 download

DESCRIPTION

Application Modernization:. Brotherhood Mutual Insurance Co.’s Claims Application Mike Prinster – Sirius Computer Solutions [email protected]. Goals of the Claims System. “Create a graphical interface for the current claims system.” - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Application Modernization:

Application Modernization:

Brotherhood Mutual Insurance Co.’s Claims Application

Mike Prinster – Sirius Computer Solutions

[email protected]

Page 2: Application Modernization:

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.

Page 3: Application Modernization:

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

Page 4: Application Modernization:

• Presentation Layer

• Business Logic Abstraction Layer

• iSeries Business Logic Layer (RPG)

Page 5: Application Modernization:

“Show me claim #123…”

Page 6: Application Modernization:

Presentation Layer

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

Page 7: Application Modernization:

Business Logic Abstraction Layer

• Facades hide details from higher-level layers• Facades manage RIO interactions, iSeries connections• RIOs encapsulate 1+ RPG method calls

Page 8: Application Modernization:

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)

Page 9: Application Modernization:

A Day In The Life of a RIO

RPG InvocationObject

Invo

ke

Ret

urn

RPG Program

RPG Request Broker

Java reflection, IBM Toolbox for Java and

XML used to place values on data queue

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

Return code and parms sent back to invoking

Java method that called PCML (e.g. error,

success)

Java Reflection, IBM Toolbox for Java and XML used to retrieve

values from data queue

Page 10: Application Modernization:

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)

Page 11: Application Modernization:

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

Page 12: Application Modernization:

Thank you!

Questions?

[email protected]

Page 13: Application Modernization:

Hurdles of Java Development

Robin [email protected]

November 8, 2005

Page 14: Application Modernization:

Hurdles

• MVC Architecture

• Java Inheritance

• Java Multi-Threading

Page 15: Application Modernization:

Model / View / Controller Architecture

Page 16: Application Modernization:

MVC – Model

ModelManages data• Java Beans• IBM Toolbox

Controller

View

Page 17: Application Modernization:

MVC – View

ModelManages data• Java Beans• IBM Toolbox

Controller

ViewGraphical presentation• Java Server

Pages

Page 18: Application Modernization:

MVC – Controller

ModelManages data• Java Beans• IBM Toolbox

ControllerConnects Model with View• Struts• Java Server

Faces

ViewGraphicalpresentation• Java Server

Pages

Page 19: Application Modernization:

MVC – Transitioning from RPG

?*************************************************** ?* CALL PROGRAM TO DISPLAY THE TERRITORY HELP MEMBER ?*************************************************** Ftblste if e k disk Fdf0807 cf e workstn D @spl s 1 D @tpgm s 6 D member s 10 * B001 C dou *in01 = *on 001 C move 'P' @spl 001 C exfmt disply 001 C* B002 C if *in01 <> *on 002 C @sstno chain tblste B003 C if *in99 = *on

?*************************************************** ?* CALL PROGRAM TO DISPLAY THE TERRITORY HELP MEMBER ?*************************************************** Ftblste if e k disk Fdf0807 cf e workstn D @spl s 1 D @tpgm s 6 D member s 10 * B001 C dou *in01 = *on 001 C move 'P' @spl 001 C exfmt disply 001 C* B002 C if *in01 <> *on 002 C @sstno chain tblste B003 C if *in99 = *on

View

Model

Controller

Page 20: Application Modernization:

Java Inheritance

Page 21: Application Modernization:

Inheritance – Objects

TricycleWheelPedal

Must have2 pedals

Handlebar

CycleWheelPedal

Must have2 pedals

“is a” relationship (extends)

Page 22: Application Modernization:

Inheritance - Risk

BaseRIO

StatRIOPolicyBasicRIO

Claim Façade

getWorkersCompPageSetup()getCasualtyPageSetup()getPropertyPageSetup()

Before

Page 23: Application Modernization:

Claim Façade

getWorkersCompPageSetup()getCasualtyPageSetup()getPropertyPageSetup()

Inheritance - Risk

BaseRIO

StatRIOPolicyBasicRIO GenericCoverageExtRIO

After

Page 24: Application Modernization:

Java Multi-Threading

Page 25: Application Modernization:

Single Threading

• Single stream of execution

Enter check information

Print check

Update check register

Page 26: Application Modernization:

Multi-Threading

• More than one stream of execution

Print check Update check register

Enter check information

Page 27: Application Modernization:

Multi-Threading

<INPUT type=“submit" name="Next" value="Next &gt;" class="bmiButtonText" onclick="return

doSubmit('Next',this.form)">

<INPUT type=“submit" name="Next" value="Next &gt;" class="bmiButtonText" onclick="return

doSubmit('Next',this.form)">

Selected EntriesCoverage Extension Description Cause of LossAntennas 0101 Church Breakage-M1

Next > (invokes PropertyAction class)

Set ReservesSet Reserves

Line Cause Description

Page 28: Application Modernization:

Hurdles

• MVC Architecture

• Java Inheritance

• Java Multi-Threading

Page 29: Application Modernization:

Resources

• BooksJava Design Building Better Apps & Applets

By Coad, Mayfield, & Kern, Yourdon Press

Java Server Faces in ActionBy Kito Mann, Manning Publications

Struts in ActionBy Husted, Dumoulin, Franciscus, & Winterfeldt,

Manning Publications

Page 30: Application Modernization:

Resources

• Favorite WebsitesApache Struts

http://struts.apache.org/index.html

IBM developerWorkshttp://www-130.ibm.com/developerworks/

Java Technologyhttp://developer.java.sun.com/

The ServerSidehttp://www.theserverside.com/tss

Page 31: Application Modernization:

Role Playing Games

Jared Gerber

[email protected]

260-481-9906

November 8, 2005

Page 32: Application Modernization:

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

Page 33: Application Modernization:
Page 34: Application Modernization:

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

Page 35: Application Modernization:

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   --> <!-- 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>

Page 36: Application Modernization:

Key Elements

• Consistent interface (Broker program)

• Interface document (contract between Java and RPG)

Page 37: Application Modernization:

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

Page 38: Application Modernization:

/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

Page 39: Application Modernization:

*===================================================================== * 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

Page 40: Application Modernization:

*===================================================================== * 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

Page 41: Application Modernization:

/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;

Page 42: Application Modernization:

// 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

Page 43: Application Modernization:

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)

Page 44: Application Modernization:
Page 45: Application Modernization:

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

Page 46: Application Modernization:

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   --> <!-- 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>

Page 47: Application Modernization:

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

Page 48: Application Modernization:

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

Page 49: Application Modernization:

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

Page 50: Application Modernization:
Page 51: Application Modernization:
Page 52: Application Modernization:
Page 53: Application Modernization: