0

我在下面有一个简单的图表。它是一个math/Add具有两个数字输入的组件,其输出连接到一个仅打印它接收到的内容的组件。

我是 noflo 的新手,我希望只看到一次startend事件,但我却看到了两次。发生这种情况是因为套接字多次连接和断开连接。

为什么我看到多个start/ end?这是设计使然吗?

'use strict';

var noflo = require('noflo');
var graph = noflo.graph.createGraph('test');

graph.addNode('Add', 'math/Add');
graph.addNode('Capture', 'noflotest/CaptureValue');

graph.addEdge('Add', 'sum', 'Capture', 'in');

graph.addInitial(4, 'Add', 'addend');
graph.addInitial(3, 'Add', 'augend');

noflo.createNetwork(graph, function (network) {
    network.on('start', function (info) {
        console.log('network started', info);
    });
    network.on('end', function (info) {
        console.log('network stopped', info);
    });
});
4

1 回答 1

0

很好的发现,@akonsu。已创建问题:https ://github.com/noflo/noflo/issues/221

于 2014-07-10T05:46:43.757 回答