function Process(fnExecutor, oProcessInfo) {
		let bRunning = true;
		let bCancelled = false;
		const aCancelListeners = [];
		const oProcessInterface = {
			cancel: function() {
				if (this.isCancelled() || !this.isRunning()) {
					return;
				}

				bCancelled = true;

				for (let i = 0; i < aCancelListeners.length; i++) {
					aCancelListeners[i]();
				}

				log("Process cancelled: " + oProcessInfo.id);
			},
			isCancelled: function() {
				return bCancelled;
			},
			addCancelListener: function(fnCallback) {
				aCancelListeners.push(fnCallback);
			},
			isRunning: function() {
				return bRunning;
			},
			getInfo: function() {
				return oProcessInfo;
			},
			onPromiseCreated: function(oPromise) {}
		};
		let pCancellablePromise;

		log("Process started: " + oProcessInfo.id);

		if (typeof fnExecutor === "function") {
			pCancellablePromise = new Promise(function() {
				fnExecutor.apply(this, Array.prototype.slice.call(arguments).concat(oProcessInterface));
			});
		} else {
			pCancellablePromise = Promise.resolve();
		}

		Object.assign(pCancellablePromise, oProcessInterface);

		pCancellablePromise.then(function() {
			if (oProcessInterface.isCancelled()) {
				log("Process finished due to cancellation: " + oProcessInfo.id);
			} else {
				log("Process finished: " + oProcessInfo.id);
			}
			bRunning = false;
		});

		oProcessInterface.onPromiseCreated(pCancellablePromise);

		return pCancellablePromise;
	}
Constructor for a Process.

@param {Executor} fnExecutor The function to be executed.
@param {ProcessInfo} oProcessInfo The process information.
@returns {Promise} The process promise.
@constructor