$transition->
getEntityName(),
$transition->
getEntityId(),
$transition->
getStateFieldName(),
$context,
$repository );
if (empty($transition->
getTransitionName())) { $transitions =
$this->
getAvailableTransitionsById($stateMachine->
getTechnicalName(),
$fromPlace->
getId(),
$context);
$transitionNames =
array_map(fn (StateMachineTransitionEntity
$transition) =>
$transition->
getActionName(),
$transitions);
throw StateMachineException::
illegalStateTransition($fromPlace->
getId(), '',
$transitionNames);
} try { $toPlace =
$this->
getTransitionDestinationById( $stateMachine->
getTechnicalName(),
$fromPlace->
getId(),
$transition->
getTransitionName(),
$context );
} catch (UnnecessaryTransitionException
) { // No transition needed, therefore don't create a history entry and return