text: Dolittle.namespace("Dolittle.sagas");
  Dolittle.sagas.sagaNarrator = (function () {
      var baseUrl = "/Dolittle/SagaNarrator";
      // Todo : abstract away into general Service code - look at CommandCoordinator.js for the other copy of this!s
      function post(url, data, completeHandler) {
          $.ajax({
              url: url,
              type: 'POST',
              dataType: 'json',
              data: data,
              contentType: 'application/json; charset=utf-8',
              complete: completeHandler
          });
      }
  
      function isRequestSuccess(jqXHR, commandResult) {
          if (jqXHR.status === 200) {
              if (commandResult.success === true) {
                  return true;
              } else {
                  return false;
              }
          } else {
              return false;
          }
      }
  
      return {
          conclude: function (saga, success, error) {
              var methodParameters = {
                  sagaId: saga.Id
              };
              post(baseUrl + "/Conclude", JSON.stringify(methodParameters), function (jqXHR) {
                  var commandResult = Dolittle.commands.CommandResult.createFrom(jqXHR.responseText);
                  var isSuccess = isRequestSuccess(jqXHR, commandResult);
                  if (isSuccess === true && typeof success === "function") {
                      success(saga);
                  }
                  if (isSuccess === false && typeof error === "function") {
                      error(saga);
                  }
              });
          }
      };
  })();
  