Skip to content

02. Introduction

Willem Gorter edited this page Oct 27, 2023 · 4 revisions

1 Purpose

The purpose of this document is to provide guidelines for using the Excel workbook TranslationTool_v1_2.xlsm (or later). The Excel workbook is a tool for translating T24 screen text to any local language, including right-to-left languages.

2 Technical background

2.1 TAFJ until R17 (this paragraph is now out of date)

T24 browser (backoffice screens) uses OFS to communicate with T24 Server. In TAFJ, OFS can be run also directly as an HTTP-GET command from the address bar in a browser, if the address starts with:

http://linx101122t0m:8080/TAFJServices/services/OFSService/Invoke?Request=

(where the part starting with TAFJServices replaces the address of the Login screen starting with BrowserWeb). An example (it links to A t24 server, if you have access to it you can Ctrl-click on it):

http://linx101122t0m:8080/TAFJServices/services/OFSService/Invoke?Request=ENQUIRY.SELECT,/I/PROCESS,WILLEMA/123456/IL0010001,DATES.LIST 

will return, when pasted in Internet Explorer or Firefox:

image

The excel tool uses this mechanism to execute the actions. It will execute an HTTP-GET request, and read the response. The VBA code for this is:

To read the response, it will load the ResponseText property of the request, and parse it to find the OFS response. You can find the code in the Excel tool when editing macro's, in the routine LaunchOFSCommandTAFJ in module1.

2.2 TAFJ as of R17

T24 browser (backoffice screens) uses OFS to communicate with T24 Server. In TAFJ, OFS can be run also directly as an HTTP-POST command, using Postman or any other API software, or through writing a program in any programming language, like Visual Basic for Applications, available in Excel.

The program should execute an HTTP request using (for example):

URL = http://localhost:8089/TAFJRestServices/resources/ofs
Request = ofsRequest=ENQUIRY.SELECT,,INPUTT/123456,DATES.LIST
Header = “Content-Type” = “application/x-www-form-urlencoded”

(where the URL part starting with TAFJServices replaces the address of the Login screen starting with BrowserWeb). This will return, in the HTTP Response:

{"ofsRequest":"ENQUIRY.SELECT,,INPUTT/123456,DATES.LIST","ofsResponse":"HEADER=\"Dates List\",@ID::Id/TODAY::Today/LAST.WORKING.DAY::Last Working Day/NEXT.WORKING.DAY::Next Working Day,\"Dates List\",\"AU0010001      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"AU0010001-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"EU0010001      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"EU0010001-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010001      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010001-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010002      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010002-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010003      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010003-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010004      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010004-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010005      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010005-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"NL0010001      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"NL0010001-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0010001      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0010001-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020100      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020100-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020101      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020101-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020102      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020102-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"US0010001      \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"US0010001-COB  \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\""}

The excel tool uses this mechanism to execute the actions. It will execute an HTTP-POST request, and read the response. The VBA code for this is:

Dim URS_R18 as string
Dim myRequest As MSXML2.XMLHTTP60
URL_R18 = "http://" & host & ":" & port & "/TAFJRestServices/resources/ofs"
Set myRequest = New MSXML2.XMLHTTP60
myRequest.Open "POST", URL_R18, False, JBossUser, JBossPwd
myRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
myRequest.send "ofsRequest=" & OFSRequest
myResponse = myRequest.responseText

To read the response, it will load the ResponseText property of the request, and parse it to find the OFS response. You can find the code in the Excel tool when editing macro's, in the routine LaunchOFSCommandTAFJ in module1.

2.2.1 TAFJ Application User

As you can see in the above example, when opening the HTTP connection, you need to pass a username and password. These are not the same as the T24 user/password that you have to provide inside the OFS command, and which is a user with which you can login to BrowserWeb, typically INPUTT/123456.

To access the Rest Services for TAFJ, you need a TAFJ application user, and that user needs to be created in the environment that you are targeting.

For local modelbanks, there are scripts for managing the users in the jBoss installation (typically “add-user” script in jboss/bin). Please see the appendix, section 7.1, for a detailed explanation on how to create such a user, in short the process should be to get it working on a UTP installation in Windows:

  1. Go to the directory /jboss/bin
  2. Run the command “add-user.bat”
  3. Select “b”
  4. Type username
  5. Type password
  6. In groups type “t24user,TAFJAdmin” in exact case
  7. When asked as a slave type no

image

There should be no need to restart jBoss after adding the user. If, after adding the user, you get the following response:

<html><head><title>Error</title></head><body>Unauthorized</body></html>

Then the user was not created correctly, or the T24 installation is not correct (typically, using an installer version, not a UTP-version).

The username and password need to be provided in the “installation” worksheet (see chapter 4)