Cross-solution script calls
Goal
In order to easily add technical features to the Sage X3 platform, this platform has been enhanced with a component: the Java Bridge Server component, commonly known as the Safe X3 Java Bridge Server.
Architecture
To restrict developments in the standard X3 engine, it is possible to run a given script from another Adonix server.
Calliu and Funciu calls
In the Adonix server of a standard X3 engine, it is now possible to open a session from another Adonix server (belonging or not to the same solution). You can then request to run a script synchronously via a Calliu or Funciu instruction.
Principles
- Opening a connection:
OpAdxd "host:port" With 7,folder,language,x3user,x3pass Using [abbreviation]
- Several connections can be opened
- Calls in a connection:
Calliu "traitement:spgm" With parametres,… Using [abreviation]
Funciu "traitement:func" Using [abreviation] With (parametres,…)
- Closing a connection:
OpAdxd Using [abbreviation]
Local Integer
WNBITEM Onerrgo
CLOSEADX
# Opening a link to a remote Adonix server
Opadxd "aydaix03.acy.adx:4150" With 7, "myFolder","FRA","myUserId","myPassword" Using [DIAMOND]
# Calling a function in the remote Adonix server identified by the abbreviation "DIAMOND"
WNBITEM = Funciu "STOCKSERVICES:GETAVAILABLES" Using [DIAMOND] With (WITEMREF,WSTOSITE)
# Calling a sub-program in the remote Adonix server identified by the abbreviation "DIAMOND"
Calliu "STOCKSERVICES:MAJSTOCK" With WSTOSITE,WITEMREF,WNBITEM Using [DIAMOND]
$CLOSEADX
# Closing a link established with the remote Adonix server identified by the abbreviation "DIAMOND"