class MultiThreadRunBaseBatch extends RunBaseBatch
{
#define.CurrentVersion(1)
#localmacro.CurrentList
salesTableBuffer
#endmacro
SalesTable salesTableBuffer;
public boolean canGoBatchJournal()
{
return true;
}
protected boolean canRunInNewSession()
{
return true;
}
public boolean runsImpersonated()
{
return true;
}
public container pack()
{
return [#CurrentVersion, #CurrentList];
}
public boolean unpack(container packedClass)
{
Version version = runbase::getVersion(packedClass);
switch (version)
{
case #CurrentVersion:
[version, #CurrentList] = packedClass;
break;
default:
return false;
}
return true;
}
static ClassDescription description()
{
return 'MultiThreading RunBaseBatch FrameWork';
}
server static MultiThreadRunBaseBatch construct()
{
return new MultiThreadRunBaseBatch();
}
static void main(Args args)
{
MultiThreadRunBaseBatch multiThread;
multiThread = MultiThreadRunBaseBatch::construct();
if (multiThread.prompt())
{
multiThread.run();
}
}
public void pramSalesBuffer(SalesTable _sales)
{
salesTableBuffer=_sales;
}
public void run()
{
try
{
DemoBusinessLogic demoBusinessLogic = new DemoBusinessLogic();
demoBusinessLogic.UpdateData(salesTableBuffer);
}
catch
{
info(strFmt("%1",xSession::xppCallStack()));
}
}
}