{"action":"closed","issue":{"url":"https://api.github.com/repos/noflo/noflo/issues/261","repository_url":"https://api.github.com/repos/noflo/noflo","labels_url":"https://api.github.com/repos/noflo/noflo/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/noflo/noflo/issues/261/comments","events_url":"https://api.github.com/repos/noflo/noflo/issues/261/events","html_url":"https://github.com/noflo/noflo/issues/261","id":43207400,"number":261,"title":"noflo.loadFile - How to know that all IIPs have been sent?","user":{"login":"sjaakiejj","id":1705506,"avatar_url":"https://avatars.githubusercontent.com/u/1705506?v=3","gravatar_id":"","url":"https://api.github.com/users/sjaakiejj","html_url":"https://github.com/sjaakiejj","followers_url":"https://api.github.com/users/sjaakiejj/followers","following_url":"https://api.github.com/users/sjaakiejj/following{/other_user}","gists_url":"https://api.github.com/users/sjaakiejj/gists{/gist_id}","starred_url":"https://api.github.com/users/sjaakiejj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjaakiejj/subscriptions","organizations_url":"https://api.github.com/users/sjaakiejj/orgs","repos_url":"https://api.github.com/users/sjaakiejj/repos","events_url":"https://api.github.com/users/sjaakiejj/events{/privacy}","received_events_url":"https://api.github.com/users/sjaakiejj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-09-19T06:06:11Z","updated_at":"2016-02-22T19:15:59Z","closed_at":"2016-02-22T19:15:59Z","body":"I'm currently trying to test some of my noflo graphs, but ran into an issue regarding IIPs. Some of my components take some extra parameters as IIPs, so I specify those as data packets in the JSON graph file. But noflo.loadFile returns before these packets are sent to the components. This is the order of execution that I generated by putting print statements into the noflo methods:\r\n\r\n[TEST] Loading graph file\r\n[NETWORK] Starting Network...\r\n[NETWORK] Network.prototype.sendInitials called\r\n[NETWORK] Network.prototype.sendInitials.send called\r\n[NETWORK] Network Started\r\n...\r\n[NETWORK] Network.prototype.sendInitials processing initials\r\n[NETWORK] Network.prototype.addInitial called\r\n[NETWORK] Expecting 1 initializations\r\n[NETWORK] Network.prototype.addInitial called\r\n[NETWORK] Expecting 2 initializations\r\n[TEST] Graph file returned. 2 initializations pending\r\n...\r\n[NETWORK] Network.prototype.sendInitials processing initials\r\n[NETWORK] Network.prototype.sendInitials processing initials\r\n[NETWORK] Expecting 1 initializations\r\n[NETWORK] Expecting 0 initializations\r\n\r\nSo my question is - how do I know that all the IIPs have been sent to their associated components to ensure the system has completely started?\r\n\r\nRight now I'm using a timeout function, but that's not exactly robust."}}