You are on page 1of 16

Validation and processing code in

Contracts
TEMENOS EDUCATION CENTRE

NOTICE

These training materials are the copyrighted work of Temenos Headquarters SA and other companies in the TEMENOS group of companies
(The Copyright Owner). The training materials contain protected logos, graphics and images. Use of the training materials is restricted solely for
use by licensed end users, partners and employees. Any un-licensed reproduction by any means, redistribution, editing, transformation,
publishing, distribution, or public demonstration of the training materials whether for commercial or personal gain is expressly prohibited by law,
and may result in severe civil and criminal penalties. Violators will be prosecuted to the maximum extent possible. Such training materials shall
not be represented, extracted into or included in part, or in whole, as part of any other training documentation without the express permission of
the Copyright Owner, which must given in writing by an authorised agent of the Copyright Owner to be valid. Where such permission is given a
clear and prominent notice must be displayed on any and all documentation accrediting the Copyright Owner with having copyright over the
materials. End-user licenses will in no event contain permissions extending the use of these training materials to third parties for commercial
training purposes.
Without limiting the foregoing, copying or reproduction of the training materials in part or in whole to any other sever or location for further
reproduction or redistribution is expressly prohibited, unless such reproduction is expressly licensed by the Copyright Owner.
Also ensure that all the materials are marked as follows at least on the front page: Copyright © 2010 Temenos Headquarters SA (and change
each year like 2009-2011 as time passes)
Objectives

The objective of this session is to understand the following

 TEMPLATE METHODS – Business Logic


 .VALIDATE
 .OVERRIDES

Slide 2
Web Application Development

THE.TEMPLATE

TEMPLATE METHODS
– Biz Logic

Slide 3
Web Application Development

TEMPLATE METHODS

Methods executed on COMMIT

Slide 4
Errors In T24

T24 Validattion

Overrides Errors

NOTE : When Errors and Overrides appear in


the same record, Errors appear first.

Slide 5
Web Application Development

AC.DEBIT.CARD I DBC11214D8CSZ

Page Page
Unload Request

Page
Authorise Page
Init

OR
.PROCESS

Life-Cycle of a
Page Page
T24 Page
Commit Pre-
.OVERRIDES
Load

Page Function
.VALIDATE Validate Check

Page ID
Load Check

Slide 6
Web Application Development

.VALIDATE 1) When is the method executed ?


The next step in the life cycle of a transaction, is for the user to
either do both validate and commit or only commit. This method
is invoked during both a validate or commit operation
3) How is the method used ?
 The subroutine must be named <Application-Name>.VALIDATE
 Write a paragraph each for each field requiring validation and a
paragraph each for each Associated Multi-value field requiring
validation.
How? When?
 It’s a good programming practice to write the paragraphs and their
invocation using GOSUB, in the sequence of their appearance on
the web-page.
What?
 Use AF, AV, AS to specify the fields which raised the errors.
 R.NEW, R.NEW.LAST, R.OLD are available for manipulation

2) What is the method used for?


Used to raise Errors for violations in business rules. The IN2
routines, if any, attached to each field is executed. Followed by the
specific code validations that are written in the .VALIDATE method

Slide 7
Web Application Development

.VALIDATE

E.g. – Check if the account category entered in the record is within the range 1000 –
9999.

SUBROUTINE AC.DEBIT.CARD.VALIDATE

AF = AC.CATEGORY
IF R.NEW(AF) < 1000 OR R.NEW(AF) > 9999) THEN
ETEXT = "AC.CAT.RG.1000.9999"
CALL STORE.END.ERROR
END

Slide 8
Web Application Development

AC.DEBIT.CARD I DBC11214D8CSZ

Page Page
Unload Request

Page
Authorise Page
Init

OR
.PROCESS

Life-Cycle of a
Page Page
T24 Page
Commit Pre-
.OVERRIDES
Load

Page Function
.VALIDATE Validate Check

Page ID
Load Check

Slide 9
Web Application Development

.OVERRIDES

1) When is the method executed ?


After errors are corrected by the user, Overrides if any, are
raised, when the user clicks on Commit.

3) How is the method used ?


 The subroutine must be named <Application-
Name>.OVERRIDES
 Any application which does not block the ‘I’ (Input) How? When?
function, can generate overrides using the
.OVERRIDES method.
 The overrides are also stored along with the record. What?
 Use R.NEW, R.NEW.LAST, R.OLD for manipulation

2) What is the method used for?


To raise Overrides on encounter of inconsistent
information in the page, on Commit.

Slide 10
Web Application Development

.OVERRIDES

 E.g. : - Raise an override if the Settlement Account is not specified for an

account closure

SUBROUTINE ACCOUNT.CLOSURE.OVERRIDES

IF R.NEW(AC.SETTLEMENT.ACCT) EQ '' THEN


TEXT = "AC.CASH.TYPE.CLOSURE"
CALL STORE.OVERRIDE(CURR.NO)
END

Slide 11
Components of an Override Message

Override Message

Static Dynamic
Component component

Text Part of the message Represented by “&” symbol

Does not vary according to the The “& “ is replaced with values
values in the transaction in the transaction

Slide 12
Dynamic Override Message

.OVERRIDES

 E.g. : - Raise an override if the Settlement Account specified for an account

closure does not belong to the customer

SUBROUTINE ACCOUNT.CLOSURE.OVERRIDES

IF SETTLEMENT.ACCT.CUST <> CUS.NO THEN


TEXT = ACL.ACCT.NOT.BELONG.CUST':FM:CUS.NO
CALL STORE.OVERRIDE(CURR.NO)
END

Slide 13
Web Application Development

SUMMARY

 The .VALIDATE method is invoked during both a validate or commit


operation. It is used to raise Errors for violations in business rules.

 Use AF, AV, AS to specify the fields which raised the errors.

 R.NEW, R.NEW.LAST, R.OLD are available for manipulation in


.VALIDATE

 The .OVERRIDES method is used to raise Overrides on encounter of


inconsistent information in the page, on Commit.

 The overrides are also stored along with the record.

 R.NEW, R.NEW.LAST, R.OLD are available for manipulation in


.OVERRIDES

Slide 14
Workshop

 Write the .VALIDATE, .OVERRIDE for the DEBIT CARD application


as per the requirement in the requirements document

Slide 15
Thank You

TEMENOS EDUCATION CENTRE

NOTICE

These training materials are the copyrighted work of Temenos Headquarters SA and other companies in the TEMENOS group of companies
(The Copyright Owner). The training materials contain protected logos, graphics and images. Use of the training materials is restricted solely for
use by licensed end users, partners and employees. Any un-licensed reproduction by any means, redistribution, editing, transformation,
publishing, distribution, or public demonstration of the training materials whether for commercial or personal gain is expressly prohibited by law,
and may result in severe civil and criminal penalties. Violators will be prosecuted to the maximum extent possible. Such training materials shall
not be represented, extracted into or included in part, or in whole, as part of any other training documentation without the express permission of
the Copyright Owner, which must given in writing by an authorised agent of the Copyright Owner to be valid. Where such permission is given a
clear and prominent notice must be displayed on any and all documentation accrediting the Copyright Owner with having copyright over the
materials. End-user licenses will in no event contain permissions extending the use of these training materials to third parties for commercial
training purposes.
Without limiting the foregoing, copying or reproduction of the training materials in part or in whole to any other sever or location for further
reproduction or redistribution is expressly prohibited, unless such reproduction is expressly licensed by the Copyright Owner.
Also ensure that all the materials are marked as follows at least on the front page: Copyright © 2010 Temenos Headquarters SA (and change
each year like 2009-2011 as time passes)

You might also like