Filesystem Commands and More Wizardry with FlowForce Server Built-in Functions


In our earlier posts on FlowForce Server, we described jobs that execute MapForce Server for data transformations, StyleVision Server for report and document rendering, and RaptorXML Server for XML processing. In each scenario we also used built-in system functions to copy move, or delete files, as is often required in real-world workflows.

95662684_700px

In this post we’ll take a look at more of the built-in functions automatically installed in the FlowForce Server system container. You can use these commands as execution steps to automate the file housekeeping so often required in enterprise production.

Inside the system folder you will find four sub-folders with different sets of specialized functions:

Altova FlowForce Server system containers
Filesystem Functions

The filesystem container includes the copy, move, and delete functions we used in our job examples, plus mkdir and rmdir to create and delete directories.

FlowForce Server filesystem commands

Each function corresponds to a filesystem command, and all parameters required to execute the command are defined in the job.

In our Camera GPS job we created an error path to handle bad input data. We moved input files that failed to a different folder than files that processed successfully. The move job step is shown below, where the file name, destination, and overwrite permission are all defined in the FlowForce Server job itself.

The filesystem move function used in a FlowForce Server job

FTP Functions

The FTP container has functions that correspond to commands defined in the File Transfer Protocol (FTP). This means FlowForce Server can interact with FTP servers to transfer files in either direction. Files can be retrieved to become input for a MapForce Server data mapping, StyleVision Server transformation, or for RaptorXML processing, and output files can be delivered to FTP repositories.

FlowForce Server FTP functions

As with filesystem functions, all required FTP parameters for a successful transfer are defined in the job. When a user selects an FTP function for a new job step, as shown in the retrieve example below, FlowForce Server automatically provides fields for the appropriate parameters.

An FTP function used in a FlowForce Server job

The parameter for the FTP login credential is the login for the remote FTP server, not the FlowForce Server job execution credential. The FTP login credential can be defined locally within the job or stored with other FlowForce Server credentials for shared use.

Mail Functions

The mail send function depends on configuration of a mail server in the FlowForce Server Administration / Settings dialog. Once that step is complete, a FlowForce Server job can send email messages with file attachments.

Users can define alert emails as part of a job error path, or deliver a report created by StyleVision Server to its intended recipients as an email attachment.

FlowForce Server email is outgoing only. FlowForce Server will not react to incoming email. You can either share an email address monitored by a live recipient, or include a Do Not Reply alert in the message title or body.

Sending an email message from a FlowForce Server job

Shell Functions

The shell container creates an extremely powerful “do anything” capability. The commandline function allows you to execute an operating system shell command line, which can be a single command, a batch file, or some other executable file.

This means you have nearly endless possibilities to extend FlowForce Server as a scheduling and automation tool for apps and utilities you already developed in-house, or even for other third-party tools.

A FlowForce Server commandline function

FlowForce Server and the other Altova Server products mentioned above are available for Windows, Linux, and Mac OS platforms. You can click here to download a free trial for any platform!

Tags: , , ,