in src/visual/Visualizer.js [340:423]
get _connectionProcessors() {
return {
declarationToDeclaration: (conn, visDeclaration, links, cellsToAdd) => {
const declarations = this._declarations;
const targetName = conn.to.name;
if (declarations[targetName] &&
_.find(links, link => link.conn === conn) === undefined &&
declarations[targetName].isPortEnabled(conn.to.step.hasInputPort(conn.to), conn.to.name)) {
const isReadOnly = this._readOnly || this._isChildSubWorkflow(visDeclaration.declaration.step) ||
this._isChildSubWorkflow(declarations[targetName].step);
cellsToAdd[cellsToAdd.length] = new VisualLink({
source: {
id: visDeclaration.id,
},
target: {
id: declarations[targetName].id,
},
conn,
}, isReadOnly);
}
},
declarationToPort: (conn, visDeclaration, links, cellsToAdd) => {
const children = this._children;
const targetName = generateChildName(conn.to.step);
if (children[targetName] &&
_.find(links, link => link.conn === conn) === undefined &&
children[targetName].isPortEnabled(conn.to.step.hasInputPort(conn.to), conn.to.name)) {
const isReadOnly = this._readOnly || this._isChildSubWorkflow(visDeclaration.declaration.step) ||
this._isChildSubWorkflow(children[targetName].step);
cellsToAdd[cellsToAdd.length] = new VisualLink({
source: {
id: visDeclaration.id,
},
target: {
id: children[targetName].id,
port: conn.to.name,
},
conn,
}, isReadOnly);
}
},
portToDeclaration: (conn, port, source, links, cellsToAdd) => {
const declarations = this._declarations;
const targetDeclarationName = conn.to.name;
if (declarations[targetDeclarationName] &&
_.find(links, link => link.conn === conn) === undefined &&
declarations[targetDeclarationName].isPortEnabled()) {
const isReadOnly = this._readOnly || this._isChildSubWorkflow(source.step) ||
this._isChildSubWorkflow(declarations[targetDeclarationName].declaration.step);
cellsToAdd[cellsToAdd.length] = new VisualLink({
source: {
id: source.id,
port: port.name,
},
target: {
id: declarations[targetDeclarationName].id,
},
conn,
}, isReadOnly);
}
},
portToPort: (conn, port, source, links, cellsToAdd) => {
const children = this._children;
const targetName = generateChildName(conn.to.step);
if (children[targetName] &&
_.find(links, link => link.conn === conn) === undefined &&
children[targetName].isPortEnabled(conn.to.step.hasInputPort(conn.to), conn.to.name)) {
const isReadOnly = this._readOnly || this._isChildSubWorkflow(source.step) ||
this._isChildSubWorkflow(children[targetName].step);
cellsToAdd[cellsToAdd.length] = new VisualLink({
source: {
id: source.id,
port: port.name,
},
target: {
id: children[targetName].id,
port: conn.to.name,
},
conn,
}, isReadOnly);
}
},
};
}