public function validate($wId, $source, $initialStatusId, $startStatusIdIndex, $endStatusIdIndex )
	{
		if ($this->validate === true) {
			if (! \in_array($initialStatusId, $startStatusIdIndex)) {
				throw new WorkflowValidationException("Initial status not defined : $initialStatusId");
			}

			// detect not defined statuses

			$missingStatusIdSuspects = \array_diff($endStatusIdIndex, $startStatusIdIndex);
			if (count($missingStatusIdSuspects) != 0) {
				$missingStatusId = [];
				foreach ($missingStatusIdSuspects as $id) {
					list ($thisWid, $thisSid) = $source->parseStatusId($id, $wId);
					if ($thisWid == $wId) {
						$missingStatusId[] = $id; // refering to the same workflow, this Id is not defined
					}
				}
				if (count($missingStatusId) != 0) {
					throw new WorkflowValidationException("One or more end status are not defined : " . VarDumper::dumpAsString($missingStatusId));
				}
			}
		}
	}