public function processSetState(Identifier $identifier, $state, $message = null)
{
if ($this->isPersisted($identifier)) {
$this->addHistory($identifier, $state, $message);
$this->updateState($identifier, $state, $message);
return false;
} else {
$this->addHistory($identifier, $state, $message);
$this->insertState($identifier, $state, $message);
return true;
}
}