public function setElementStatus($newStatus)
{
try {
$workflowState = $this->getWorkflowStateForElement();
$workflowState->setStatus($newStatus);
$workflowState->save();
} catch (\Exception $e) {
throw new \Exception('Cannot set element status.');
}
}