globe with meridians Language: Deutsch · English

light bulb 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

On this page

Machine-translated – under review

This page was machine-translated from German as a first draft and is currently under review. The authoritative source remains the German original (see the language switch above).

Releases

VersionDateNotesCompatibility
1.0.020.01.2023First published versionfrom 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

TopicDescription
REST-ProtokollThe BO System > REST-Protokoll logs all requests generated by the Nuclet
Use in rulesThe 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("Starting transmission of the delivery note to GLS: " + restContext.getUrlWithParameters());
RESTUtils.execute(restContext);
RESTShipmentResponseGLS response = null;
if (restContext.isError()) {
context.log("Error while transmitting the GLS Shipment Response: " + restContext.getErrorMessage());
} else {
try {
response = objectMapper.readValue(restContext.getResponse(), RESTShipmentResponseGLS.class);
// ...
    } catch (JsonProcessingException e) {
throw new BusinessException("Error while evaluating the 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("VAT ID check for subject " + 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.

StepDescriptionScreenshot
1Run the job once Initialisiere Nuclet REST-Client-Utils (under Administration > Job control)

Related pages

open book Supporting Nuclets


Back to Supporting Nuclets

Open →

open book Nuclet Wiki


Nuclet Wiki home

Open →

  • Keine Stichwörter