diff --git a/src/Piece/Flow/PageFlow/PageFlowGenerator.php b/src/Piece/Flow/PageFlow/PageFlowGenerator.php index 8d512d0..8be1ca7 100644 --- a/src/Piece/Flow/PageFlow/PageFlowGenerator.php +++ b/src/Piece/Flow/PageFlow/PageFlowGenerator.php @@ -112,10 +112,6 @@ public function generate() } if (!empty($definition['lastState'])) { - if (in_array($definition['lastState']['name'], array(StateInterface::STATE_INITIAL, StateInterface::STATE_FINAL))) { - throw new ProtectedStateException("The state [ {$definition['lastState']['name']} ] cannot be used in flow definitions."); - } - if (empty($definition['final'])) { $this->fsmBuilder->setEndState($definition['lastState']['name'], PageFlowInterface::EVENT_END); } else {