private function setStatusInternal($status)
{
if ($status !== null && !$status instanceof StatusInterface) {
throw new WorkflowException('Status instance expected');
}
$this->_status = $status;
$statusId = $status === null ? null : $status->getId();
if ($this->getStatusConverter() != null) {
$statusId = $this->_statusConverter->toModelAttribute($statusId);
}
$this->owner->{$this->statusAttribute} = $statusId;
}