This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var sayHi = function (token) { | |
if (!token.progress) token.progress = {}; | |
token.progress.saidHi = (token.progress.saidHi||0) + 1; | |
//true == simply proceed; false == reject workflow | |
return true; | |
}, | |
shakeIt = function (token, next) { | |
token.progress.shook = (token.progress.shook||0) + 1; | |
next('right'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
/** | |
* Function.asyncChain( fn, [...] ) -> Function | |
* | |
* Takes any number of callback functions and returns a scheduler function | |
* which manages the chain. Each supplied callback to should take one | |
* argument, the scheduler, to execute with no arguments when it completes. | |
* | |
* Example: |