0% found this document useful (0 votes)
4 views

AAACT6_Activity_API

Uploaded by

Psar Khmer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

AAACT6_Activity_API

Uploaded by

Psar Khmer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Technical Monitor in

T24

AA Technical 5:
Activity API
Swetha S
Objectives and learning outcomes

• After completing this presentation, we will be able to:


• State the need for ACTIVITY.API property class
• Create property and product condition for ACTIVITY.API
• Understand how ACTIVITY.API works
Scenario

• When an Activity LENDING-DECREASE-COMMITMENT is performed on a


revolving loan, the user should be able to input the value of POSTING.RESTRICT
that will automatically affect the Arrangement’s Account.

• What would be the solution?


• No routines can be attached to the versions AA.ARR.XXX
• Hence, we would need to go with the ACTIVITY.API property class defined
specifically for this purpose.
ACTIVITY.API Property Class

• Steps involved to attach the routine to an Activity/Activity Class


• Write a routine, compile/catalog it
• Create an EB.API entry
• Attach it in Activity API product condition
• Any number of routine can be attached to the same Activity/Activity Class.
• The routines can be attached either as a pre-routine or a post-routine. A pre-
routine is one that will get executed before an activity takes place and a post-
routine would get executed after an activity.
ACTIVITY.API Property Class

• ACTIVITY.API is a cumulative property. Cumulative, as the name implies is, when


a child and its parent product have routines defined, routines defined at both
levels will get executed.
• During proofing a product with ACTIVITY.API property following is the order in
which the records are merged:
• Routines attached at Child followed by Parent
• Routine attached for an Activity
• Routine attached for an Activity Class (If no routines are attached at the
Activity level)
• Hierarchy of routine execution:
• Pre validation routine triggered prior to core validation.
• Pre routines followed by Post Routines.
Back to Scenario

• When an Activity LENDING-DECREASE-COMMITMENT is performed on a


revolving loan, the user should be able to input the value of POSTING.RESTRICT
that will automatically affect the Arrangement’s Account.

• What would be the process involved?


• Create a local reference field for Posting Restriction in the TERM.AMOUNT
property class and attach it to the version for LENDING-DECREASE-
COMMITMENT using Activity Presentation for the user to enter.
• Create a routine that will pick value from this and update the arrangement
account’s POSTING.RESTRICT (EB.API entry for the routine)
• Create a product condition called API, attach the product condition to the
activity class LENDING-DECREASE-COMMITMENT.
• Attach the condition to product, and proof & publish the product.
Step 1 – Local Reference

• Creating the Local Field and attaching it to TERM.AMOUNT property class


Step 2 – Version changes
• The field can be added to the version attached to LENDING-DECREASE-COMMITMENT (or a
version can be newly created and attached)
Step 3 – Routine Creation
• Create a routine that picks value from this field and triggers LENDING-UPDATE-ACCOUNT in
order to update the Actual posting restriction for the loan.

*-----------------------------------------------------------------------------
SUBROUTINE AA.AC.DC.POST
*-----------------------------------------------------------------------------

$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_AA.LOCAL.COMMON
$INSERT I_F.AA.ACCOUNT
$INSERT I_F.AA.TERM.AMOUNT

*-----------------------------------------------------------------------------

GOSUB INITIALISE
GOSUB MAIN.PROCESS

RETURN
Step 3 – Routine Creation
INITIALISE:

* get standard selection record


APP.NAME = "AA.ARR.ACCOUNT"
AA.ACC.SS.REC = ""
CALL GET.STANDARD.SELECTION.DETS(APP.NAME, AA.ACC.SS.REC)

* Get the field name of the posting restrict field


POST.RESTRICT.FLD.NO = AA.AC.POSTING.RESTRICT
POST.RESTRICT.FLD.NAME = ""
CALL FIELD.NUMBERS.TO.NAMES(POST.RESTRICT.FLD.NO, AA.ACC.SS.REC, POST.RESTRICT.FLD.NAME,
"", "")

RETURN
*-----------------------------------------------------------------------------
MAIN.PROCESS:

GOSUB GET.ARR.DETAILS ;* get the details of the arrangement from local variables
GOSUB UPDATE.ARR.FIELDS.REC ;* map the posting restrict fields
GOSUB UPDATE.POST.RESTRICT ;* Generate new activity to update post restrict

RETURN
Step 3 – Routine Creation
*-----------------------------------------------------------------------------
GET.ARR.DETAILS:

ARRANGEMENT.ID = c_aalocArrId ;* New arrangement


AA.ARRANGEMENT.REC = c_aalocArrangementRec ;* Arrangement record
AA.ARR.ACT.ID = c_aalocArrActivityId ;* Arrangement activity id
CURR.ACTIVITY = c_aalocActivityId ;* Current activity id
EFFECTIVE.DATE = c_aalocActivityEffDate ;* Date on which activity was triggered

* Get the property for the ACCOUNT


PC.TO.PROCESS = "ACCOUNT"
PRODUCT.RECORD = c_aalocProductRecord
PROPERTY = ""
CALL AA.GET.PROPERTY.NAME(PRODUCT.RECORD, PC.TO.PROCESS, PROPERTY)

RETURN
*-----------------------------------------------------------------------------
Step 3 – Routine Creation
UPDATE.ARR.FIELDS.REC:

ARR.PROPERTY.LIST = PROPERTY
ARR.FIELD.NAME.LIST = POST.RESTRICT.FLD.NAME:":1:1"
AAA.FIELDS.REC = ""
TA.FILE.NAME = "AA.PRD.DES.TERM.AMOUNT"
TA.LOCAL.FIELD.NAME = "POST.RESTR"
TA.FIELD.POS = ""
CALL MULTI.GET.LOC.REF(TA.FILE.NAME,TA.LOCAL.FIELD.NAME,TA.FIELD.POS)

POSTING.RESTRICT.VALUE = R.NEW(AA.AMT.LOCAL.REF)<1,TA.FIELD.POS>
ARR.FIELD.VALUE.LIST = POSTING.RESTRICT.VALUE
AAA.FIELDS.REC = ""

CALL AA.GEN.ARRANGEMENT.ACTIVITY.FIELDS(ARR.PROPERTY.LIST, ARR.FIELD.NAME.LIST,


ARR.FIELD.VALUE.LIST, AAA.FIELDS.REC)

RETURN
Step 3 – Routine Creation
UPDATE.POST.RESTRICT:

* form the secondary activity id


PRODUCT.LINE = CURR.ACTIVITY<1>
THIS.ACTIVITY = "UPDATE"
THIS.OBJECT = PROPERTY
NEW.ACTIVITY.ID = PRODUCT.LINE:"-":THIS.ACTIVITY:"-":THIS.OBJECT

CALL AA.GEN.NEW.ARRANGEMENT.ACTIVITY(ARRANGEMENT.ID, NEW.ACTIVITY.ID, EFFECTIVE.DATE,


"", AA.ARR.ACT.ID, AAA.FIELDS.REC, RETURN.ERROR)

RETURN
*-----------------------------------------------------------------------------
END
Step 4 – Creating API Condition and attaching routine
Step 5 – Attaching Condition to Product
Decreasing Commitment for an existing loan
Once Activity is triggered
Once Activity is triggered
Summary

• In this presentation, we discussed the following:


• Need of ACTIVITY.API
• Creating a Local Reference for user input of Posting Restriction during
LENDING-DECREASE-COMMITMENT which was then applied to the
arrangement’s ACCOUNT property through ACTIVITY.API
Technical Monitor in
T24

THANK YOU

You might also like