public function getElementStatus()
{
try {
$status = $this->getWorkflowStateForElement()->getStatus();
//check for null on new objects
if (is_null($status)) {
$status = $this->workflow->getDefaultStatus();
}
return $status;
} catch (\Exception $e) {
throw new \Exception('Cannot get status of element.');
}
}