Beruflich Dokumente
Kultur Dokumente
eRegulations
Managed
by
:
Created
on
:
CONTENTS 1. SHORT PRESENTATION OF MAIN FUNCTIONAL PARTS ................................................................ 3 2. ADMIN WEB APPLICATION ......................................................................................................... 4 2.1. APPLICATION ARCHITECTURE 2.2. DATA - CONCEPTS AND STATES 2.3. DOMAIN MODEL 5 6 8
2.3.1 STEP CONTEXT DIAGRAM ........................................................................................................... 8 2.3.2. E-REGULATIONS DATA STRUCTURE .............................................................................................. 9 2.4. CODE EXECUTION FLOW 28 2.4.1 REQUESTING A NEW PAGE ......................................................................................................... 28 2.4.2. TRIGGER AN ACTION ON THE PAGE (UPDATE) ............................................................................... 30 2.5. PROCEDURE SNAPSHOTS 2.6. HISTORY TRACKING OF EREGULATIONS CONTENT MODIFICATIONS 2.7. LABEL TRANSLATION 32 44 46
3. TRANSLATOR WEB APPLICATION ............................................................................................... 47 3.1. APPLICATION ARCHITECTURE 3.2. PRESENTER LOGIC - CODE FLOW 3.3. DATA STRUCTURE 48 49 50
4. PUBLIC WEB APPLICATION ........................................................................................................ 52 4.1. APPLICATION ARCHITECTURE 4.2. CONSISTENCY REVIEW - DATA STRUCTURE 53 54
5. DATA API SERVER ...................................................................................................................... 56 6. CRALERTS CLI ............................................................................................................................ 57 6.1. APPLICATION ARCHITECTURE 6.2. CONFIG FILE 57 58
7.
STATISTICS
CLI
...........................................................................................................................
59
7.1.
APPLICATION
ARCHITECTURE
7.2.
CONFIG
FILE
7.3.
DATA
STRUCTURE
59 60 60
Page 2
Page 3
Page 4
Page 5
Managing the State of a Data Procedure, BlockOfSteps and Step are stateful objects in the sense that at any time any of it can have only one state. The possible states are: - MODIFIED - PUBLISHED The following diagram describe the lifecycle of a Step, and the actions which will change its present state
/ create
MODIFIED
/ publish
/ Update
PUBLISH
When published the data is stored in a different format that is less normalized, still highly optimized for data- consumption systems. The system is capable of storing a complete snapshot of a procedure at a specified moment in time. A procedure can have several snapshots that will allow us to reconstruct the full version of that procedure at that particular time. When taking this snapshot the system crawls through the full graph of domain model in order to retrieve the information for root objects as well as for all the dependencies. The snapshots are persisted in special tables in the database, tables that are prefixed with "snapshot_". The snapshots tables have been designed for fast retrieval and query operations and are a less-normalized replica of the eRegulations content. A special record of the snapshots data is the current snapshot which responds to the need of frequent publish actions of the current eRegulations data. Each time we publish a stateful object the correspondent snapshot data is reconstructed.
Page 7
The diagram below will illustrate as example the domain modeling of the Step as the Root Aggregate Class and all the collection of bound classes.
The entire model of the eRegulations system has been implemented following a Domain Driven Design approach.
Page 8
Table
fields
Table
Name
Admin_Block
Model
Block
Column
Id
Type
Int32
DbType
Int
NOT
NULL
IDENTITY
NVarChar(10 0)
NOT
NULL
NText
Bit
NOT
NULL
Int
NOT
NULL
Int
DateTime
NOT
NULL
NVarChar(50 )
NOT
NULL
DateTime
NOT
NULL
NVarChar(50 )
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Int
NOT
NULL
IDENTITY
Int
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Bit
NOT
NULL
Null
able
FALSE
Admin_Block Admin_Block Admin_Block Admin_Block Admin_Block Admin_Block Admin_Block Admin_Block Admin_Block Admin_Block Admin_Block Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility
Block Block Block Block Block Block Block Block Block Block Block StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility
Name Description IsOptional PhysicalPresence RepresentationThirdParty CreatedDate CreatedUser ModifiedDate ModifiedUser IsInRecycleBin Deleted Id
String String Bool Int32 Int32 DateTi me String DateTi me String Bool Bool Int32
FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
Page 9
Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_StepSection Visibility Admin_Block_i18n
StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility StepSectionVi sibility Block_i18n
IsTimeframeWaintingTimeI nLineVisible IsTimeframeTimeSpentAtT heCounterVisible IsTimeframeWaitingTimeU ntilNextStepVisible IsTimeframeCommentsVisi ble IsLegalJustificationVisible IsLegalJustificationComme ntsVisible IsAdditionalInfoVisible IsRecoursesVisible IsCertificationVisible Id
Bool Bool Bool Bool Bool Bool Bool Bool Bool Int32
Admin_Block_i18n Admin_Block_i18n Admin_Block_i18n Admin_Block_i18n Admin_Block_Step Admin_Block_Step Admin_Block_Step Admin_Block_Step Admin_Block_Step Admin_Block_Step Admin_Menu
Block_i18n Block_i18n Block_i18n Block_i18n Block_Step Block_Step Block_Step Block_Step Block_Step Block_Step Menu
Int32 String String String Int32 Int32 Int32 Int32 Bool Bool Int32
Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NText Int NOT NULL IDENTITY Int NOT NULL Int NOT NULL Int NOT NULL Bit NOT NULL Bit NOT NULL Int NOT NULL IDENTITY NVarChar(10 0) NOT NULL VarChar(20) NOT NULL Int Int
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu Admin_Menu_i18n
Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu Menu_i18n
ExplanatoryText WebPageKeywords WebPageDescription CreatedDate CreatedUser ModifiedDate ModifiedUser IsInRecycleBin Deleted IsVisibleInPublicMenu IsVisibleToGuest Image1 Image2 Image3 IconURL IconActiveURL PublicLayoutNbCols Id
String String String DateTi me String DateTi me String Bool Bool Bool Bool String String String String String Int32 Int32
Admin_Menu_i18n Admin_Menu_i18n Admin_Menu_i18n Admin_Menu_i18n Admin_Menu_i18n Admin_Menu_i18n Admin_MenuHierar chicalData Admin_MenuHierar chicalData Admin_MenuHierar
Menu_i18n Menu_i18n Menu_i18n Menu_i18n Menu_i18n Menu_i18n MenuHierarc hicalData MenuHierarc hicalData MenuHierarc
Parent_Id Child_Id
Int32 Int32
NText NVarChar(25 0) NOT NULL NVarChar(25 0) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL Bit NOT NULL Bit NOT NULL Bit Bit NVarChar(25 5) NVarChar(25 5) NVarChar(25 5) NVarChar(25 5) NVarChar(25 5) Int Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NText NVarChar(25 0) NVarChar(25 0) Int NOT NULL IDENTITY Int Int NOT
TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE FALSE
TRUE
FALSE
Page
11
chicalData Admin_MenuHierar chicalData Admin_MenuPerLa ngVisibility Admin_MenuPerLa ngVisibility Admin_MenuPerLa ngVisibility Admin_MenuPerLa ngVisibility Admin_Object_Me dia Admin_Object_Me dia Admin_Object_Me dia Admin_Object_Me dia Admin_Object_Me dia Admin_Objective
hicalData MenuHierarc hicalData MenuPerLang Visibility MenuPerLang Visibility MenuPerLang Visibility MenuPerLang Visibility Object_Medi a Object_Medi a Object_Medi a Object_Medi a Object_Medi a Objective
[Order] Id
Int32 Int32
Admin_Objective Admin_Objective Admin_Objective Admin_Objective Admin_Objective Admin_Objective Admin_Objective Admin_Objective Admin_Objective_B lock Admin_Objective_B lock Admin_Objective_B lock Admin_Objective_B lock
Objective Objective Objective Objective Objective Objective Objective Objective Objective_Blo ck Objective_Blo ck Objective_Blo ck Objective_Blo ck
NULL Int NOT NULL Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL Bit NOT NULL Int NOT NULL IDENTITY Int NOT NULL VarChar(100) NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL IDENTITY NVarChar(10 0) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(10 00) Int NOT NULL IDENTITY Int NOT NULL Int NOT NULL Int NOT NULL
FALSE FALSE
Admin_Objective_i 18n Admin_Objective_i 18n Admin_Objective_i 18n Admin_Objective_i 18n Admin_Objective_i 18n Admin_ObjectiveHi erarchicalData Admin_ObjectiveHi erarchicalData Admin_ObjectiveHi erarchicalData Admin_ObjectiveHi erarchicalData Admin_Step
Objective_i18 n Objective_i18 n Objective_i18 n Objective_i18 n Objective_i18 n ObjectiveHier archicalData ObjectiveHier archicalData ObjectiveHier archicalData ObjectiveHier archicalData Step
Id
Int32
Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NVarChar(10 00) Int NOT NULL IDENTITY Int Int NOT NULL Int NOT NULL Int NOT NULL IDENTITY Bit NOT NULL Bit NOT NULL Bit NOT NULL DateTime NVarChar(50 ) Int NVarChar(30 0) NOT NULL Int NOT NULL Int Bit NOT NULL NVarChar(20 0) Bit NOT NULL Int Int Int Int
FALSE
Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step
Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step
PublishedStatus IsRecourse Certified CertificationDate CertificationUser CertificationEntityInCharge _Id Name PhysicalPresence RepresentationThirdParty IsOnline OnlineStepURL IsOptional EntityInCharge_Id UnitInCharge_Id PersonInCharge_Id Contact_Law_Id
Bool Bool Bool DateTi me String Int32 String Int32 Int32 Bool String Bool Int32 Int32 Int32 Int32
FALSE
FALSE
FALSE
TRUE
TRUE
TRUE
FALSE
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
TRUE
TRUE
TRUE
Page
13
Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step Admin_Step_i18n
Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step Step_i18n
Contact_Articles RequirementsPhysicalPrese nce HasCosts NoCostsReason IsPayMethodCash IsPayMethodCheck IsPayMethodCard IsPayMethodOther PayMethodOtherText CostsComments WaintingTimeInLineMin WaintingTimeInLineMax TimeSpentAtTheCounterMi n TimeSpentAtTheCounterM ax WaitingTimeUntilNextStep Min WaitingTimeUntilNextStep Max TimeframeComments Timeframe_Law_Id Timeframe_Articles LawsComments AdditionalInfo CreatedDate CreatedUser ModifiedDate ModifiedUser IsInRecycleBin Deleted Id
String String Bool String Bool Bool Bool Bool String String Decim al Decim al Decim al Decim al Decim al Decim al String Int32 String String String DateTi me String DateTi me String Bool Bool Int32
NVarChar(40 0) VarChar(75) Bit NOT NULL VarChar(75) Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(20 0) NText Decimal(18,6 ) NOT NULL Decimal(18,6 ) NOT NULL Decimal(18,6 ) NOT NULL Decimal(18,6 ) NOT NULL Decimal(18,6 ) NOT NULL Decimal(18,6 ) NOT NULL NText Int NVarChar(40 0) NText NText DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL Bit NOT NULL Bit NOT NULL Int NOT NULL
TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
Page 14
Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_i18n Admin_Step_Recou rse Admin_Step_Recou rse Admin_Step_Recou rse Admin_Step_Recou rse Admin_StepCost
Step_i18n Step_i18n Step_i18n Step_i18n Step_i18n Step_i18n Step_i18n Step_i18n Step_i18n Step_i18n Step_Recours e Step_Recours e Step_Recours e Step_Recours e StepCost
Step_Id Lang Name PayMethodOtherText CostsComments TimeframeComments LawsComments AdditionalInfo Contact_Articles Timeframe_Articles Id
Int32 String String String String String String String String String Int32
Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost
StepCost StepCost StepCost StepCost StepCost StepCost StepCost StepCost StepCost StepCost StepCost
Step_Id [Order] AggregateOperator IsSeparator Value Unit Operator Parameter Type AverageValue Comments
Int32 Int32 String Bool Decim al String String String String Decim al String
IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(30 0) NOT NULL NVarChar(20 0) NText NText NText NText NVarChar(40 0) NVarChar(40 0) Int NOT NULL IDENTITY Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL IDENTITY Int NOT NULL Int NOT NULL NVarChar(2) NOT NULL Bit NOT NULL Decimal(19,4 ) NOT NULL NVarChar(10 ) NVarChar(20 ) NOT NULL NVarChar(10 0) NVarChar(50 ) NOT NULL Decimal(19,4 ) NVarChar(40
FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
TRUE
Page
15
Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost Admin_StepCost_i1 8n Admin_StepCost_i1 8n Admin_StepCost_i1 8n Admin_StepCost_i1 8n Admin_StepCost_i1 8n Admin_StepCost_i1 8n Admin_StepLaw
StepCost StepCost StepCost StepCost StepCost_i18 n StepCost_i18 n StepCost_i18 n StepCost_i18 n StepCost_i18 n StepCost_i18 n StepLaw
Admin_StepLaw Admin_StepLaw Admin_StepLaw Admin_StepLaw Admin_StepLaw Admin_StepLaw Admin_StepLaw_i1 8n Admin_StepLaw_i1 8n Admin_StepLaw_i1 8n Admin_StepLaw_i1 8n Admin_StepLaw_i1 8n Admin_StepRequir ement Admin_StepRequir ement
StepLaw StepLaw StepLaw StepLaw StepLaw StepLaw StepLaw_i18 n StepLaw_i18 n StepLaw_i18 n StepLaw_i18 n StepLaw_i18 n StepRequire ment StepRequire ment
Step_Id
Int32
0) NVarChar(10 00) Int Int NVarChar(40 0) Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(40 0) NVarChar(10 00) NVarChar(40 0) Int NOT NULL IDENTITY Int NOT NULL Int NOT NULL NVarChar(2) NOT NULL Int NOT NULL NVarChar(40 0) NVarChar(40 0) Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(40 0) NVarChar(40 0) Int NOT NULL IDENTITY Int NOT NULL
FALSE
Page
16
Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement Admin_StepRequir ement_i18n Admin_StepRequir ement_i18n Admin_StepRequir ement_i18n Admin_StepRequir ement_i18n Admin_StepRequir ement_i18n Admin_StepResult
StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment StepRequire ment_i18n StepRequire ment_i18n StepRequire ment_i18n StepRequire ment_i18n StepRequire ment_i18n StepResult
[Order] AggregateOperator Type GenericRequirement_Id StepResult_Id NbOriginal NbCopy NbAuthenticated Comments FilterGlobalOption Law_Id Articles Id
Int32 String Int32 Int32 Int32 Int32 Int32 Int32 String Int32 Int32 String Int32
Int NOT NULL NVarChar(2) NOT NULL Int NOT NULL Int Int Int NOT NULL Int NOT NULL Int NOT NULL NText Int Int NVarChar(40 0) Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NText NVarChar(40 0) Int NOT NULL IDENTITY Int NOT NULL Int NOT NULL NVarChar(10 0) NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL NVarChar(50
FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE
Admin_StepResult Admin_StepResult Admin_StepResult Admin_StepResult_ i18n Admin_StepResult_ i18n Admin_StepResult_ i18n Admin_StepResult_ i18n Admin_StepResult_ i18n EntityInCharge
StepResult StepResult StepResult StepResult_i1 8n StepResult_i1 8n StepResult_i1 8n StepResult_i1 8n StepResult_i1 8n EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg
EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge
Name Address City PostalCode CountryCode Phone1 Phone2 Fax1 Fax2 Email1 Email2 Website1 Website2 Image
String String String String String String String String String String String String String String
) NOT NULL Int NVarChar(40 0) Bit NOT NULL Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NVarChar(40 0) Int NOT NULL IDENTITY NVarChar(10 0) NOT NULL NVarChar(25 0) NVarChar(50 ) NVarChar(50 ) NVarChar(50 ) NVarChar(50 ) NVarChar(50 ) NVarChar(50 ) NVarChar(50 ) NVarChar(10 0) NVarChar(10 0) NVarChar(25 0) NVarChar(25 0) NVarChar(25 5) NVarChar(5) NOT NULL NVarChar(5)
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
Page
18
EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge
e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e
ScheduleDay1IsNotAvailabl Bool e ScheduleDay2MorningStart String ScheduleDay2MorningEnd ScheduleDay2EveningStart ScheduleDay2EveningEnd ScheduleDay2IsClosed String String String Bool
ScheduleDay2IsNotAvailabl Bool e ScheduleDay3MorningStart String ScheduleDay3MorningEnd ScheduleDay3EveningStart ScheduleDay3EveningEnd ScheduleDay3IsClosed String String String Bool
ScheduleDay3IsNotAvailabl Bool e ScheduleDay4MorningStart String ScheduleDay4MorningEnd ScheduleDay4EveningStart ScheduleDay4EveningEnd ScheduleDay4IsClosed String String String Bool
NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
19
EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge EntityInCharge_i18 n
EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e EntityInCharg e_i18n
ScheduleDay5EveningEnd ScheduleDay5IsClosed
String Bool
ScheduleDay5IsNotAvailabl Bool e ScheduleDay6MorningStart String ScheduleDay6MorningEnd ScheduleDay6EveningStart ScheduleDay6EveningEnd ScheduleDay6IsClosed String String String Bool
ScheduleDay6IsNotAvailabl Bool e ScheduleDay7MorningStart String ScheduleDay7MorningEnd ScheduleDay7EveningStart ScheduleDay7EveningEnd ScheduleDay7IsClosed ScheduleDay7IsNotAvailabl e ScheduleComments CreatedDate CreatedUser ModifiedDate ModifiedUser OwnershipStatus Deleted IsVisibleInPublicDirectory GoogleMapsURL Id String String String Bool Bool String DateTi me String DateTi me String String Bool Bool String Int32
NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(50 0) DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL VarChar(50) NOT NULL Bit NOT NULL Bit NVarChar(80 0) Int NOT NULL IDENTITY
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE
Page 20
EntityInCharge_i18 n EntityInCharge_i18 n EntityInCharge_i18 n EntityInCharge_i18 n EntityInCharge_i18 n EntityInCharge_i18 n EntityInCharge_i18 n EntityInCharge_i18 n GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t GenericRequiremen t_i18n GenericRequiremen t_i18n GenericRequiremen t_i18n GenericRequiremen t_i18n GenericRequiremen
EntityInCharg e_i18n EntityInCharg e_i18n EntityInCharg e_i18n EntityInCharg e_i18n EntityInCharg e_i18n EntityInCharg e_i18n EntityInCharg e_i18n EntityInCharg e_i18n GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement GenericRequi rement_i18n GenericRequi rement_i18n GenericRequi rement_i18n GenericRequi rement_i18n GenericRequi
Name Description Type CreatedDate CreatedUser ModifiedDate ModifiedUser OwnershipStatus Deleted IsDocumentPresent IsVisibleInPublicDirectory Id
String String String DateTi me String DateTi me String String Bool Bool Bool Int32
Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NVarChar(25 0) NVarChar(50 ) NVarChar(25 0) NVarChar(25 0) NVarChar(50 0) Int NOT NULL IDENTITY NVarChar(10 0) NOT NULL NText NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL VarChar(50) NOT NULL Bit NOT NULL Bit NOT NULL Bit Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NText
FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
t_i18n Law
rement_i18n Law
Id
Int32
Law Law Law Law Law Law Law Law Law Law Law_i18n
Law Law Law Law Law Law Law Law Law Law Law_i18n
Name Description CreatedDate CreatedUser ModifiedDate ModifiedUser OwnershipStatus Deleted IsDocumentPresent IsVisibleInPublicDirectory Id
String String DateTi me String DateTi me String String Bool Bool Bool Int32
Law_i18n Law_i18n Law_i18n Law_i18n Media Media Media Media Media Media Media Media Media
Law_i18n Law_i18n Law_i18n Law_i18n Media Media Media Media Media Media Media Media Media
Law_Id Lang Name Description Id Name FileName Extention Description Length PreviewImageName CreatedDate CreatedUser
Int32 String String String Int32 String String String String Decim al String DateTi me String
Int NOT NULL IDENTITY NVarChar(30 0) NOT NULL NText DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL VarChar(50) NOT NULL Bit NOT NULL Bit NOT NULL Bit Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(30 0) NOT NULL NText Int NOT NULL IDENTITY NVarChar(30 0) NOT NULL NVarChar(50 0) NVarChar(15 ) NText Decimal(18,0 ) NVarChar(10 0) DateTime NOT NULL NVarChar(50 ) NOT NULL
FALSE
FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE
Page 22
Media Media Media Media Media_i18n Media_i18n Media_i18n Media_i18n PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar ge PersonInChar
PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge PersonInCharge_i1
UnitInCharge_Id Name Profession Phone1 Phone2 Email1 Email2 Image CreatedDate CreatedUser ModifiedDate ModifiedUser OwnershipStatus Deleted IsVisibleInPublicDirectory Id
Int32 String String String String String String String DateTi me String DateTi me String String Bool Bool Int32
DateTime NOT NULL NVarChar(50 ) NOT NULL Bit NOT NULL Bit NOT NULL Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(30 0) NOT NULL Int NOT NULL IDENTITY Int NVarChar(10 0) NOT NULL NVarChar(30 0) NVarChar(50 ) NVarChar(50 ) NVarChar(10 0) NVarChar(10 0) NVarChar(25 5) DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL VarChar(50) NOT NULL Bit NOT NULL Bit Int NOT
TRUE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
23
ge_i18n PersonInChar ge_i18n PersonInChar ge_i18n PersonInChar ge_i18n PersonInChar ge_i18n UnitInCharge PersonInCharge_Id Lang Name Profession Id Int32 String String String Int32
UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge
UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge
ScheduleDay1MorningStart String ScheduleDay1MorningEnd ScheduleDay1EveningStart ScheduleDay1EveningEnd ScheduleDay1IsClosed String String String Bool
ScheduleDay1IsNotAvailabl Bool e ScheduleDay2MorningStart String ScheduleDay2MorningEnd ScheduleDay2EveningStart ScheduleDay2EveningEnd ScheduleDay2IsClosed String String String Bool
ScheduleDay2IsNotAvailabl Bool e ScheduleDay3MorningStart String ScheduleDay3MorningEnd ScheduleDay3EveningStart ScheduleDay3EveningEnd String String String
NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NVarChar(30 0) Int NOT NULL IDENTITY Int NVarChar(10 0) NOT NULL NVarChar(25 5) Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5)
TRUE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
24
UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge
UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge
ScheduleDay3IsClosed
Bool
ScheduleDay3IsNotAvailabl Bool e ScheduleDay4MorningStart String ScheduleDay4MorningEnd ScheduleDay4EveningStart ScheduleDay4EveningEnd ScheduleDay4IsClosed String String String Bool
ScheduleDay4IsNotAvailabl Bool e ScheduleDay5MorningStart String ScheduleDay5MorningEnd ScheduleDay5EveningStart ScheduleDay5EveningEnd ScheduleDay5IsClosed String String String Bool
ScheduleDay5IsNotAvailabl Bool e ScheduleDay6MorningStart String ScheduleDay6MorningEnd ScheduleDay6EveningStart ScheduleDay6EveningEnd ScheduleDay6IsClosed String String String Bool
ScheduleDay6IsNotAvailabl Bool e ScheduleDay7MorningStart String ScheduleDay7MorningEnd ScheduleDay7EveningStart ScheduleDay7EveningEnd ScheduleDay7IsClosed String String String Bool
NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
25
UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge_i18n
UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge UnitInCharge _i18n UnitInCharge _i18n UnitInCharge _i18n UnitInCharge _i18n UnitInCharge _i18n SystemLangu age SystemLangu age SystemLangu age SystemLangu age
Bool String DateTi me String DateTi me String String Bool Bool Int32
Bit NOT NULL NVarChar(50 0) DateTime NOT NULL NVarChar(50 ) NOT NULL DateTime NOT NULL NVarChar(50 ) NOT NULL VarChar(50) NOT NULL Bit NOT NULL Bit Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL NVarChar(10 0) NOT NULL NVarChar(50 0) VarChar(2) NOT NULL NVarChar(20 ) NOT NULL Bit NOT NULL Bit NOT NULL
FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
Relationships
Table
Admin_StepSectionVisibility
Admin_Block_i18n
Admin_Block_Step
Admin_Block_Step
Admin_Menu
Admin_Menu
Admin_Menu_i18n
Admin_MenuHierarchicalData
Admin_MenuHierarchicalData
UNCTAD
-
eRegulations
team
ThisKey Step_Id Block_Id Block_Id Step_Id Block_ID Objective_ID Menu_Id Child_Id Parent_Id
OtherKey Id Id Id Id Id Id Id Id Id
Reference
Admin_Step
Admin_Block
Admin_Block
Admin_Step
Admin_Block
Admin_Objective
Admin_Menu
Admin_Menu
Admin_Menu
Page
26
Admin_MenuPerLangVisibility
Admin_Object_Media
Admin_Object_Media
Admin_Object_Media
Admin_Object_Media
Admin_Object_Media
Admin_Object_Media
Admin_Objective_Block
Admin_Objective_Block
Admin_Objective_i18n
Admin_ObjectiveHierarchicalData
Admin_ObjectiveHierarchicalData
Admin_Step
Admin_Step
Admin_Step
Admin_Step
Admin_Step
Admin_Step
Admin_Step_i18n
Admin_Step_Recourse
Admin_Step_Recourse
Admin_StepCost
Admin_StepCost
Admin_StepCost_i18n
Admin_StepLaw
Admin_StepLaw
Admin_StepLaw_i18n
Admin_StepRequirement
Admin_StepRequirement
Admin_StepRequirement
Admin_StepRequirement
Admin_StepRequirement_i18n
Admin_StepResult
Admin_StepResult
Admin_StepResult_i18n
EntityInCharge_i18n
GenericRequirement_i18n
Law_i18n
Media_i18n
PersonInCharge
PersonInCharge_i18n
UnitInCharge
UnitInCharge_i18n
UNCTAD
-
eRegulations
team
Menu_Id Media_Id Object_Id Object_Id Object_Id Object_Id Object_Id Block_Id Objective_Id Objective_Id Parent_Id Child_Id CertificationEntityInCharg e_Id EntityInCharge_Id UnitInCharge_Id PersonInCharge_Id Contact_Law_Id Timeframe_Law_Id Step_Id Recourse_Id Step_Id Step_Id Law_Id StepCost_Id Step_Id Law_Id StepLaw_Id Step_Id StepResult_Id GenericRequirement_Id Law_Id StepRequirement_Id Step_Id Law_Id StepResult_Id EntityInCharge_Id GenericRequirement_Id Law_Id Media_Id UnitInCharge_Id PersonInCharge_Id EntityInCharge_Id UnitInCharge_Id
Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id Id
Admin_Menu
Media
GenericRequireme nt
Law
Admin_Menu
Admin_StepResult
Admin_Step
Admin_Block
Admin_Objective
Admin_Objective
Admin_Objective
Admin_Objective
EntityInCharge
EntityInCharge
UnitInCharge
PersonInCharge
Law
Law
Admin_Step
Admin_Step
Admin_Step
Admin_Step
Law
Admin_StepCost
Admin_Step
Law
Admin_StepLaw
Step
Admin_StepResult
GenericRequireme nt
Law
Admin_StepRequir ement
Admin_Step
Law
Admin_StepResult
EntityInCharge
GenericRequireme nt
Law
Media
UnitInCharge
PersonInCharge
EntityInCharge
UnitInCharge
Page
27
Requesting a new page will involve the creation of a new instance of System.Web.UI.Page. Depending on the page requested the Asp.Net Page must implement the correspondent IView interface. We will exemplify for viewing the details page of one step: 1. User makes a request in the browser by clicking on a hyperlink. The request will send as a query parameter the ID of the requested step. Here the sequence of code: 1. IIS identifies the requested resource as "StepGeneral.aspx" inside the admin application, so it forwards the request to our application UNCTAD - eRegulations team Page 28
2. Asp.Net creates a new instance of the object "Views_Regulation_StepGeneral" 3. Asp.Net trigger the event "Page_Load" 4. Inside the "Page_Load" we create a new instance of the presenter sending in the constructor the current instance of Views_Regulation_StepGeneral as this class implements the interface IStepView and the AppContext which is an application context that travels through all the layers. The AppContext is created each time a request is intercepted by our application. It is cached through the duration of the request in the HttpContext 5. the newly created presenter will call the method InitView send the stepId as parameter 6. the presenter holds all the presentation logic. It has a reference of the "IView" interface which will use for displaying the information. Still is not aware of how this interface is implemented (in our case is the System.Web.UI.Page) 7. the presenter will create a new instance of the BusinessObjectAPI related to our need (in our case StepBO) 8. the BusinessObjectAPI holds a reference to the Root Aggregate Class (in our case Step). the presenter creates a new instance of the model, it sets the Id of the model and it attaches it to the BusinessObjectAPI. 9. the presenter demand the BusinessObjectAPI to load the model 10. the BusinessObjectAPI will call the RepositoryFactory in order to retrieve an instance of IRepository that will use for talking to the DataLayer (it will return an instance of LiqRepository) 11. the BusinessObjectAPI uses the IRepository instance and load the model from the data (the repository will call a SQL query that will be executed against the SQL Server DB and the load the model with the db data) 12. the BusinessObjectAPI holds a collection of errors in case any operation performed raised an error 13. the presenter verifies if the load of model was ended successfully and if so it tells the IView (in our case the Regulation) to display the details of the model . If the process of loading the data failed, the presenter calls the "ShowErrors" method of the IView to display the errors 14. inside the System.Web.UI.Page methods/properties of the IView implementation we set the data to html elements 15. the System.Web.UI.Page finishes the cycle and display the html output UNCTAD - eRegulations team Page 29
Sending a post request to the server is 99% made through an Ajax call (with a XMLHttpRequest). The end point is a static method in the aspx page having the attribute [WebMethod]. Inside this static method we create an instance of the custom view that implements our IView interface (IStepView). We will use the same presenter (StepPresenter) together with our custom view in order to achieve our updating purpose. The difference is the transport of all the data that the browser will exchange with the server. In the case of the Ajax call we encapsulate the data in Data Transfer Objects (DTO) which are light objects holding only property fields. In the case of classic Http post request the transport would have been the form input collection send either encoded in the url as query string or send as payload inside the body of the http request message. All the custom views are extended from a base class called BaseWebView that holds all utilities needed by all the custom views. The AppContext is also created each time a request is handled. It is also cached in the current HtppContext managed by the Asp.Net framework. UNCTAD - eRegulations team Page 30
We will exemplify for updating the details page of one step: 1. User clicks on the "SAVE" button inside the step page. The client side code will wrap all the data from the editable fields in a JSON object and the sends a new XMLHttpRequest to the endpoind " StepGeneral.aspx/Update" with the payload the newly JSON object that will deserialize into a DTO C# Object and a ID parameter with the value equal to the StepID. Here the sequence of code: 1. IIS identifies the requested resource as "StepGeneral.aspx/Update" inside the admin application, so it forwards the request to our application 2. Asp.Net searches for the static method "Update" having the [WebMethod] attribute inside the class behind the "StepGeneral.aspx" page and calls this method 3. we retrieve the AppContext 4. create a new instance of our custom view that implements the interface IStepView (in our case UpdateView). Send in the constructor the DTO received 5. create a new instance of the presenter sending the instance of our custom view and the AppContext 6. the newly created presenter will call the method Update send the stepId as parameter 7. the presenter holds all the presentation logic. It has a reference of the "IView" interface which will use for retrieval of all the necessary information to update the model. Still is not aware of how this interface is implemented (in our case is the instance of CustomView) 8. the presenter will create a new instance of the BusinessObjectAPI related to our need (in our case StepBO) 9. the BusinessObjectAPI holds a reference to the Root Aggregate Class (in our case Step). the presenter creates a new instance of the model, it sets the Id of the model and it attaches it to the BusinessObjectAPI. 10. the presenter demand the BusinessObjectAPI to load the model 11. the BusinessObjectAPI will call the RepositoryFactory in order to retrieve an instance of IRepository that will use for talking to the DataLayer (it will return an instance of LiqRepository) 12. the BusinessObjectAPI uses the IRepository instance and load the model from the data (the repository will call a SQL query that will be executed against the SQL Server DB and the load the model with the db data) 13. if no errors encountered the presenter will ask the view to update the model. As our custom view received through the constructor the DTO sent by the user it will use it to update the model. 14. then the presenter will ask the IRepository instance to persist the modifications 15. the BusinessObjectAPI holds a collection of errors in case any operation performed raised an error 16. the presenter verifies if the update of model was ended successfully and if so it raises an event called SavedSuccessfully. (normally in the custom view you will write an SavedSuccessfullyHandler where you will have a flag holding the operation response. If the process of loading the data failed, the presenter calls the "ShowErrors" method of the IView to display the errors (the custom view will hold the errors inside a collection of errors) 17. the webMethod then verifies if the success flag of the custom view is true and sends a ok message to the browser. If custom view has errors inside its collection, the webMethod will throw an ApplicationException with the message holding the serialized version of all the view errors.
Page 31
Table name SnapshotRegistry SnapshotRegistry SnapshotRegistry SnapshotRegistry SnapshotRegistry SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep
Column name Id Objective_id SnapshotVersion SnapshotDate IsCurrent Registry_Id Objective_Id Block_Id IsRecourse Step_Id [Order] IsParallele IsAlternative Certified CertificationDate CertificationUser Id Lang Name PhysicalPresence RepresentationThirdParty IsOnline OnlineStepURL IsOptional Contact_Law_Id Contact_Law_Name Contact_Law_Description Contact_Articles RequirementsPhysicalPresence HasCosts NoCostsReason IsPayMethodCash IsPayMethodCheck IsPayMethodCard IsPayMethodOther PayMethodOtherText CostsComments WaintingTimeInLineMin WaintingTimeInLineMax TimeSpentAtTheCounterMin TimeSpentAtTheCounterMax
DbType Int NOT NULL IDENTITY Int NOT NULL Int NOT NULL DateTime NOT NULL Bit NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Bit NOT NULL Int Int NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL DateTime NVarChar(50) Int NOT NULL VarChar(2) NOT NULL NVarChar(100) NOT NULL Int NOT NULL Int Bit NOT NULL NVarChar(200) Bit NOT NULL Int NVarChar(300) NVarChar(400) NVarChar(400) VarChar(75) Bit NOT NULL VarChar(75) Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(200) NText Decimal(18,6) NOT NULL Decimal(18,6) NOT NULL Decimal(18,6) NOT NULL Decimal(18,6) NOT
Null
able
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
Page
33
SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStep SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepCost SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge
WaitingTimeUntilNextStepMin WaitingTimeUntilNextStepMax TimeframeComments Timeframe_Law_Id Timeframe_Law_Name Timeframe_Law_Description Timeframe_Articles LawsComments AdditionalInfo CertificationEntityInCharge_Id CertificationEntityInCharge_Name Status Version StatusDate Registry_Id Objective_Id Block_Id Step_Id [Order] Id Lang AggregateOperator IsSeparator Value Unit Operator Parameter Type AverageValue Comments AverageValueComments FilterGlobalOption Law_Id Law_Name Law_Description Articles CalculatedValue Registry_Id Objective_Id
NULL Decimal(18,6) NOT NULL Decimal(18,6) NOT NULL NText Int NVarChar(300) NVarChar(400) NVarChar(400) NText NText Int NVarChar(100) Int Int DateTime Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(2) NOT NULL Bit NOT NULL Decimal(19,4) NOT NULL NVarChar(10) NVarChar(20) NOT NULL NVarChar(100) NVarChar(50) NOT NULL Decimal(19,4) NVarChar(400) NVarChar(1000) Int Int NVarChar(300) NVarChar(400) NVarChar(400) Decimal(19,4) Int NOT NULL Int NOT NULL
FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE
Page 34
SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh
Block_Id Step_Id Id Lang Name Address City PostalCode CountryCode Phone1 Phone2 Fax1 Fax2 Email1 Email2 Website1 Website2 Image ScheduleDay1MorningStart ScheduleDay1MorningEnd ScheduleDay1EveningStart ScheduleDay1EveningEnd ScheduleDay1IsClosed ScheduleDay1IsNotAvailable ScheduleDay2MorningStart ScheduleDay2MorningEnd
Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(100) NOT NULL NVarChar(250) NVarChar(50) NVarChar(50) NVarChar(50) NVarChar(50) NVarChar(50) NVarChar(50) NVarChar(50) NVarChar(100) NVarChar(100) NVarChar(250) NVarChar(250) NVarChar(255) NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
35
arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge
ScheduleDay2EveningStart ScheduleDay2EveningEnd ScheduleDay2IsClosed ScheduleDay2IsNotAvailable ScheduleDay3MorningStart ScheduleDay3MorningEnd ScheduleDay3EveningStart ScheduleDay3EveningEnd ScheduleDay3IsClosed ScheduleDay3IsNotAvailable ScheduleDay4MorningStart ScheduleDay4MorningEnd ScheduleDay4EveningStart ScheduleDay4EveningEnd ScheduleDay4IsClosed ScheduleDay4IsNotAvailable ScheduleDay5MorningStart ScheduleDay5MorningEnd ScheduleDay5EveningStart ScheduleDay5EveningEnd ScheduleDay5IsClosed ScheduleDay5IsNotAvailable ScheduleDay6MorningStart ScheduleDay6MorningEnd ScheduleDay6EveningStart
NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
36
SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepEntityInCh arge SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepLaw SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge
ScheduleDay6EveningEnd ScheduleDay6IsClosed ScheduleDay6IsNotAvailable ScheduleDay7MorningStart ScheduleDay7MorningEnd ScheduleDay7EveningStart ScheduleDay7EveningEnd ScheduleDay7IsClosed ScheduleDay7IsNotAvailable ScheduleComments Registry_Id Objective_Id Block_Id Step_Id [Order] Id Lang AggregateOperator Law_Id Law_Name Law_Description Articles Comments Law_IsDocumentPresent Registry_Id Objective_Id Block_Id Step_Id Id Lang Name
NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(500) Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(2) NOT NULL Int NOT NULL NVarChar(300) NOT NULL NText NVarChar(400) NVarChar(400) Bit NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(100) NOT NULL
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
Page 37
SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepPersonInC harge SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme
Profession Phone1 Phone2 Email1 Email2 Image Registry_Id Objective_Id Block_Id Step_Id [Order] Id Lang AggregateOperator Type GenericRequirement_Id GenericRequirement_Name GenericRequirement_Description GenericRequirement_Type StepResult_Id StepResult_Step_Id NbOriginal NbCopy NbAuthenticated Comments FilterGlobalOption
NVarChar(300) NVarChar(50) NVarChar(50) NVarChar(100) NVarChar(100) NVarChar(255) Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(2) NOT NULL Int NOT NULL Int NVarChar(100) NText NVarChar(50) Int Int Int NOT NULL Int NOT NULL Int NOT NULL NText Int
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
TRUE
TRUE
Page
38
nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepRequireme nt SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepResult SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility
Law_Id Law_Name Law_Description Articles GenericRequirement_IsDocumentPres ent Registry_Id Objective_Id Block_Id Step_Id [Order] Id Lang Name NbOriginal NbCopy NbAuthenticated Type Law_Id Law_Name Law_Description Articles IsDocumentPresent Registry_Id Objective_Id Block_Id Step_Id IsExpectedResultsVisible IsEntityInChargeVisible IsUnitInChargeVisible IsPersonInChargeVisible IsRequirementsVisible IsCostsVisible
Int NVarChar(300) NVarChar(400) NVarChar(400) Bit Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(100) NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL NVarChar(50) NOT NULL Int NVarChar(300) NVarChar(400) NVarChar(400) Bit NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
39
SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepSectionVisi bility SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar
IsCostsCommentsVisible IsTimeframeVisible IsTimeframeWaintingTimeInLineVisibl e IsTimeframeTimeSpentAtTheCounter Visible IsTimeframeWaitingTimeUntilNextSte pVisible IsTimeframeCommentsVisible IsLegalJustificationVisible IsLegalJustificationCommentsVisible IsAdditionalInfoVisible IsRecoursesVisible IsCertificationVisible Registry_Id Objective_Id Block_Id Step_Id Id Lang Name Image ScheduleIsInherited ScheduleDay1MorningStart ScheduleDay1MorningEnd ScheduleDay1EveningStart ScheduleDay1EveningEnd ScheduleDay1IsClosed ScheduleDay1IsNotAvailable
Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Bit NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(100) NOT NULL NVarChar(255) Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
40
ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge
ScheduleDay2MorningStart ScheduleDay2MorningEnd ScheduleDay2EveningStart ScheduleDay2EveningEnd ScheduleDay2IsClosed ScheduleDay2IsNotAvailable ScheduleDay3MorningStart ScheduleDay3MorningEnd ScheduleDay3EveningStart ScheduleDay3EveningEnd ScheduleDay3IsClosed ScheduleDay3IsNotAvailable ScheduleDay4MorningStart ScheduleDay4MorningEnd ScheduleDay4EveningStart ScheduleDay4EveningEnd ScheduleDay4IsClosed ScheduleDay4IsNotAvailable ScheduleDay5MorningStart ScheduleDay5MorningEnd ScheduleDay5EveningStart ScheduleDay5EveningEnd ScheduleDay5IsClosed ScheduleDay5IsNotAvailable ScheduleDay6MorningStart
NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
Page
41
SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotStepUnitInChar ge SnapshotObjective SnapshotObjective SnapshotObjective SnapshotObjective SnapshotObjective SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotObject_Media SnapshotBlock
ScheduleDay6MorningEnd ScheduleDay6EveningStart ScheduleDay6EveningEnd ScheduleDay6IsClosed ScheduleDay6IsNotAvailable ScheduleDay7MorningStart ScheduleDay7MorningEnd ScheduleDay7EveningStart ScheduleDay7EveningEnd ScheduleDay7IsClosed ScheduleDay7IsNotAvailable ScheduleComments Registry_Id Id Lang Name AdditionalInfo Registry_Id Objective_Id Block_Id Step_Id Lang Object_Id Type [Order] Media_Id Media_Name Media_FileName Media_Extention Media_Description Media_Length Media_PreviewImageName Media_IsDocumentPresent Registry_Id
NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL NVarChar(5) NOT NULL Bit NOT NULL Bit NOT NULL NVarChar(500) Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(100) NOT NULL NVarChar(1000) Int NOT NULL Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL Int NOT NULL VarChar(100) NOT NULL Int NOT NULL Int NOT NULL NVarChar(300) NOT NULL NVarChar(500) NVarChar(15) NText Decimal(18,0) NVarChar(100) Bit NOT NULL Int NOT NULL
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
Page
42
Int NOT NULL Int NOT NULL Int NOT NULL VarChar(2) NOT NULL NVarChar(100) NOT NULL NText Bit NOT NULL Int NOT NULL Int
Page 43
Table name AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecordFi elds AuditRecords
Model AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecordF ield AuditRecord
Column Id AuditRecordId FieldName FieldType OldValue_asIntege r NewValue_asInteg er OldValue_asDecim al NewValue_asDeci mal OldValue_asText NewValue_asText OldValue_asDateTi me NewValue_asDate Time OldValue_asBoole an NewValue_asBool ean Id
Null able FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE
System.String VarChar(100) NOT NULL System.String VarChar(100) NOT NULL System.Int32 Int System.Int32 Int
System.Deci Decimal(19,4) mal System.Deci Decimal(19,4) mal System.String NText System.String NText System.DateT ime System.DateT ime System.Boole an System.Boole an System.Int32 DateTime DateTime Bit Bit Int NOT NULL IDENTITY
Page 44
AuditRecords
AuditRecords
AuditRecords
AuditRecords
AuditRecords
AuditRecords
AuditRecords
AuditRecords
AuditRecords
AuditRecords
AuditRecord AuditRecord AuditRecord AuditRecord AuditRecord AuditRecord AuditRecord AuditRecord AuditRecord AuditRecord
Action EntityTable EntityTableKey AssociationTable AssociationTableK ey IsAssociationTrans lated TranslationTable TranslationTableK ey AuditDate UserName
System.Byte TinyInt NOT NULL System.String VarChar(50) NOT NULL System.Int32 Int NOT NULL System.String VarChar(50) System.Int32 Int System.Boole Bit an System.String VarChar(50) System.Int32 Int System.DateT DateTime NOT ime NULL System.String VarChar(50) NOT NULL
FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE
Relationships
Table
name
AuditRecordFields
ThisKey
AuditRecordId
OtherKey
Id
Reference
AuditRecord
UNCTAD
-
eRegulations
team
Page
45
UNCTAD
-
eRegulations
team
Page
46
The translator interface access a replica version of the content that is recorded in special tables after an explicit action from the admin interface. The explicit action is "Send to translator". The idea behind this specialized interface is to create a decoupled working space to external users of the system. Their work will not directly affect the eRegulation content. The translator can work in a parallel space and only when their work is fully completed they can commit the translation at which time the data is copied back into the " _i18n" tables in the admin space. The administrator can then validate (publish) the translation or can directly make some final corrections. When the administrator is sending an element to translator the system makes a full copy of that object and also its current translation data, it serializes it into XML format ans saves that data in specialized tables : "XMLSerializedItem" and "XMLSerializedItem_i18n". It is worth mentioning an important rule that was introduces as a need of assuring a better organization of work: translator can work on one element only at one particular moment in time. The system implements this rule by demanding the explicit actions from the translator for : - start working on element - stop working on element In order to take into account the time implications of the translation activity the system records the version of the data in the original language and also a version of the translation: - the version of the original data is incremented each time the administrator "re-demands" a translation after a previous translation has been commited or it has the status "working in progress". - the version translation is incremented with each commit The translation can be in one status at one time: inexitent work in progress already commited ( a first commit exists) not commited (never commited) Page 47
Page 48
For assuring the independent working space we used the idea of storing a serialized version of the model and reconstruct it for the translator application only. The translator admin application is working with only 4 tables: XMLSerializedItem XMLSerializedItem_i18n Workspace ProcedureContext
We used the same principle of interface segregation for assuring a shared contract for all the models that will force the consistency of implementation across all the models that must be translated. One key concept was the need of keeping track of the property accessors that are capable of having translated data.
Page 49
Table name Workspace Workspace Workspace Workspace Workspace XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n ProcedureCont ext
Model Workspace Workspace Workspace Workspace Workspace XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n XMLSerializedIt em_i18n ProcedureCont ext
Column Id Username XMLSerializedIte m_Id XMLSerializedIte m_Name StartDate Id ObjectType ObjectId ObjectVersion Data WordsDeleted WordsAdded CreatedDate CreatedUser Id XMLSerializedIte m_Id Lang TranslationVersi on Data ModifiedDate ModifiedUser CommitDate Id
Type System.Int32 System.String System.Int32 System.String System.DateTim e System.Int32 System.String System.Int32 System.Int32 System.Xml.Linq. XElement System.Int32 System.Int32 System.DateTim e System.String System.Int32 System.Int32 System.String System.Int32 System.Xml.Linq. XElement System.DateTim e System.String System.DateTim e System.Int32
DbType Int NOT NULL IDENTITY NVarChar(50) Int NOT NULL NVarChar(1000) DateTime Int NOT NULL IDENTITY NVarChar(300) NOT NULL Int NOT NULL Int NOT NULL Xml NOT NULL Int Int DateTime NOT NULL NVarChar(50) NOT NULL Int NOT NULL IDENTITY Int NOT NULL Char(2) NOT NULL Int NOT NULL Xml DateTime NVarChar(50) DateTime Int NOT NULL IDENTITY
Null able FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE FALSE
Page 50
ProcedureId
System.Int32
Int NOT NULL NVarChar(300) NOT NULL NVarChar(300) NOT NULL Int NOT NULL
Relationships
OtherKey Id Id
Page 51
For authorized user the public system will display additional information: consistency review tickets and statuses statistical report of the system
The eRegulations Public web application is built on top of the ASP.Net MVC framework. For responding to ajax calls the system uses the Asp.Net Web API framework.
Page 52
The business layer is occupied by the reusable business library described in the Admin Web Application chapter. As earlier written the public version of one procedure is retrieved from the snapshot tables. For this we added a new BusinessObjectAPI called the SnapshotBuilder that has the main responsability of loading into the domain model the data from snapshot tables. It also uses a IRepository instance to access the data layer. The controllers used for displaying the data of Repositories and Consistency Tickets use the basic BusinessObjectAPI for those models.
Table name
Model
Column
Type System.Int32
DbType
consistency_status Consistency_Status id
Int
NO
T
NULL
IDENTITY
consistency_status
Consistency_Status
systemId
System.Int32
Int
NOT
NULL
consistency_status
Consistency_Status
pagename
System.String
NVarChar(30)
consistency_status
Consistency_Status
menuid
System.Int32
Int
consistency_status
Consistency_Status
objectiveId
System.Int32
Int
consistency_status
Consistency_Status
stepId
System.Int32
Int
consistency_status
Consistency_Status
status
System.Int32
Int
consistency_status
Consistency_Status
version
System.Int32
Int
consistency_status
Consistency_Status
cycle
System.Int32
Int
consistency_status
Consistency_Status
content
System.String
NVarChar(1000)
consistency_status
Consistency_Status
dateCreate System.DateT SmallDateTime
d
ime
consistency_status
Consistency_Status
creatorId
System.Int32
Int
consistency_status
Consistency_Status
isLast
System.Int32
Int
consistency_status
Consistency_Status
oldid
System.Int32
Int
consistency_ticket Consistency_Ticket
id
System.Int32
Int
NOT
NULL
s
IDENTITY
consistency_ticket Consistency_Ticket
systemId
System.Int32
Int
NOT
NULL
s
consistency_ticket Consistency_Ticket
objectiveId
System.Int32
Int
s
consistency_ticket Consistency_Ticket
stepId
System.Int32
Int
s
consistency_ticket Consistency_Ticket
stepGuid
System.Guid
UniqueIdentifier
s
consistency_ticket Consistency_Ticket
section
System.String
NVarChar(50)
s
consistency_ticket Consistency_Ticket
objectId
System.Int32
Int
s
consistency_ticket Consistency_Ticket
priority
System.Int32
Int
s
consistency_ticket Consistency_Ticket
status
System.Int32
Int
s
consistency_ticket Consistency_Ticket
content
System.String
NVarChar(1000)
UNCTAD
-
eRegulations
team
Null
able
FALSE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
Page
54
s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_ticket s
consistency_com ments
consistency_com ments
consistency_com ments
consistency_com ments
consistency_com ments
consistency_com ments
consistency_com ments
consistency_com ments
Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Ticket Consistency_Comm ent Consistency_Comm ent Consistency_Comm ent Consistency_Comm ent Consistency_Comm ent Consistency_Comm ent Consistency_Comm ent Consistency_Comm ent
dateCreate d creatorId lastModifie d modifierId comments Counter commentL astStatus SEID responsibl eId pagename menuid oldid id ticketId dateCreate d userId comment status SEID oldid
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
System.String NVarChar(30) System.Int32 System.Int32 System.Int32 System.Int32 System.DateT ime System.Int32 Int Int Int NOT NULL IDENTITY Int SmallDateTime Int
Page 55
6.
CRALERTS
CLI
The
Consistency
Review
Command
Line
Interface
(CRAlerts
CLI)
is
a
console
executable
program
that
queries
the
eRegulations
content,
computes
a
series
of
statistical
data
related
to
the
status
of
steps
and
send
an
email
to
all
the
consultant
users
of
the
system.
The
program
is
intended
to
be
executed
on
a
regular
basis
by
setting
a
weekely
(or
more
frequent)
task
in
the
stask
scheduler.
The CRAlerts BusinessObject API uses 4 data aggregators : GeneralReviewAggregator GeneralStatusAggregator ProcedureStatusAggregator StepStatusAggregator
All
the
data
aggregators
implement
the
interface
IDataAggegator
that
has
only
one
method:
void
CalculateStatistics(ConsultantUser
user,
IList<StructuredProcedure>
data,ref
Dictionar y<string,
object>
DataBag);
The systems uses the Mustache template engine for building the html body of all the emails.
Page 58
7.
STATISTICS
CLI
The
Statistics
Review
Command
Line
Interface
(CRAlerts
CLI)
is
a
console
executable
program
that
queries
the
eRegulations
content,
computes
a
series
of
statistical
data
related
to
eRegulations
content.
The
program
is
intended
to
be
executed
daily
from
tuesday
(early
hours)
until
saturday
(early
hours)
by
setting
a
task
in
the
stask
scheduler.
It
calculates
all
the
indicators
and
stores
them
in
the
database
flagging
them
with
the
date
of
the
previous
calendaristical
day.
The
Statistics
BusinessObject
API
stores
data
calculated
for
the
followind
indicators:
All
the
indicators
implement
the
interface
IIndicatorSet
that
has
only
one
method:
public
void
SaveStatistics(List<StructuredProcedure>
data,
SystemInfo
system,
ERegAppContex t
ctt);
Total Number of published procedures Total number of procedures Total number of certified procedures Total number of published steps Total number of entities in charge Total number of units in charge Total number of persons in charge Total number of laws Total number of generic requirements Total number of results of steps Total number of feedbacks
Name2
Name3
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
StatisticSet
Name4 Id SystemId CreatedDate Type Value OptionalField1 OptionalValue1 OptionalField2 OptionalValue2 OptionalField3 OptionalValue3 OptionalField4 OptionalValue4 OptionalField5 OptionalValue5 SystemImageD ate
Type System.Int32 System.Int32 System.DateTim e System.String System.Decimal System.String System.String System.String System.String System.String System.String System.String System.String System.String System.String System.DateTim e
DbType Int NOT NULL IDENTITY Int NOT NULL DateTime NOT NULL NVarChar(200) Decimal(19,4) NVarChar(200) NVarChar(200) NVarChar(200) NVarChar(200) NVarChar(200) NVarChar(200) NVarChar(200) NVarChar(200) NVarChar(200) NVarChar(200) DateTime NOT NULL
Null able FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE
StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet StatisticSet
Page 60