Hi,
I've made 2 blocks I want to connect to each other this way :

Using your code with those blocks, I have :
var parentBlock = demoWorkspace.newBlock('feature');
parentBlock.initSvg();
parentBlock.render();
var childBlock = demoWorkspace.newBlock('scenario');
childBlock.initSvg();
childBlock.render();
var parentConnection = parentBlock.getInput('scenario').connection;
var childConnection = childBlock.outputConnection;
parentConnection.connect(childConnection);
And it just show me the two component, unconnected
knowing the feature component is like this :

And the scenario is like this :

Is there a way to connect each other by code ? Am I looking for the wrong input ?
Also I tried to know why it can't connect with the function "connection.canConnect()" and "canConnectForReason" from the documentation but it appears that they aren't functions... Is the documentation wrong in some points ?