Domain/BaseDomain.php
protected function doFlushFinalTransaction(ResourceListInterface $resources, $autoCommit, $hasError): void
    {
        if (!$autoCommit) {
            if ($hasError) {
                $this->cancelTransaction();
                DomainUtil::cancelAllSuccessResources($resources);
            } else {
                $errors = $this->flushTransaction();
                DomainUtil::moveFlushErrorsInResource($resources, $errors);
            }
        }
    }
protected function doFlushFinalTransaction(ResourceListInterface $resources, $autoCommit, $hasError): void
    {
        if (!$autoCommit) {
            if ($hasError) {
                $this->cancelTransaction();
                DomainUtil::cancelAllSuccessResources($resources);
            } else {
                $errors = $this->flushTransaction();
                DomainUtil::moveFlushErrorsInResource($resources, $errors);
            }
        }
    }
protected function doFlushFinalTransaction ( ResourceListInterface $ resources , $ autoCommit , $ hasError ) : void { if ( ! $ autoCommit ) { if ( $ hasError ) { $ this -> cancelTransaction ( ) ; DomainUtil :: cancelAllSuccessResources ( $ resources ) ; } else { $ errors = $ this -> flushTransaction ( ) ; DomainUtil :: moveFlushErrorsInResource ( $ resources , $ errors ) ; } } }
Do flush the final transaction for non auto commit.

@param ResourceListInterface $resources  The list of object resource instance
@param bool                  $autoCommit Commit transaction for each resource or all
(continue the action even if there is an error on a resource)
@param bool                  $hasError   Check if there is an error
Do flush the final transaction for non auto commit .