1 / 11

Standard validation method with code generation in the ADEL system

Standard validation method with code generation in the ADEL system. 10. November 2015. Wiesbaden Erzsébet Kómár IT Department erzsebet.komar@ksh.hu. Introduction. Background Integrated Data Entry and Validation System – ADEL – SDE2015 Budapest

rjosephine
Télécharger la présentation

Standard validation method with code generation in the ADEL system

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. Standard validation method with code generationin the ADEL system 10. November 2015. Wiesbaden Erzsébet Kómár IT Department erzsebet.komar@ksh.hu

  2. Introduction • Background • Integrated Data Entry and Validation System – ADEL – SDE2015 Budapest • Integrated, general, flexible, meta-driven, standardized • Oracle Database 11g • Oracle Fusion Middleware 11g (Forms, plsql, sqlplus) • Main topics of the presentation • Naming convention (in the database, in the file system) • Standard validation method with code generation • Examples in the presentation: 2015 / 1097 - Statistic of product procurements Agricultural survey

  3. Naming convention – main points 3

  4. Applying naming convention • Objects in the database • {subject_user}.{subsystem}_{survey}_{content}_{year}[months] (tables) • MR15.YR_1097_MRAA0_150112 survey data table • MR15.YR_1097_HIBA_150112 survey error table • Validation functions • {type}{category}{scope}{measureID} (hitmraa003, vitmraa003) • type h=validation fn., v=variable, k=conditional fn. • category i=range, e=equal, r=relation • scope t=actual, e=previous, b=previous year, o=other survey • Applications and reports in the file system • {subsystem}{type}{short_filename}.{extension} • {subsystem}{type}{short_filename}_{survey}_{year}[months].{extension} • general error report adel\general\yrfroljh.sql • survey specific error report adel\2015\1097\yrfroljh_1097_150112.sql • survey specific online appl. adel\2015\1097\yrkfar_1097_150112.fmx • survey specific batch appl. adel\2015\1097\yrkfbe_1097_150112.fmx

  5. Validation – roles & responsibilities • Defining – Statistician – with ELLA subsystem • describestheconditions, algorithm, meta characteristics • text format, notwithmathematical formula • Preparing – IT developer – with ADEL-META subsystem • creates DB objectswithDesigner • generateserrorhandlingpackage-storedinthedatabase • buildsthevalidationfunctions • generatesthevalidationfunctions – storedinthesurveyplsqllibrary The validationfunctionsarecalledfromthe online and batch validationapplications

  6. The architecture of validation Application server Database MR15 Online application (yrkfar_1097_150112.fmx) Batch application (yrkfbe_1097_150112.fmx) survey data table (yr_1097_mraa0_150112) survey error table (yr_1097_hiba_150112) pl-sql library Specification: data & validation function declarations error handling pkg Specification Body: validation functions hitmra003 hetmra003 hetmra006 Body 6 6

  7. Code generating with ADEL-META • Program codes are prepared by application (procedure) using • naming convention – names are combined by algorithm • database dictionary – meta information about DB objects • input parameters – year, survey code • Rules of error handling • every survey has its own error table • if a validation is false an error row is inserted, if an error is corrected the error row is deleted, if it is accepted the error row is updated • Rules of validation packages and functions • every survey data table has its own validation package • the name of the validation package (MRAA0) is the same as the name of the mesaure group code in the survey data table (YR_1097_MRAA0_150112) • every validation package has a specification part (with data & function declaration) and a body part (with program codes) • a validation function consists of nested functions (conditional, error handling) • the validations have standard structure

  8. Standard structure of validation functions • Everyvalidation has standard structure 8

  9. Simply example for validation • 2015 / 1097 – Statistic of product procurements • Validation (inthe ELLA subsystem): ifthequantity (mraa006) > 0 thentheprice (mraa003) / thequantity (mraa006) must be between 100 and 200 • Generatedvalidationfunction (ADEL-META) -- The unit price (e/c) must be beetween 100 and 200 (errormessagefromthe ADEL-META system) function hitmraa003 returnnumber is v_rcnumber; begin vitmraa003 := null; v_rc := c.fokelle('hitmraa003',std.onbat,std. my106, std.my103); -- meta levelcondition (c.fokelle -> generalfunction) if v_rc = 0 then v_rc := greatest(v_rc,ff.nagyobb (tmraa0.mraa006,0)); -- validationcondition (nagyobb = greaterfn. -> commonfunction) if v_rc = 0 then vitmraa003 := kf.osztas (tmraa0.mraa003, tmraa0.mraa006); -- operation (osztas = devidefn. -> commonfunction) v_rc := kf.kozott (vitmraa003, 100, 200); -- internalvalidation (kozott = betweenfn. -> commonfunction) end if; if (std.onbat='1' and std.my103='0') orstd.onbat='2' then mr15.hi_1097.hadmin (c.c0_rek.ceaa0_sq,v_rc, std.tev,std.mho,std.mc01,std.mc01_ex,torzs.mc005_v,torzs.tor_rek m005, torzs.tsz, v_mm805ba, vitmraa003 ,torzs.yw_sq, c.c0_rek.my106); -- errorhandling (hadmin -> generatedprocedure) end if; end if; return(kf.hkod(v_rc)); end hitmraa003;

  10. Thank you for your attention

  11. Demos – recorded sessions • generating error handling package • building a new validation use common functions • generating validation functions • [validation with own special functions]

More Related