Источник:
http://alexvoy.blogspot.com/2018/02/...dmf-batch.html
==============
<div dir="ltr" style="text-align: left;" trbidi="on">I do not know why but standard DMF writer does not update its batch task progress. It is really dull to run DMF target step and see 0% progress for long time trying to guess only what ETA is.
Fortunately it is easy to fix. The whole idea is simple: init a server side progress and update it every time the next record is processed.
DMFEntityWriter class
private void wblProgressServerInit(RefRecId _startRecId, RefRecId _endRecId)
{
if(xSession::isCLRSession())
{
// this progress just updates percentage in Batch task form
wblProgressServer = RunbaseProgress::newServerProgress(
1, newGuid(), -
1, DateTimeUtil::minValue());
wblProgressServer.setTotal(_endRecId - _startRecId);
}
}
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
public container
write(DMFDefinitionGroupExecution _definitionGroupExecution,
DMFdefinationGroupName _definitionGroup,
DMFExecutionID _executionId,
DMFEntity _entity,
boolean _onlyErrored,
boolean _onlySelected,
RefRecId _startRefRecId =
0,
RefRecId _endRefRecId =
0,
boolean _isCompare =
false,
DmfStagingBundleId _bundleId =
0)
{
Common target;
...
if (_entity.TargetIsSetBased)
{
...
}
else
{
...
while (nextStartRecId = startRefRecId &&
tmpStagingRecords.RecId