protected function generateStep($name, $stepConfig, $order = 0) {
		$stepClass = isset($stepConfig['Class']) ? $stepConfig['Class'] : $stepConfig;

		if(empty($stepClass)) {
			throw new Exception(
				sprintf('Missing or empty Class specifier for step "%s"', $name)
			);
		}

		if(!is_subclass_of($stepClass, 'PipelineStep')) {
			throw new Exception(
				sprintf('%s is not a valid "Class" field name for step "%s"', var_export($stepClass, true), $name)
			);
		}

		$step = $stepClass::create();
		$step->Name = $name;
		$step->PipelineID = $this->ID;
		$step->Order = $order;
		$step->Status = 'Queued';
		$step->Config = serialize($stepConfig);
		$step->write();
		return $step;
	}