def productType = context.expand( '${RNL_MTA_ALL#ExProduct}' ) def cover = context.expand( '${RNL_MTA_ALL#ExCover_type}' ) String delimiters = "\\,|\\&"; String[] prodArr = productType.split(delimiters); StringBuilder Strbld = new StringBuilder() def payment = context.expand('${RNL_MTA_ALL#Payment type}') def id = context.expand( '${684#ID}' ) if(prodArr.length > 0) { for (prod in prodArr) { if(prod.trim().equals("Roadside")) { product="Roadside" Code="RO" if(cover.equals("V1")) { Productcode = "PRD_UK_0002" } else { Productcode = "PRD_UK_0001" } func_Check(productType,product,"RO",payment,id) } if(prod.trim().equals("HomeStart")||prod.trim().equals("Home Start")) { product= "HomeStart" func_Check(productType,product,"HS",payment,id) } if(prod.trim().equals("Relay")) { product= "Relay" func_Check(productType,product,"RE",payment,id) } if(prod.trim().equals("StayMobile")||prod.trim().equals("Stay Mobile")) { product= "StayMobile" func_Check(productType,product,"SM",payment,id) } } if(context.expand( '${RNL_MTA_ALL#EXBRC}' ).equals("Y")) { product= "BRC" func_Check(productType,product,"BRC",payment,id) } } def func_Check(productType,product,name,payment,id) { log.info product log.info id //Transaction price //def response = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:RenewalFlexDetails[1]/tns6:FlexFactor[1]}' ) def Flex = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:RenewalFlexDetails[1]/tns6:FlexFactor[1]}' ) def RiskIndicator = context.expand( '${RenewalE2E#Response#declare namespace tns=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; //tns:GenerateQuoteResponse[1]/tns:CommunityOrRiskIndicator[1]}' ) def CoreNet = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:CorePrice[1]/tns6:NetRate[1]}' ) def CoreNetTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:CorePrice[1]/tns6:NetRateTax[1]}' ) def CoreComm = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:CorePrice[1]/tns6:Commission[1]}' ) def CoreCommTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:CorePrice[1]/tns6:CommissionTax[1]}' ) def TaxTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:CorePrice[1]/tns6:TaxTotal[1]}' ) def CoreTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:CorePrice[1]/tns6:Total[1]}' ) def AAF = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:ArrangementFee[1]/tns6:Fee[1]}' ) def AAFTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:ArrangementFee[1]/tns6:FeeTax[1]}' ) def AAFTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:ArrangementFee[1]/tns6:Total[1]}' ) func_write(payment,"Flex","Flexfactor",Flex) func_write(payment,"Flex","RiskIndicator",RiskIndicator) func_write(payment,"CORE,Net",product,CoreNet) func_write(payment,"CORE,NetTax",product,CoreNetTax) func_write(payment,"CORE,Commission",product,CoreComm) func_write(payment,"CORE,CommissionTax",product,CoreCommTax) func_write(payment,"CORE,TaxTotal",product,TaxTotal) func_write(payment,"CORE,Total",product,CoreTotal) func_write(payment,"AAF,AAF",product,AAF) func_write(payment,"AAF,AAFTax",product,AAFTax) func_write(payment,"AAF,Total",product,AAFTotal) def response =context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:NetRate[1]}' ) log.info("response" + response) if( response.equals('')) { } else { Float R_ADNet=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:NetRate[1]}')) Float R_ADNetTax=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:NetRateTax[1]}')) Float R_ADComm=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:Commission[1]}')) Float R_ADCommTax=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:CommissionTax[1]}')) Float R_ADAAF=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:ArrangementFee[1]}')) Float R_ADAAFTax=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:ArrangementFeeTax[1]}')) Float R_ADIFD=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:InternallyFundedDiscount[1]}')) Float R_ADTaxPercentage=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:TaxPercentage[1]}')) Float R_ADTotal=Float.parseFloat(context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName="' + product + '"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:Total[1]}')) func_write(payment,"SysDisc,Net",product,R_ADNet) func_write(payment,"SysDisc,NetTax",product,R_ADNetTax) func_write(payment,"SysDisc,Commission",product,R_ADComm) func_write(payment,"SysDisc,CommissionTax",product,R_ADCommTax) func_write(payment,"SysDisc,AAF",product,R_ADAAF) func_write(payment,"SysDisc,AAFTax",product,R_ADAAFTax) func_write(payment,"SysDisc,IFD",product, R_ADIFD) func_write(payment,"SysDisc,Tax%",product, R_ADTaxPercentage) func_write(payment,"SysDisc,Total",product,R_ADTotal) } def Sysdisc1Node = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[1]/tns6:Code[1]}' ) log.info "Sysdisc1Node"+Sysdisc1Node def Sysdisc1net,Sysdisc1netTax,Sysdisc1comm,Sysdisc1commTax,Sysdisc1AAF,Sysdisc1AAFTax,Sysdisc1IFD,Sysdisc1Total if (Sysdisc1Node == ("DR2YPC17") || Sysdisc1Node == ("DR2YPC50")|| Sysdisc1Node == ("DR2YPC25")) { Sysdisc1net = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:NetRate[1]}' ) Sysdisc1netTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:NetRateTax[1]}' ) Sysdisc1comm = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:Commission[1]}' ) Sysdisc1commTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:CommissionTax[1]}' ) Sysdisc1AAF = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:ArrangementFee[1]}' ) Sysdisc1AAFTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:ArrangementFeeTax[1]}' ) Sysdisc1IFD = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:InternallyFundedDiscount[1]}' ) Sysdisc1Total = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:SystemDiscountList[1]/tns6:SystemDiscount[tns6:Code ="'+Sysdisc1Node+'"]/tns6:Total[1]}' ) func_write(payment,"SysDisc,Sysdisc1Net",product,Sysdisc1net) func_write(payment,"SysDisc,Sysdisc1NetTax",product,Sysdisc1netTax) func_write(payment,"SysDisc,Sysdisc1Commission",product,Sysdisc1comm) func_write(payment,"SysDisc,Sysdisc1CommissionTax",product,Sysdisc1commTax) func_write(payment,"SysDisc,Sysdisc1AAF",product,Sysdisc1AAF) func_write(payment,"SysDisc,Sysdisc1AAFTax",product,Sysdisc1AAFTax) func_write(payment,"SysDisc,Sysdisc1IFD",product,Sysdisc1IFD ) func_write(payment,"SysDisc,Sysdisc1Total",product,Sysdisc1Total) } def CoreDiscTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AccountingTotals[1]/tns6:CoreDiscountsTotal[1]}' ) def CoreDiscTaxTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AccountingTotals[1]/tns6:CoreDiscountsTaxTotal[1]}' ) def CoreCommDiscTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AccountingTotals[1]/tns6:CoreCommissionDiscountsTotal[1]}' ) def CoreNetDiscTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AccountingTotals[1]/tns6:CoreNetRateDiscountsTotal[1]}' ) def AAFGrandDiscTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AccountingTotals[1]/tns6:ArrangementFeeGrandDiscountsTotal[1]}' ) def AAFTaxDiscTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AccountingTotals[1]/tns6:ArrangementFeeTaxDiscountsTotal[1]}' ) def AAFDiscTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AccountingTotals[1]/tns6:ArrangementFeeDiscountsTotal[1]}' ) def ProdRel = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:RelativityPriceFactor[1]}' ) def Extrapolation = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:ExtrapolationFactor[1]}' ) def ProdAAFTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:ArrangementFeeTotal[1]}' ) def ProdTotalLessAAF = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:TotalLessArrangementFeeTotal[1]}' ) def ProdTotalLessDisc = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:TotalLessDiscounts[1]}' ) def ProdTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:Total[1]}' ) func_write(payment,"AccountingTotals,CoreDiscTotal",product,CoreDiscTotal) func_write(payment,"AccountingTotals,CoreDiscTaxTotal",product,CoreDiscTaxTotal) func_write(payment,"AccountingTotals,CoreCommDiscTotal",product,CoreCommDiscTotal) func_write(payment,"AccountingTotals,CoreNetDiscTotal",product,CoreNetDiscTotal) func_write(payment,"AccountingTotals,AAFGrandDiscTotal",product,AAFGrandDiscTotal) func_write(payment,"AccountingTotals,AAFTaxDiscTotal",product,AAFTaxDiscTotal) func_write(payment,"AccountingTotals,AAFDiscTotal",product,AAFDiscTotal) func_write(payment,"RelFactor",product,ProdRel) func_write(payment,"Extrapolation",product,Extrapolation) func_write(payment,"AAFTotal",product,ProdAAFTotal) func_write(payment,"TotalLessAAFTotal",product,ProdTotalLessAAF) func_write(payment,"TotalLessDisc",product,ProdTotalLessDisc) func_write(payment,"ProductTotal",product,ProdTotal) def AD_CHECK1 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:Code[1]}' ) if (AD_CHECK1!="") { def AD_Net = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:NetRate[1]}' ) def AD_NetTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:NetRateTax[1]}' ) def AD_Commission = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:Commission[1]}' ) def AD_CommissionTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:CommissionTax[1]}' ) def AD_AAF = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:ArrangementFee[1]}' ) def AD_AAFTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:ArrangementFeeTax[1]}' ) def AD_IFD = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:InternallyFundedDiscount[1]}' ) def AD_Total = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[1]/tns6:Total[1]}' ) func_write(payment,"AgentDiscount,Net",product,AD_Net) func_write(payment,"AgentDiscount,NetTax",product,AD_NetTax) func_write(payment,"AgentDiscount,Commission",product,AD_Commission) func_write(payment,"AgentDiscount,CommissionTax",product,AD_CommissionTax) func_write(payment,"AgentDiscount,AAF",product,AD_AAF) func_write(payment,"AgentDiscount,AAFTax",product,AD_AAFTax) func_write(payment,"AgentDiscount,IFD",product,AD_IFD) func_write(payment,"AgentDiscount,Total",product,AD_Total) } def RENOFFER = context.expand( '${RNL_MTA_ALL#Renewal Offer}' ) def RENOFFER_CHECK = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:Code[1]}' ) if (RENOFFER!="" && RENOFFER==RENOFFER_CHECK) { def REN_Net = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:NetRate[1]}' ) def REN_NetTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:NetRateTax[1]}' ) def REN_Commission = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:Commission[1]}' ) def REN_CommissionTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:CommissionTax[1]}' ) def REN_AAF = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:ArrangementFee[1]}' ) def REN_AAFTax = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:ArrangementFeeTax[1]}' ) def REN_IFD = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:InternallyFundedDiscount[1]}' ) def REN_Total = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+RENOFFER+'"]/tns6:Total[1]}' ) func_write(payment,"RenewalOffer,Net",product,REN_Net) func_write(payment,"RenewalOffer,NetTax",product,REN_NetTax) func_write(payment,"RenewalOffer,Commission",product,REN_Commission) func_write(payment,"RenewalOffer,CommissionTax",product,REN_CommissionTax) func_write(payment,"RenewalOffer,AAF",product,REN_AAF) func_write(payment,"RenewalOffer,AAFTax",product,REN_AAFTax) func_write(payment,"RenewalOffer,IFD",product,REN_IFD) func_write(payment,"RenewalOffer,Total",product,REN_Total) } def AD_CHECK2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[1]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:Code[1]}' ) if (AD_CHECK2!="") { def AD_Net2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:NetRate[1]}' ) def AD_NetTax2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:NetRateTax[1]}' ) def AD_Commission2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:Commission[1]}' ) def AD_CommissionTax2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:CommissionTax[1]}' ) def AD_AAF2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:ArrangementFee[1]}' ) def AD_AAFTax2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:ArrangementFeeTax[1]}' ) def AD_IFD2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:InternallyFundedDiscount[1]}' ) def AD_Total2 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:AgentDiscountList[1]/tns6:AgentDiscount[2]/tns6:Total[1]}' ) func_write(payment,"AgentDiscount2,Net",product,AD_Net2) func_write(payment,"AgentDiscount2,NetTax",product,AD_NetTax2) func_write(payment,"AgentDiscount2,Commission",product,AD_Commission2) func_write(payment,"AgentDiscount2,CommissionTax",product,AD_CommissionTax2) func_write(payment,"AgentDiscount2,AAF",product,AD_AAF2) func_write(payment,"AgentDiscount2,AAFTax",product,AD_AAFTax2) func_write(payment,"AgentDiscount2,IFD",product,AD_IFD2) func_write(payment,"AgentDiscount2,Total",product,AD_Total2) } //Transaction Offer validation def OFFER = "" def OLDOFFER = context.expand( '${RNL_MTA_ALL#Persistent Offer}' ) def OfferNode = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:Code[1]}' ) def Offernet3,OffernetTax3,Offercomm3,OffercommTax3,OfferAAF3,OfferAAFTax3,OfferIFD3,OfferTotal3 if (OLDOFFER !="" && OFFER != OLDOFFER) // if old offer needs to be clawed back { def OldOfferNode = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:Code[1]}' ) if (OldOfferNode !="") { Offernet3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:NetRate[1]}' ) OffernetTax3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:NetRateTax[1]}' ) Offercomm3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:Commission[1]}' ) OffercommTax3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:CommissionTax[1]}' ) OfferAAF3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:ArrangementFee[1]}' ) OfferAAFTax3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:ArrangementFeeTax[1]}' ) OfferIFD3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:InternallyFundedDiscount[1]}' ) OfferTotal3 = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:Product[tns6:ProductPriceName ="'+product+'"]/tns6:PriceList[1]/tns6:Price[1]/tns6:PriceBreakdown[1]/tns6:OfferCodeDiscountList[1]/tns6:OfferCodeDiscount[tns6:Code ="'+OLDOFFER+'"]/tns6:Total[1]}' ) func_write(payment,"Offer,Net",product,Offernet3) func_write(payment,"Offer,NetTax",product,OffernetTax3) func_write(payment,"Offer,Commission",product,Offercomm3) func_write(payment,"Offer,CommissionTax",product,OffercommTax3) func_write(payment,"Offer,AAF",product,OfferAAF3) func_write(payment,"Offer,AAFTax",product,OfferAAFTax3) func_write(payment,"Offer,IFD",product,OfferIFD3) func_write(payment,"Offer,Total",product,OfferTotal3) } } //Transaction Price Breakdown def GrandTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:Total[1]}' ) def GrandTotalExcDisc = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:TotalExcludingDiscounts[1]}' ) def DiscTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:DiscountTotal[1]}' ) def BaseCoverTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:BaseCoverTotal[1]}' ) def BaseCoverTotalLessDisc = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:BaseCoverTotalLessDiscounts[1]}' ) def BaseCoverAAFTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:BaseCoverArrangementFeeTotal[1]}' ) def TotalAAF = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:TotalArrangementFee[1]}' ) def FeeTotal = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:SurchargeFeeTotal[1]}' ) def TotalLessTotalAAFAddons = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:TotalLessTotalAAFAndTotalAddons[1]}' ) def TotalLessFees = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:TotalLessSurchargeFees[1]}' ) def TotalLessAAF = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:TotalLessArrangementFees[1]}' ) def TotalIPT = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:TotalIPT[1]}' ) def TotalVAT = context.expand( '${RenewalE2E#Response#declare namespace tns8=\'http://www.theaa.com/CommonServices/Message/BS/Road/GenerateQuote_RNL_3\'; declare namespace tns6=\'http://www.theaa.com/CommonServices/Data/Product.2\'; //tns8:GenerateQuoteResponse[1]/tns8:ProductList[1]/tns6:Payment[1]/tns6:TotalPriceBreakdown[1]/tns6:TotalVAT[1]}' ) func_write(payment,"TotalPriceBreakdown,CombinedTotal","",GrandTotal) func_write(payment,"TotalPriceBreakdown,TotalLessDisc","",GrandTotalExcDisc) func_write(payment,"TotalPriceBreakdown,DiscountsTotal","",DiscTotal) func_write(payment,"TotalPriceBreakdown,BaseCoverTotal","",BaseCoverTotal) func_write(payment,"TotalPriceBreakdown,BaseCoverLessDisc","",BaseCoverTotalLessDisc) func_write(payment,"TotalPriceBreakdown,BaseCoverAAFTotal","",BaseCoverAAFTotal) func_write(payment,"TotalPriceBreakdown,TotalAAF","",TotalAAF) func_write(payment,"TotalPriceBreakdown,TotalFee","",FeeTotal) func_write(payment,"TotalPriceBreakdown,TotalLessAAFLessAddons","",TotalLessTotalAAFAddons) func_write(payment,"TotalPriceBreakdown,TotalLessFee","",TotalLessFees) func_write(payment,"TotalPriceBreakdown,TotalLessAAF","",TotalLessAAF) func_write(payment,"TotalPriceBreakdown,TotalVAT","",TotalVAT) func_write(payment,"TotalPriceBreakdown,TotalIPT","",TotalIPT) } def func_write (payment,element,name,RadarValue) { int totalOfValuesChecked = Integer.parseInt(context.expand( '${#TestCase#TotalOfValuesChecked}' )) def prodType = context.expand( '${RNL_MTA_ALL#ExProduct}' ) if (context.expand('${RNL_MTA_ALL#EXBRC}') == "Y") { ExCar1 = context.expand( '${RNL_MTA_ALL#ExCar1}' ) ExCar2 = context.expand( '${RNL_MTA_ALL#ExCar2}' ) ExCar3 = context.expand( '${RNL_MTA_ALL#ExCar3}' ) ExCar4 = context.expand( '${RNL_MTA_ALL#ExCar4}' ) if (ExCar4 != "") { product_type = prodType + "(" + "Car1:" + ExCar1 + ",Car2:" + ExCar2 + ",Car3:" + ExCar3 + ",Car4:" + ExCar4 + ")" } else if (ExCar3 != "") { product_type = prodType + "(" + "Car1:" + ExCar1 + ",Car2:" + ExCar2 + ",Car3:" + ExCar3 + ")" } else if (ExCar2 != "") { product_type = prodType + "(" + "Car1:" + ExCar1 + ",Car2:" + ExCar2 + ")" } else { product_type = prodType + "(" + "Car1:" + ExCar1 + ")" } } else { product_type = context.expand( '${RNL_MTA_ALL#ExProduct}' ) } log.info Pass=(context.expand('${RNL_MTA_ALL#ID}') + "|" + context.expand( '${RNL_MTA_ALL#Renewal Offer}' ) + "|" + payment + "|" + product_type + "|" + context.expand( '${RNL_MTA_ALL#ExCover_type}' ) + "|" + name + "|" + element + "| " + RadarValue ) BufferedWriter bw = new BufferedWriter (new FileWriter (context.expand('${#TestCase#RenewalFile}'), true)); bw.write (Pass); bw.newLine(); bw.flush(); bw.close(); totalOfValuesChecked++ testRunner.testCase.setPropertyValue( 'totalOfValuesChecked', new Integer(totalOfValuesChecked).toString()) }