TAFJ DSPackageInstaller
TAFJ DSPackageInstaller
R20
TAFJ-D SP a c k a g e I n s t all e r
Amendment History:
Revisio
Date Amended Name Description
n
1 27th March 2018 JN.Charpin Initial version
2 9th May 2018 JN.Charpin Staging operations for all packages from package list
21st March Sanofar Nisha
3 R19 AMR Review
2019 H
4 25th March 2020 Siranjeevi M R20 AMR Review
Page 2
TAFJ-D SP a c k a g e I n s t all e r
Copyri g h t
Copyright (c) Temenos Headquarters SA 2009-2020.
All rights reserved.
This document contains proprietary information that is protected by copyright. No part of this document may
be reproduced, transmitted, or made available directly or indirectly to a third party without the express
written agreement of TEMENOS UK Limited. Receipt of this material directly TEMENOS UK Limited
constitutes its express permission to copy. Permission to use or copy this document expressly excludes
modifying it for any purpose, or using it to create a derivative therefrom.
Temenos Headquarters SA
2 Rue de l’Ecole-de-Chimie,
CH - 1205 Geneva,
Switzerland
Please include your name, company, address, and telephone and fax numbers, and email
address if applicable. [email protected]
Page 3
TAFJ-D SP a c k a g e I n s t all e r
Table of Contents
Copyright................................................................................................................................................ 3
Errata and Comments............................................................................................................................ 3
Goal........................................................................................................................................................ 6
Principle.................................................................................................................................................. 6
Package structure within the webapp..................................................................................................... 7
Package-list file..................................................................................................................... 8
Package-detail file................................................................................................................. 8
Staging area management and population............................................................................................. 9
Component definition and convention................................................................................... 9
Default implementation.................................................................................................... 12
Defining a custom implementation...................................................................................... 13
Application deployment........................................................................................................................ 13
REST API to interact with staging area................................................................................................ 14
API description.................................................................................................................... 15
Package(s) operations..................................................................................................... 15
Staging area operations................................................................................................... 16
REST Interaction examples by using POSTMAN client...................................................... 19
Basic authentication all requests..................................................................................... 19
Check staging area status............................................................................................... 19
Drop the staging area...................................................................................................... 20
Create the staging area................................................................................................... 21
Check the package list..................................................................................................... 22
Check the package detail................................................................................................ 22
Check a record content.................................................................................................... 23
Write all package(s) to the staging area.......................................................................... 24
Write a package to the staging area................................................................................ 25
Write a single record........................................................................................................ 27
Read a record from the staging area............................................................................... 28
Read a package from the staging area........................................................................... 28
Page 4
TAFJ-D SP a c k a g e I n s t all e r
Page 5
TAFJ-D SP a c k a g e I n s t all e r
Goal
Avoid file system usage during Design Studio (referred as DS) package installation.
Prin c i p l e
Persist a DS package content in T24 RDBMS, within a “staging area” (set of tables), instead
of unzipping it to file system, UD folder.
The DS generated package content has to be deployed, exploded, within the following tafj
artifact.
<dependency>
<groupId>com.temenos.tafj</groupId>
<artifactId>DSPackageInstaller</artifactId>
<type>war</type>
</dependency>
This DSPackageInstaller artifact is a web application, war file, which is going to be deployed
under client JEE environment, through the standard web application deployment capability of
the application server.
T24 services need to adapt their process to read packages from this staging area instead of
reading from the former UD file system.
Page 6
TAFJ-D SP a c k a g e I n s t all e r
Design Studio package builder needs to pull from the nexus repository the raw
DSPackageInstaller.war artifact mentioned above.
/DSPackageInstaller.war
/WEB-INF
/packages
/package-list
/R17_FT_Modelbank_1_JAVA_17.0
/package-detail
/ds-generated
/eson
/IF
/REC001
Packages are referenced within the package-list file which needs to be generated by DS
package builder
A package content is listed within the package-detail file which has to be generated by DS
package builder.
Page 7
TAFJ-D SP a c k a g e I n s t all e r
The package-list contains the list of all packages, represented by their name, corresponding
to the root directory level of the package.
Packages part of the package-list are visible for staging, and must be present under WEB-
INF/packages.
i.e.
R17_FT_Modelbank_1_JAVA_17.0
R17_FT_Modelbank_1_JAVA_17.1
The package-detail represents the list of files or package entries which are visible for staging.
Files not intended to be staged and part of a package, must not be part of this list.
technicalUniquePackageEntryKey#path/To/The/File/Within/The/Package
The first part is a technical key generated by DS package builder, it must be unique as it will
be used as a primary key within the staging area. Since the record management will be
handled differently by T24 based on its type, this type is also part of the key.
Re-using same key will lead to a record overwrite at staging time, in case of an existing key
with same value is already defined in the staging area.
The second part after # sign is the path to the record from the package root directory.
The file must exist under this path to be read by the installer.
i.e.
Page 8
TAFJ-D SP a c k a g e I n s t all e r
R17_FT_Modelbank_1_JAVA_17.0-9.xml#R17_FT_Modelbank_1_JAVA_17.0/ds-
generated/PP.STANDING.ORDER.enquiry.xml
R17_FT_Modelbank_1_JAVA_17.0-
10.eson#R17_FT_Modelbank_1_JAVA_17.0/Eson/CATEGORY!1001!
GB0010001.eson
R17_FT_Modelbank_1_JAVA_17.0-
11.event#R17_FT_Modelbank_1_JAVA_17.0/IF/ACCOUNT.event
R17_FT_Modelbank_1_JAVA_17.0-
12.flow#R17_FT_Modelbank_1_JAVA_17.0/IF/ACCOUNT.flow
R17_FT_Modelbank_1_JAVA_17.0-
13#R17_FT_Modelbank_1_JAVA_17.0/R17_FT_Modelbank_1
R17_FT_Modelbank_1_JAVA_17.0-
14#R17_FT_Modelbank_1_JAVA_17.0/R18_IF_TestIF_1
R17_FT_Modelbank_1_JAVA_17.0-
15.d#R17_FT_Modelbank_1_JAVA_17.0/REC001
R17_FT_Modelbank_1_JAVA_17.0-
16.d#R17_FT_Modelbank_1_JAVA_17.0/REC002
R17_FT_Modelbank_1_JAVA_17.0-
17.d#R17_FT_Modelbank_1_JAVA_17.0/REC003
The staging area management and CRUD operations are done through a JBC component
called DS.PackageStaging.component. The initial version of this component has been
provided by TAFJ team to T24 AFW team which will take the ownership.
Page 9
TAFJ-D SP a c k a g e I n s t all e r
component DS.PackageStaging
# Component Isolation Definition
metamodelVersion 1.6
# -------------------------------------------------
public method CheckStagingArea (
INOUT ReturnStatus string
INOUT ReturnInfo string
)
{
jBC: DS.CHECK.STAGING.AREA
}
Check whether all table part of the staging area are existing.
ReturnStatus=0 when all table exist.
ReturnStatus=1 when a table is missing.
ReturnInfo= List of table name and their status OK / NOK.
{
jBC: DS.CREATE.STAGING.AREA
}
{
jBC: DS.DROP.STAGING.AREA
Page 10
TAFJ-D SP a c k a g e I n s t all e r
{
jBC: DS.CLEAR.STAGING.AREA
}
{
jBC: DS.WRITE.STAGING.AREA
}
{
jBC: DS.READ.STAGING.AREA
}
Page 11
TAFJ-D SP a c k a g e I n s t all e r
{
jBC: DS.DELETE.STAGING.AREA
}
Defa u l t impl e m e n t a t i o n
A default implementation is provided, to build a staging area made of 2 tables:
- TAFJ.PACKAGE
- TAFJ.PACKAGE.RECORD
TAFJ.PACKAGE stores the technical package entry key as the record key and the path to
the record within the package as the record value.
i.e.
Page 12
TAFJ-D SP a c k a g e I n s t all e r
RECID
-------------------------------------------------------------------
-------------
XMLRECORD
-------------------------------------------------------------------
-------------
R17_FT_Modelbank_1_JAVA_17.1-2
R17_FT_Modelbank_1_JAVA_17.1/ds-generated/151.xml
TAFJ.PACKAGE.RECORD stores the technical package entry key as the record key and the
file content as the record value.
i.e.
RECID
-------------------------------------------------------------------
-------------
XMLRECORD
-------------------------------------------------------------------
-------------
R17_FT_Modelbank_1_JAVA_17.1-2
<?xml version="1.0" encoding="UTF-8"?>┐<localref:LocalRef
xmlns:xsi="http://www....
Defi n i n g a cu s t o m impl e m e n t a t i o n
Hence it’s important to respect the component definition contract defined above.
Page 13
TAFJ-D SP a c k a g e I n s t all e r
Appli c a t i o n depl o y m e n t
The DS package staging component must be available within the application classpath.
<resource-root path="/ext/DS_PackageStaging.jar"/>
A REST API allowing staging area management and packages read, write and delete
operations, through http.
Make use of ‘add-user’ tooling and create a user part of the TAFJAdmin group.
The REST API is documented below and also available online since the application is
deployed. It can be accessed by using following URL: /DSPackageInstaller/html/help.html.
Page 14
TAFJ-D SP a c k a g e I n s t all e r
API de s c r i p t i o n
Pac k a g e ( s ) op er a t i o n s
Design Studio packages are part of the DSPackageInstaller.war webapp and their content
can be browsed by using the following operations.
Requ
est Resource URI Action Description
type
Page 15
TAFJ-D SP a c k a g e I n s t all e r
under /WEB-
INF/packages/{recordPath}
Sta g i n g are a op er a t i o n s
The DSPackageInstaller staging area is a T24 RDBMS set of tables allowing packages
storage for their installation. The staging area can be created, cleared and dropped by using
the following operations.
Request
Resource URI Action Description
type
Pac k a g e ( s ) sta g i n g op er a t i o n s
Since the staging area is correctly initialized and valid package(s) are present within
DSPackageInstaller.war it is possible to perform the following write, read and delete
operations.
Page 16
TAFJ-D SP a c k a g e I n s t all e r
Form URL
Request
Resource URI encoded Action Description
type
parameters
Page 17
TAFJ-D SP a c k a g e I n s t all e r
Page 18
TAFJ-D SP a c k a g e I n s t all e r
Page 19
TAFJ-D SP a c k a g e I n s t all e r
If staging area doesn’t exist, status’nok’ is returned with missing tables list.
If it exists, status ‘ok’ is returned with existing tables making the staging area.
Page 20
TAFJ-D SP a c k a g e I n s t all e r
Same than for the requests presented above, response status depends on the existence of
the staging area.
Page 21
TAFJ-D SP a c k a g e I n s t all e r
Page 22
TAFJ-D SP a c k a g e I n s t all e r
If a package-list file is found status ‘ok’ is returned with packages present and available for
staging.
Where packageName is a valid name returned from the package list request above.
If a package-detail is found for the package name, status ‘ok’ is returned with an array of
records, represented by their technical key and their path within the webapp.
Page 23
TAFJ-D SP a c k a g e I n s t all e r
….
Che c k a rec o r d co n t e n t
To read a file content within the webapp.
Where recordPath is the path to the record as returned from the package detail above.
i.e. to access
R17_FT_Modelbank_1_JAVA_17.1/ds-generated/AI.ACCTMANDATE.VIEW.enquiry.xml
Escape separators to
R17_FT_Modelbank_1_JAVA_17.1%2Fds-generated
%2FAI.ACCTMANDATE.VIEW.enquiry.xml
Page 24
TAFJ-D SP a c k a g e I n s t all e r
If the staging area has been created and all files are successfully written to the staging area
tables, the list of files persisted with their technical key and path are returned with status ‘ok’.
Page 25
TAFJ-D SP a c k a g e I n s t all e r
Otherwise status will be ‘nok’ with the list of files which have failed to be written.
The package to be persisted has to be passed through a “form url encoded” parameter as
shown below with parameter name packageName.
Page 26
TAFJ-D SP a c k a g e I n s t all e r
If the staging area has been created and all files are successfully written to the staging area
tables, the list of files persisted with their technical key and path are returned with status ‘ok’.
Otherwise status will be ‘nok’ with the list of files which have failed to be written.
Page 27
TAFJ-D SP a c k a g e I n s t all e r
The record to be persisted has to be passed through “form url encoded” parameters as
shown below with parameter name recordKey and recordPath.
Record path, path separators, needs to be escaped, ‘/’, replaced by ‘%2F’ as already
explained.
Page 28
TAFJ-D SP a c k a g e I n s t all e r
Where recordKey is the technical record key, RECID at staging area level.
Page 29
TAFJ-D SP a c k a g e I n s t all e r
It returns a status ‘ok’ and the list of records successfully written to the staging area.
In case of some records are missing, it means entries present in the package-detail but not
at staging area level, their list will be returned with status ‘nok’.
….
Page 30
TAFJ-D SP a c k a g e I n s t all e r
Page 31
TAFJ-D SP a c k a g e I n s t all e r
Page 32
TAFJ-D SP a c k a g e I n s t all e r
All API operation described in former section are available through the following servlet
(webapp root).
/DSPackageInstaller/
Page 33
TAFJ-D SP a c k a g e I n s t all e r
Same basic authentication rules apply and a valid user part of appropriate group (default
‘TAFJAdmin’) must be used to login.
Sta g i n g are a ma n a g e m e n t
On first access, the staging area will be reported as not initialized and the missing tables are
listed.
Page 34
TAFJ-D SP a c k a g e I n s t all e r
Since creation succeed, a new status is available and service output is being displayed in a
text area.
Pac k a g e par s i n g op e r a t i o n s
If there are some packages present within the webapp they will be in the second part of the
servlet.
Page 35
TAFJ-D SP a c k a g e I n s t all e r
“View” operations are available at package and package entry level. They are outputting the
webapp content.
Clicking “View” at package level will return the related “package-detail” content if present
within the webapp.
Clicking “View” at package entry level will return the related package entry content if present
within the webapp under the specified path (second part, after ‘#’ sign, of the package entry).
Pac k a g e sta g i n g op er a t i o n s
All “Read”, “Write” and “Delete” operations are staging area operations.
It is also possible to stage or remove from staging all package(s) part of the package list with
a single call.
Page 36
TAFJ-D SP a c k a g e I n s t all e r
Since they are not, a failure status is returned and all files which are not part of the staging
area are reported as “FileNOk”.
Performing the below “Write” action on same package will write all package entries to staging
area.
If all entries are written successfully, the returned status is success along the list of package
entries successfully processed as “FileOk”.
In case of files not successfully written, they would be reported as “FileNOk” and final status
would be failure.
The package status is now reported as “OK al file(s) are part of staging area”.
Page 37
TAFJ-D SP a c k a g e I n s t all e r
It is now possible to trigger “Read” action, which is now returning success since all package
entries are found in staging area tables.
To access the staging area content for a package entry, simply trigger a “Read” action at
package entry level.
Page 38
TAFJ-D SP a c k a g e I n s t all e r
All staging area entries for a specific package can be deleted by clicking the “Delete” button
at package level as shown below.
Same action can be triggered at package entry level to delete a specific record from staging
area.
Page 39
TAFJ-D SP a c k a g e I n s t all e r
Reading the package from staging area will now report the missing record in the “FileNOk”
list since it has been deleted.
The global package status is also changed to “NOK some file(s) are missing in staging area”.
To write this package entry only, simply trigger the “Write” action at record level.
Page 40
TAFJ-D SP a c k a g e I n s t all e r
The record is successfully written to staging area and the global package status is changed
to “OK” since all package entries are now staged.
Page 41