Источник:
http://alexvoy.blogspot.com/2008/09/...d-pattern.html
==============
just to keep in mind a pattern for Run method recommended by Best Practices for classes
X++:
public void run()
{
#OCCRetryCount
;
try
{
ttsbegin;
this.adjustSetupTime();
ttscommit;
this.prodCostEstimation();
}
catch (Exception::Deadlock)
{
retry;
}
catch (Exception::UpdateConflict)
{
if (appl.ttsLevel() == 0)
{
if (xSession::currentRetryCount() >= #RetryNum)
{
throw Exception::UpdateConflictNotRecovered;
}
else
{
retry;
}
}
else
{
throw Exception::UpdateConflict;
}
}
}
Источник:
http://alexvoy.blogspot.com/2008/09/...d-pattern.html