lib/definitions/aggregate.js
function (changed, previous, events, command, callback) {
    async.eachSeries(this.getBusinessRules(), function (rule, callback) {
      rule.check(changed, previous, events, command, callback);
    }, callback);
  }
function (changed, previous, events, command, callback) {
    async.eachSeries(this.getBusinessRules(), function (rule, callback) {
      rule.check(changed, previous, events, command, callback);
    }, callback);
  }
function ( changed , previous , events , command , callback ) { async . eachSeries ( this . getBusinessRules ( ) , function ( rule , callback ) { rule . check ( changed , previous , events , command , callback ) ; } , callback ) ; }
Checks business rules.
@param {Object}   changed  The new aggregate values.
@param {Object}   previous The previous aggregate values.
@param {Array}    events   All new generated events.
@param {Object}   command  The command that was handled.
@param {Function} callback The function, that will be called when this action is completed.
`function(err){}`
Checks business rules .