inPorts
The definition of the input ports of the component. It's an array of objects.
Each component can have zero or more input ports. If a component does not have any input ports, we call it a trigger. Input ports allow a component to be connected to other components. Input ports receive data from output ports of other connected components when the flow is running and the data is available. Each input port has a name
and configuration that has the exact same structure as the configuration of properties
, i.e. it has schema
, inspector
or source
objects. The difference is that the user can use placeholders (variables) in the data fields that will be eventually replaced once the actual data is available. The placeholders (variables) can be entered by the user using the "variables picker" in the Designer UI inspector (see below). Example:
The message
from the example looks like this in the raw form:
As you can see, the placeholders for variables use a special format that the Appmixer engine eventually replaces with real values that come from the GetCurrentWeather component once the data is available.
inPort.schema
Definition of the schema of the data that the input port expects. Please see the Properties Schema section for more details.
inPort.inspector
Definition of the inspector UI for this input port. Please see the Properties Inspector section for more details.
inPort.source
Definition of the source of the variables or dynamic inspector that will be available in the designer UI for this input port.
An example of how the source property can be used to generate the input port Inspector dynamically for the appmixer.google.spreadsheets.CreateRow component. When showing the Inspector for the CreateRow, we need to know the structure (columns) of the Worksheet, the Inspector input fields will copy the columns in the Worksheet
Note how we mapped the configuration properties of the CreateRow
component to the configuration properties of the ListColumns
component that is called internally to retrieve the list of columns. The data.properties
section defined property mappings. To map input port values, you can use the data.messages
section instead. Let's see another example of a component, this time with input message mappings, the trello.list.CreateCard
component inspector definition:
As you can see, the boardId
(referenced to by the "inputs/in/boardId"
syntax) configured by the end-user on the CreateCard
component is mapped into the input port property of the same name of the ListBoards
component ("in/boardId"
).
inPort.variablesPipeline
This object allows you to control what variables will be available to this component in the UI and in the component receive()
method. By default, variables are collected from all the components back in the chain of connected components. This might not be desirable in some cases. One can set scopeDepth
to a number that represents the depth (levels back the graph of connected components) used to collect variables. rawValue
can be used to tell the engine not to resolve variable placeholders to their actual values but to treat variable names as values themselves. Example:
inPort.maxConnections
Set the maximum number of links that can be connected to the input port. Maximum number of connections is infinite by default but in some applications, it might be desirable to set a limit on this, usually 1
. The Appmixer Designer UI will not allow the user to connect more than maxConnections
links to the input port.
Last updated