Set the input properties of a block
Set component-level input properties
This paragraph explains how to set input properties for a block of a component that has predefined input variables, thus establishing input mapping.
For components that don't have input variables but require or allow for the definition of input variables at the block level, see the paragraph below.
Info
When the block is the recipient of a connection from another block, the editor tries to perform automatic input mapping the moment the connection is made. If automatic mapping is successful, input properties can then be edited as described here.
You set input properties in the Input tab of the block properties pop-up.
All possible input variables are shown, as in the input manifest. Required variables are marked with an asterisk.
In the reference section of this manual you will find the description of all component-level input variables for every component, with the specification of valid and mutually exclusive combinations.
Each input property consists of the name of the input variable, with the type indicated in square brackets, and a drop-down list to choose the corresponding output key of an upstream block, so to create the mapping.
For some components, a smart mapping assistant is available that can save you from manually set the properties by attempting semi-automatic mapping.
To run the mapping assistant select Map properties automatically on the right in the tabs' strip.
To manually set an input property:
-
Select the drop-down list. A list of upstream blocks appears.
For an input variable of type object, the blocks listed are all those upstream of the current block. If the type is different, they are only the upstream blocks whose output manifest contains keys of the same type as the input variable, for example string.
If there's only one block, the list of its compatible keys is already expanded (see the next step).
-
If not already expanded, expand the block whose output you want to map to the input variable. The list of output keys of that block of the same type as the current input variable appears.
If an input variable is of type object, the name of the block also appears as an output key, to represent the fact that the entire output of the block is like a key of type object.
To filter the list, start typing the name of an output key at the top of it: the list will show only keys with matching names.
-
Choose the desired key. If the input variable is of type object and you choose the name the upstream block, at runtime the input variable will be set with the entire JSON produced by that block.
The name of the key, preceded by the block symbol, appears as the value of the drop-down list.Warning
The output keys are those declared in the output manifest of the upstream block, but, with the exception of the object key corresponding to the entire output of the block, there is no absolute guarantee that at runtime the block will produce that particular key, the mapping is based on the expectation that the upstream block will actually produce that output key.
To unset an input property:
-
Select No mapping from the list.
Or:
-
Select Clear
to the right of the selected key name.
Define input variables and set input properties
Map operator, Simple Reducer and Simple Remapper blocks do not have predefined input variables at the component level, the designer must define them at the block level.
JavaScript Interpreter and Python Interpreter blocks also do not have predefined input variables, but, with the exception of version 1.0.0 of JavaScript Interpreter, which doesn't allow it, the designer is free to create them if he wants to exploit input mapping.
The procedure for managing input variables for those components is similar. You need to work in the Input tab of the block's properties pop-up.
To create an input variable:
-
Select the plus button.
A new line with the field for the variable name on the left and the drop-down list for the mapping on the right is added to the list.
-
Type the name of the variable in the left field.
There is a special case where you can omit the variable name if you are working on a script interpreter, Simple Reducer, or Simple Remapper block, and that is when you will then choose as the output key the entire object produced by an upstream block, which, by definition, has no name. The effect of this choice and the possible alternative choice of naming the variable is described at step 3 of the procedure below.
To edit an input variable, simply edit its name in the left field of the corresponding line.
To set an input property:
-
Select the drop-own list.
-
In the case of a script interpreter, Simple Reducer or Simple Remapper, a tab for every type is shown.
Select the desired type.
Under each tab a list of upstream blocks appears.
For type object, the blocks listed are all those upstream of the current block. For other types they are only the upstream blocks whose output manifest contains keys of that type, for example string. -
In the case of Map, all the blocks upstream of the current block are listed.
If there's only one block, the list of its output keys is already expanded (see the next step).
-
-
If not already expanded, expand the block whose output you want to map to the input variable. The list of suitable output keys appears.
Warning
In the case of a Simple Reducer or Simple Remapper block, be sure to choose a block inside the reference context.
The name of the block also appears as an output key, to represent the fact that the entire output of the block is like a key of type object.
To filter the list, start typing the name of an output key at the top of it: the list will show only keys with matching names.
-
Choose the desired key.
If the input variable is of type object and you choose as the key the name of an upstream block, in the variable name field you will see the message Properties flatted to root and a button on the right of the field with a pencil icon.
This means that at runtime the workflow orchestration service will insert all the output keys of that upstream block into the block's input JSON, without wrapping them in a named object.
If you select the pencil icon, the input variable name field becomes editable again and you can specify a name. In this case, at runtime the workflow orchestration service will insert all the output keys of the upstream block into the block's input JSON wrapped in an object named after the input variable.
To unset an input property:
-
Select No mapping from the list.
Or:
-
Select Clear
to the right of the selected key name.
To delete an input property select Remove in the corresponding line.