Altova FlowForce Server 2025 Advanced Edition

Standard output is a stream to which output data is written. The stdout function takes a result of type result as its argument and outputs it as type stream. The result is the value produced by some execution step.

 

Leading and trailing whitespace

Note that standard output may contain leading and trailing whitespace that you can trim using the following expression:

 

trim(content(stdout(result)))

 

The content function converts the standard output to a string, and this string is then trimmed by means of the trim function. To see how this expression is implemented in a job, see Check if a Path Exists and the tutorial MapForce Mapping as a Scheduled Job.

 

Signature

stdout(result:result) -> stream

 

Parameters

Name

Type

Description

result

result

The result of a step whose standard output you want to get.

 

Example

For example, you may need to get a directory listing and then save the listing as a TXT file. The broad outline is described below:

 

1.You will first need to create an Execution step and add the /system/shell/commandline function that executes the dir command.

2.Then you will need to assign the result produced by the dir command to a value of type result (e.g., list).

3.Since the /system/create-file function saves stream content to a file, you will need to convert the result produced in the previous step to a stream, using the stdout function:

 

stdout(list)

 

where list is the value returned by the first execution step.

 

For details about the implementation of this scenario, see the List Directory Contents tutorial.

 

Some other sample jobs that feature stdout

See the following examples in which the stdout function is used:

 

Validate an XML Document with Error Logging

Check if a Path Exists

 

© 2018-2024 Altova GmbH