FlowTrait
Trait for locking in flow the order and the deal.
Does not allow recursive save cycles.
Typical example:
if ($this->isLockedDeal($dealId))
{
return;
}
try
{
$this->lockDeal($dealId);
// process...
}
finally
{
$this->unlockDeal($dealId);
}