lib/workflow-execution.js
function (config, cb) {

        var o = {}, k;

        for (k in this.baseConfig) {
            if (this.baseConfig.hasOwnProperty(k)) {
                o[k] = this.baseConfig[k];
            }
        }

        for (k in config) {
            if (config.hasOwnProperty(k)) {
                o[k] = config[k];
            }
        }

        if (!o.workflowId) {
            o.workflowId = String(Math.random()).substr(2);
        }

        this.workflowId = o.workflowId;

        this.swfClient.startWorkflowExecution(o, function (err, result) {
            cb(err, result ? result.runId : null);
        });
    }
function (config, cb) {

        var o = {}, k;

        for (k in this.baseConfig) {
            if (this.baseConfig.hasOwnProperty(k)) {
                o[k] = this.baseConfig[k];
            }
        }

        for (k in config) {
            if (config.hasOwnProperty(k)) {
                o[k] = config[k];
            }
        }

        if (!o.workflowId) {
            o.workflowId = String(Math.random()).substr(2);
        }

        this.workflowId = o.workflowId;

        this.swfClient.startWorkflowExecution(o, function (err, result) {
            cb(err, result ? result.runId : null);
        });
    }
function ( config , cb ) { var o = { } , k ; for ( k in this . baseConfig ) { if ( this . baseConfig . hasOwnProperty ( k ) ) { o [ k ] = this . baseConfig [ k ] ; } } for ( k in config ) { if ( config . hasOwnProperty ( k ) ) { o [ k ] = config [ k ] ; } } if ( ! o . workflowId ) { o . workflowId = String ( Math . random ( ) ) . substr ( 2 ) ; } this . workflowId = o . workflowId ; this . swfClient . startWorkflowExecution ( o , function ( err , result ) { cb ( err , result ? result . runId : null ) ; } ) ; }
Start a worfklow
@param {Object} config
@param {Function} cb
Start a worfklow