How would I apply a transition to a State Machine field?
Here's what I ended up with. Would be curious if the community has a better solution.

/* @var \Drupal\user\Entity\User $user */
$user = User::load(\Drupal::currentUser());

/* @var \Drupal\state_machine\Plugin\Field\FieldType\StateItemInterface $state */
$state = $user-&gt;get('field_screening_status')-&gt;get(0);

$transitions = $state-&gt;getTransitions();

if (array_key_exists('mark_needs_screening', $transitions)) {
  $user-&gt;set('field_screening_status', 'needs_screening');
  $user-&gt;save();
}


UPDATE: Thanks to @lisastreeter in #commerce on drupal.slack.com

$user = User::load($id);
$state = $user-&gt;get('field_screening_status')-&gt;first();
$transition = $state-&gt;getWorkflow()-&gt;getTransition('mark_needs_screening');

if ($transition) {
  $state-&gt;applyTransition($transition);
}


Not sure if that get(0) change to first() really made the difference, but it works now.