code: function doExecCmd(proc, cmd) {
    const { logger, exec, model } = proc;
    let modelUpdated = false;
  
    // Prepare and run before handlers
    handleStackPush(proc);
    logger.onStartExec(proc, cmd);
  
    // Execute command
    if (cmd instanceof TaskCmd) {
      execTask(proc, cmd);
    } else if (cmd instanceof Message) {
      sendMessageToParents(proc, cmd);
    } else if (cmd instanceof ContextCmd) {
      updateContext(proc, cmd);
    } else if (cmd && (is.array(cmd) || is.func(cmd))) {
      fastForEach(cmd, x => exec(x));
    } else if (is.object(cmd)) {
      modelUpdated = updateModel(proc, cmd);
    }
  
    // Emit model update for view re-rendering
    if (modelUpdated) {
      runModelObservers(proc);
    }
  
    // Run after handlers
    logger.onEndExec(proc, cmd);
    handleStackPop(proc);
  }
docs: Actually execute the command. It iis running "before" handler,
  then command itself, then "after" handlers and then emit
  "update" event on the process if model was updated.
  Returns a promise which will be resolved when a command
  will be fully executed (command + all handlers).
  
  @private
  @param  {Object} cmd