{"action":"opened","issue":{"url":"https://api.github.com/repos/airbug/bugcore/issues/1","labels_url":"https://api.github.com/repos/airbug/bugcore/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/airbug/bugcore/issues/1/comments","events_url":"https://api.github.com/repos/airbug/bugcore/issues/1/events","html_url":"https://github.com/airbug/bugcore/issues/1","id":90572549,"number":1,"title":"Improvements to flows","user":{"login":"brianneisler","id":1471972,"avatar_url":"https://avatars.githubusercontent.com/u/1471972?v=3","gravatar_id":"","url":"https://api.github.com/users/brianneisler","html_url":"https://github.com/brianneisler","followers_url":"https://api.github.com/users/brianneisler/followers","following_url":"https://api.github.com/users/brianneisler/following{/other_user}","gists_url":"https://api.github.com/users/brianneisler/gists{/gist_id}","starred_url":"https://api.github.com/users/brianneisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianneisler/subscriptions","organizations_url":"https://api.github.com/users/brianneisler/orgs","repos_url":"https://api.github.com/users/brianneisler/repos","events_url":"https://api.github.com/users/brianneisler/events{/privacy}","received_events_url":"https://api.github.com/users/brianneisler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/airbug/bugcore/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-24T05:47:34Z","updated_at":"2015-06-24T05:47:34Z","closed_at":null,"body":"integration of promises in to Flows\r\n- flows should be executable as a promise\r\n$parallel([\r\n\r\n]).then(function(a, b) {\r\n\t\r\n})\r\n\r\n- flows should be able to accept methods as arguments (default to Task)\r\n$parallel([\r\n\tfunction(flow) {\r\n\t\tflow.complete()\r\n\t}\r\n]).then(function() {\r\n\t\r\n})\r\n\r\n- tasks should be able to return promises to a flow and the flow should wait on the promise till completing the flow\r\n\r\n$parallel([\r\n\tfunction() {\r\n\t\treturn promise;\r\n\t}\r\n]).then(function(resolvedValue) {\r\n\t\r\n})\r\n\r\n// makes it easy to do things like the following\r\n\r\n$parallel([\r\n\treturnsAPromise,\r\n\treturnsAnotherPromise\r\n]).then(function(a, b) {\r\n\t\r\n})\r\n\r\n\r\n- flows should be able to return a value as a means of completion\r\n\r\n$parallel([\r\n\tfunction() {\r\n\t\treturn 1;\r\n\t}\r\n]).then(function(value) {\r\n\t// value == 1\r\n})\r\n\r\n\r\n- flows should be executable as a callback\r\n$parallel([\r\n\tfunction(flow) {\r\n\t\tflow.complete();\r\n\t},\r\n\tfunction(callback) {\r\n\t\tcallback(); \t// same as flow.complete\r\n\t}\r\n]).then(function() {\r\n\t\r\n})"}}