Beschreibung
Extension Updater ist eine Anwendung, die den Inhalt einer B2B-Extension aktualisieren kann. Die Quelle der Daten kann dabei ein beliebiger externer Webservice bzw. eine Webseite sein. In Verbindung mit dem Task/Cron Scheduler des Betriebssystems kann dieses Tool die Extension regelmäßig mit aktuellen Daten füllen.
ISU kann ebenso als Quelle der Daten verwendet werden.
Bitte wenden Sie sich an unser Support- oder Beratungsteam, falls Sie Interesse an diesem Tool haben.
Technical documentation
The external webservice is contacted over a HTTP GET request without authentication. The response is written into an extension. The B2BBP extension will not be created - it must exist before the execution.
WARNING: Please be careful when configuring the extension, that has to be changed. Changing an important extension may lead to serious problems in B2BBP.
Configuration
Configuration is done in a YAML-file.
Example:
external-webservice:
url: https://rest.lieferant-isu/contrl-deadline-emails
converter:
type: Default
b2b:
api-url: http://localhost:9080/b2bbp-engine/api/administration/extensions
user: admin
password: pass
extension:
type: CONTRL_DEADLINE_EMAILS
provider:
version:
The B2B, which is configured in b2b.api-url
must not run with Keycloak. Among others, the property “-Dspring.profiles.active” must not be defined on this B2B node.
The response from webservice can be converted before writing into B2BBP. The type of converter is configured in the property converter.type
Currently, two types are implemented:
Default
: Content is not changed
JsonLineArray
: Content from the webservice is a Json-array of strings: ["abc", "xyz"]
. The strings are extracted to lines with line separator LF. The resulting extension in our example will have two lines:
abc
xyz
Running
This application requires Java 11 or newer.
Execute like java -jar .\write-extension-from-webservice-1.0-SNAPSHOT.jar --spring.config.location="C:\path\application.yml"
(under Windows)
After successful execution, the application will stop with an exit code 0. Unsuccessful execution will produce a non-zero exit code.
Logging
Logs are written into folder “logs” aside the executable jar.
Developer documentation
For the source code and further info see the repository https://gitlab.next-level-apps.com/t_blau/b2b-environment/write-extension-from-webservice
View Me Edit Me