Language: Deutsch · English
Nuclet: REST client utils (not yet available)
Data sheet and documentation entry point for the REST client utils Nuclet (utilities for calling REST services from Nuclos rules).
CONCEPT INTEGRATORS UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X
Releases
| Version | Date | Notes | Compatibility |
|---|
| 1.0.0 | 20.01.2023 | First published version | from Nuclos 4.2022.25.1 |
Overview
This Nuclet supports the use of external REST services in rule code.
Version 1.0
Description of version 1.0.0
| Topic | Description |
|---|
| REST-Protokoll | The BO System > REST-Protokoll logs all requests generated by the Nuclet |
| Use in rules | The class RESTUtils provides several methods for this |
Use in the rule programming of version 1.0.0
| Class RESTUtils |
|
|---|
static RESTContext execute(RESTContext restContext) | Performs a request with the properties specified in restContext . |
| Example GLS shipping order (JSON) |
|
|---|
| RESTContext restContext = new RESTContext(); restContext.setAddress(credentials.getAddress()); restContext.setRequest(getRequest(credentials, bo, referenceLabel)); restContext.setReference("GLS: Post Shipment for " + referenceProtokoll);
restContext.setEncoding(RESTContext.ENCODING_UTF_8); restContext.setContentType(RESTContext.FORMAT_JSON); restContext.setAcceptEncoding("gzip,deflate"); restContext.setAcceptLanguage("de"); restContext.setAccept(RESTContext.FORMAT_JSON); restContext.setAuthorization(RESTContext.Authorization.Basic); restContext.setUser(credentials.getUser()); restContext.setPassword(credentials.getPassword());
context.log("Starte Übermittlung des Lieferscheins an GLS: " + restContext.getUrlWithParameters()); RESTUtils.execute(restContext); RESTShipmentResponseGLS response = null; if (restContext.isError()) { context.log("Fehler beim Übermitteln des GLS Shipment Response: " + restContext.getErrorMessage()); } else { try { response = objectMapper.readValue(restContext.getResponse(), RESTShipmentResponseGLS.class); // ... } catch (JsonProcessingException e) { throw new BusinessException("Fehler beim Auswerten des GLS Shipment Response: " + e.getMessage()); }} |
Example VAT ID check (inline) |
|
| RESTContext result = new RESTContext();
result.setContentType(RESTContext.FORMAT_APPLICATION_X_WWW_FORM_URLENCODED); result.setEncoding(RESTContext.ENCODING_UTF_8); result.setTest(Boolean.FALSE); result.setAddress(pruefungsObjekt.getUrl()); result.addParameter(Parameter.UST_ID_1, pruefungsObjekt.getValue(Parameter.UST_ID_1)); result.addParameter(Parameter.UST_ID_2, pruefungsObjekt.getValue(Parameter.UST_ID_2)); result.addParameter(Parameter.FIRMENNAME, pruefungsObjekt.getValue(Parameter.FIRMENNAME)); result.addParameter(Parameter.ORT, pruefungsObjekt.getValue(Parameter.ORT)); result.addParameter(Parameter.PLZ, pruefungsObjekt.getValue(Parameter.PLZ)); result.addParameter(Parameter.STRASSE, pruefungsObjekt.getValue(Parameter.STRASSE)); result.setReference("Prüfung USt-ID für Prüfling " + pruefungsObjekt.getPruefling());
RESTUtils.execute(restContext); |
Integration of version 1.0.0
The integration after a successful Nuclet import (see Nuclet import) is to be carried out as follows.
| Step | Description | Screenshot |
|---|
| 1 | Run the job once Initialisiere Nuclet REST-Client-Utils (under Administration > Job control) |
|
Related pages
Supporting Nuclets
Back to Supporting Nuclets
Open →
Nuclet Wiki
Nuclet Wiki home
Open →