globe with meridians Language: Deutsch · English

light bulb Nuclet: FTP

Data sheet and documentation entry point for the FTP Nuclet (file transfer via FTP integrated into Nuclos processes).

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.201.09.2019First published versionab Nuclos 4.33.8
1.0.215.03.2021Added SFTP protocolab Nuclos 4.44.2

Overview

The "FTP" Nuclet supports FTP upload to an FTP server as well as FTP download from an FTP server.

Version 1.0.2

Description of version 1.0.2

TopicDescription
FTP ServerUnder System > FTP servers various FTP servers can be defined
FTP redirection

For test operation the redirection can be activated. All uploads are then redirected to a specified server.

FTP logAll files to be uploaded and all uploaded files are stored in the FTP upload log (under System). Storing the uploaded files can be switched off in the Nuclet parameters.
FTP Queue

There are two different options for FTP upload:

Upload immediately

The file is uploaded immediately. If the upload is triggered by a user (e.g. by a state change that triggers an upload), the user must wait until this operation is complete before they can continue working. If an error occurs during the upload, the entire action (e.g. state change) of the user is rolled back.

Upload via queue

The file to be uploaded is first stored in the FTP upload log as a not-yet-uploaded file and is only sent by a regularly running job (Administration > Job control > FTP upload). This must of course be activated. As a result, the user is not held up unnecessarily long during their work, and a faulty upload does not cause their action to be aborted.

Use in rulesThe FTPUtils class provides several methods for this

Use in rule programming of version 1.0.2

Class FTPUtils
static boolean uploadFile(FTPContext context)
Uploads a file to an FTP server
static boolean uploadFileNow(FTPContext context)
Uploads a file immediately to an FTP server, regardless of the settings in the Nuclet parameters
static List<String> listFilesNow(FTPContext context, JobContext jobContext)
Returns a list of all files found
static boolean downloadFileNow(FTPContext context)
Downloads a file immediately from the FTP server, regardless of the settings in the Nuclet parameters
Class FTPContext
void setServer(String name)
Defines the FTP server to be used
void setServer(FTPServer server)
Defines the FTP server to be used
void setFile(NuclosFile file)
Defines the upload file
void setFile(File file)
Defines the upload file
void setReference(String reference)
Defines a reference. This can be e.g. an order number. The reference has no influence on the upload or download, but helps to find files again in the log that belong to a particular order.
void setDeleteAfterDownload(Boolean deleteAfterDownload)
The file is deleted on the FTP server after a successful download
void setDownloadTarget(String downloadTarget)
Target file of the download (must not yet exist)
void setDownloadSource(String downloadSource)
Source file of the download 
FTPServer getServer()
Returns the defined server
NuclosFile getFile()
Returns the file to be uploaded
String getDownloadSource()
Returns the path of the file to be downloaded
String getReference()
Returns the defined reference (business note)
boolean isDeleteAfterDownload()
Returns the setting for deleting the file on the server after the download
Example (upload)

FTPContext context = new FTPContext();
context.setFile(auftrag.getRechnung());
context.setServer(auftrag.getKundeBO().getServerBO());
context.setReference("Order " + auftrag.getAuftragsnr());
boolean success = FTPUpload.uploadFile(context);
if (success) {
MessageContext.sendMessage("The invoice was transmitted successfully.", "FTP Upload");
}
Example (download)

FTPContext ftpContext = new FTPContext();
ftpContext.setServer(server);
List<String> list = FTPUtils.listFilesNow(ftpContext);
context.joblog(list.size() + " files found.");
ftpContext.setDeleteAfterDownload(true);
String path = localTempDir;
File file = null;
for (String filename : list) {
boolean success = false;
ftpContext.setDownloadSource(filename);
ftpContext.setDownloadTarget(path + filename);
try {
file = FTPUtils.downloadFileNow(ftpContext);
success = true;
context.joblog("File " + filename + " downloaded successfully.");
} catch (Exception ex) {
context.joblogError("Error downloading from \"" + filename + "\": " + ex.getMessage());
}
if (success) {
if (file == null) {
context.joblogError("Downloaded file \"" + filename + "\" ist leer ");
} else {
this.processFile(file, context);
}
}
}

Integration

The integration after a successful Nuclet import (see Nuclet import) is to be carried out as follows.

StepDescriptionScreenshot
1

Configure the Nuclet parameters of the FTP Nuclet (under Configuration > Nuclet Management)

NameDescription
Upload files immediatelyFiles are uploaded immediately and not buffered in the FTP queue (Y/N)
FTP redirectionAll uploads are redirected (Y/N)
FTP redirection toTarget of the redirection (name of an FTP server)
Delete uploaded filesDelete successfully uploaded files from the FTP upload log

2Run the job once Initialisiere Nuclet FTP (under Administration > Job control)
3

Configure your FTP servers

ParameterDescription
NameUnique name of the server
ServerServer address
ProtocolType of protocol
LoginUser - login (optional)
PasswordPassword (optional)
DirectoryTarget directory on the server
PortPort of the server
Binary?Binary transmission mode
Active?Server is active / usable

Related pages

open book Modules


All modules

Open →

open book Nuclet Wiki


Nuclet Wiki home

Open →

  • Keine Stichwörter