Altova FlowForce Server 2024 Advanced Edition

FlowForce Data Types

Home Prev Top Next

FlowForce operates with the following data types.

 

string

Represents a string value, for example: 'Hello, World!'.

 

number

Represents a numeric value, for example: -1, 0, 56, 0.45565.

 

Boolean

Represents a true or false value.

 

result

This is an abstract type which represents a result produced by an execution step.

 

An execution step may process various executable files which may be MapForce mappings, StyleVision transformation files, shell functions, and others. The result data type, therefore, stands for whatever represents the output of such files.

 

If the execution step runs a MapForce mapping, the output could be an XML, XBRL, text, JSON, and any other file types generated by MapForce.

 

If the execution step runs a StyleVision transformation, the output could be PDF, Word, HTML files, and any other output types generated by StyleVision.

 

To get access to the resulting value, give it some name (for example, "output"), and pass it to the {results} expression function. This will convert it to a stream, which you can further process with stream expression functions (see also Calling Expression Functions ).

 

If the execution step runs a shell command, call specific step result expression functions depending on what exactly you need to output. For example, to return the standard output as a stream, use the expression {stdout(output)}. To return the standard error as a stream, use the expression {stderr(output)}. For more information, see Step Result Functions.

 

results

It may be the case that a MapForce mapping or a StyleVision transformation returns multiple objects. The result produced by such steps has results as data type .

 

To handle such output, use the {results(output)} expression function which returns a list of streams. Then pick a particular stream from the list using the nth function.

 

For example, the job illustrated below was created from a StyleVision transformation file deployed to FlowForce. This job takes as input parameter an XML file and returns multiple outputs in various formats.

fs_results_example

The job has three execution steps.

 

1. The first execution step performs the actual data transformation.

2. The second execution step calls the compute function of FlowForce to get one of the results of this transformation. Namely, the expression as-file(nth(results(output), 0)) gets the first item in the list of streams, as a file. The expression uses "0" and not "1" because the list has a zero-based index.

3. The third execution step copies the HTML file to the c:\archive directory.

 

item

Sometimes, you need to create expressions that assemble or disassemble lists (see List Functions ). A list consists of objects of generic type item. An item has an abstract data type. You can determine the data type of item depending by looking at the type of objects that make up the list (which can be strings, numbers, or even streams). Note that a list can contain only items of the same data type.

 

The image below illustrates a loop where "item" is of numeric type, since the list itself consists of numeric values.

expression_field_foreach

For a step-by-step example that utilizes lists, see Copy Files.

© 2017-2023 Altova GmbH