Custom Component

When I try to create a custom component with multiple input ports, I get the error message:-

At most 1 input ports can be defined!

The customcomponents.xml has two input ports defined:-

        <inputPorts>
            <singlePort name="0" required="true" />
            <singlePort name="1" required="true" />
        </inputPorts>

Is there anything else that I need to do to configure my component to use multiple ports?

Hello Stephen,

please check implementation of checkConfig() method of your custom component. I guess you find there something like following code:


if (!checkInputPorts(status, 1, 1) || !checkOutputPorts(status, 1, Integer.MAX_VALUE, false)) {
	return status;
}

Please, update parameters of these checks accordingly. For example this code says exactly one input port must be connected and at least one output port must be connected.

Martin