com.sforce.async.AsyncApiException Java Examples

The following examples show how to use com.sforce.async.AsyncApiException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ForceBulkReader.java    From datacollector with Apache License 2.0 6 votes vote down vote up
private JobInfo createJob(String sobjectType, BulkConnection connection)
    throws AsyncApiException {
  BulkConnection bulkConnection = stage.getBulkConnection();
  ForceInputConfigBean conf = stage.getConfig();

  job = new JobInfo();
  job.setObject(sobjectType);
  job.setOperation((conf.queryAll && !conf.bulkConfig.usePKChunking) ? OperationEnum.queryAll : OperationEnum.query);
  job.setContentType(ContentType.XML);
  if (conf.bulkConfig.usePKChunking) {
    String headerValue = CHUNK_SIZE + "=" + conf.bulkConfig.chunkSize;
    if (!StringUtils.isEmpty(conf.bulkConfig.startId)) {
      headerValue += "; " + START_ROW + "=" + conf.bulkConfig.startId;
    }
    connection.addHeader(SFORCE_ENABLE_PKCHUNKING, headerValue);
  }
  try {
    job = connection.createJob(job);
  } catch (AsyncApiException e) {
    ForceUtils.renewSession(bulkConnection, e);
    job = connection.createJob(job);
  }
  return job;
}
 
Example #2
Source File: SalesforceBulkQueryInputReader.java    From components with Apache License 2.0 6 votes vote down vote up
private boolean retrieveNextResultSet() throws IOException {
    while (bulkRuntime.hasNextResultId()) {
        String resultId = bulkRuntime.nextResultId();
        if (null != resultId) {
            try {
                // Get a new result set
                bulkResultSet = bulkRuntime.getQueryResultSet(resultId);
            } catch (AsyncApiException | ConnectionException e) {
                throw new IOException(e);
            }

            currentRecord = bulkResultSet.next();
            // If currentRecord is null, we need to check if resultId set has more entries.
            if (null != currentRecord) {
                // New result set available to retrieve
                dataCount++;
                return true;
            }
        }
    }
    return false;
}
 
Example #3
Source File: SalesforceBulkExecRuntime.java    From components with Apache License 2.0 6 votes vote down vote up
public void bulkExecute(RuntimeContainer container) {
    TSalesforceBulkExecProperties sprops = (TSalesforceBulkExecProperties) properties;
    try {
        SalesforceBulkRuntime bulkRuntime = new SalesforceBulkRuntime(connect(container).bulkConnection);
        bulkRuntime.setConcurrencyMode(sprops.bulkProperties.concurrencyMode.getValue());
        bulkRuntime.setAwaitTime(sprops.bulkProperties.waitTimeCheckBatchState.getValue());
        // We only support CSV file for bulk output
        bulkRuntime.executeBulk(sprops.module.moduleName.getStringValue(), sprops.outputAction.getValue(), sprops.hardDelete.getValue(),
                sprops.upsertKeyColumn.getStringValue(), "csv", sprops.bulkFilePath.getStringValue(),
                sprops.bulkProperties.bytesToCommit.getValue(), sprops.bulkProperties.rowsToCommit.getValue());
        // count results
        for (int i = 0; i < bulkRuntime.getBatchCount(); i++) {
            for (BulkResult result : bulkRuntime.getBatchLog(i)) {
                dataCount++;
                if ("true".equalsIgnoreCase(String.valueOf(result.getValue("Success")))) {
                    successCount++;
                } else {
                    rejectCount++;
                }
            }
        }
        bulkRuntime.close();
    } catch (IOException | AsyncApiException | ConnectionException e) {
        throw new ComponentException(e);
    }
}
 
Example #4
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 6 votes vote down vote up
protected JobInfo createJob(JobInfo job) throws AsyncApiException, ConnectionException {
    try {
        if (0 != chunkSize) {
            // Enabling PK chunking by setting header and chunk size.
            bulkConnection.addHeader(PK_CHUNKING_HEADER_NAME, CHUNK_SIZE_PROPERTY_NAME + chunkSize);
        }
        return bulkConnection.createJob(job);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return createJob(job);
        }
        throw sfException;
    } finally {
        if (0 != chunkSize) {
            // Need to disable PK chunking after job was created.
            bulkConnection.addHeader(PK_CHUNKING_HEADER_NAME, Boolean.FALSE.toString());
        }
    }
}
 
Example #5
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 6 votes vote down vote up
/**
 * Wait for a job to complete by polling the Bulk API.
 *
 * @throws AsyncApiException
 * @throws ConnectionException
 */
private void awaitCompletion() throws AsyncApiException, ConnectionException {
    long sleepTime = 0L;
    Set<String> incomplete = new HashSet<String>();
    for (BatchInfo bi : batchInfoList) {
        incomplete.add(bi.getId());
    }
    while (!incomplete.isEmpty()) {
        try {
            Thread.sleep(sleepTime);
        } catch (InterruptedException e) {
        }
        sleepTime = awaitTime;
        BatchInfo[] statusList = getBatchInfoList(job.getId()).getBatchInfo();
        for (BatchInfo b : statusList) {
            if (b.getState() == BatchStateEnum.Completed || b.getState() == BatchStateEnum.Failed) {
                incomplete.remove(b.getId());
            }
        }
    }
}
 
Example #6
Source File: ForceBulkWriter.java    From datacollector with Apache License 2.0 6 votes vote down vote up
private JobInfo createJob(String sobjectType, OperationEnum operation, String externalIdField)
    throws AsyncApiException {
  JobInfo job = new JobInfo();
  job.setObject(sobjectType);
  job.setOperation(operation);
  if (externalIdField != null) {
    job.setExternalIdFieldName(externalIdField);
  }
  job.setContentType(ContentType.CSV);
  try {
    job = bulkConnection.createJob(job);
  } catch (AsyncApiException e) {
    ForceUtils.renewSession(bulkConnection, e);
    job = bulkConnection.createJob(job);
  }
  LOG.info("Created Bulk API job {}", job.getId());
  return job;
}
 
Example #7
Source File: SalesforceBulkQueryInputReader.java    From components with Apache License 2.0 5 votes vote down vote up
@Override
public void close() throws IOException {
    try {
        bulkRuntime.closeJob();
    } catch (AsyncApiException | ConnectionException e) {
        throw new IOException(e);
    }
}
 
Example #8
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 5 votes vote down vote up
protected BatchInfoList getBatchInfoList(String jobID) throws AsyncApiException, ConnectionException {
    try {
        return bulkConnection.getBatchInfoList(jobID);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return getBatchInfoList(jobID);
        }
        throw sfException;
    }
}
 
Example #9
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 5 votes vote down vote up
protected InputStream getBatchResultStream(String jobID, String batchID) throws AsyncApiException, ConnectionException {
    try {
        return bulkConnection.getBatchResultStream(jobID, batchID);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return getBatchResultStream(jobID, batchID);
        }
        throw sfException;
    }
}
 
Example #10
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 5 votes vote down vote up
protected JobInfo getJobStatus(String jobID) throws AsyncApiException, ConnectionException {
    try {
        return bulkConnection.getJobStatus(jobID);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return getJobStatus(jobID);
        }
        throw sfException;
    }
}
 
Example #11
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 5 votes vote down vote up
protected BatchInfo getBatchInfo(String jobID, String batchID) throws AsyncApiException, ConnectionException {
    try {
        return bulkConnection.getBatchInfo(jobID, batchID);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return getBatchInfo(jobID, batchID);
        }
        throw sfException;
    }
}
 
Example #12
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 5 votes vote down vote up
protected QueryResultList getQueryResultList(String jobID, String batchID) throws AsyncApiException, ConnectionException {
    try {
        return bulkConnection.getQueryResultList(jobID, batchID);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return getQueryResultList(jobID, batchID);
        }
        throw sfException;
    }
}
 
Example #13
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 5 votes vote down vote up
protected InputStream getQueryResultStream(String jobID, String batchID, String resultID)
        throws AsyncApiException, ConnectionException {
    try {
        return bulkConnection.getQueryResultStream(jobID, batchID, resultID);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return getQueryResultStream(jobID, batchID, resultID);
        }
        throw sfException;
    }
}
 
Example #14
Source File: ForceUtils.java    From datacollector with Apache License 2.0 5 votes vote down vote up
public static BulkConnection getBulkConnection(
    ConnectorConfig partnerConfig,
    ForceConfigBean conf
) throws ConnectionException, AsyncApiException, StageException, URISyntaxException {
  // When PartnerConnection is instantiated, a login is implicitly
  // executed and, if successful,
  // a valid session is stored in the ConnectorConfig instance.
  // Use this key to initialize a BulkConnection:
  ConnectorConfig config = conf.mutualAuth.useMutualAuth
      ? new MutualAuthConnectorConfig(conf.mutualAuth.getUnderlyingConfig().getSslContext())
      : new ConnectorConfig();
  config.setSessionId(partnerConfig.getSessionId());

  // The endpoint for the Bulk API service is the same as for the normal
  // SOAP uri until the /Soap/ part. From here it's '/async/versionNumber'
  String soapEndpoint = partnerConfig.getServiceEndpoint();
  String restEndpoint = soapEndpoint.substring(0, soapEndpoint.indexOf("Soap/"))
      + "async/" + conf.apiVersion;
  config.setRestEndpoint(restEndpoint);
  config.setCompression(conf.useCompression);
  config.setTraceMessage(conf.showTrace);
  config.setSessionRenewer(partnerConfig.getSessionRenewer());

  setProxyConfig(conf, config);

  BulkConnection bulkConnection = new BulkConnection(config);

  if (conf.mutualAuth.useMutualAuth) {
    setupMutualAuthBulk(config, conf.mutualAuth);
  }

  return bulkConnection;
}
 
Example #15
Source File: SalesforceConnectionImpl.java    From teiid-spring-boot with Apache License 2.0 5 votes vote down vote up
@Override
protected TeiidPartnerConnection login(SalesforceConfiguration sfc,
        SalesforceConnectorConfig connectorConfig) throws AsyncApiException, ConnectionException {
    TeiidPartnerConnection partnerConnection = new TeiidPartnerConnection(connectorConfig);

    logger.trace("Login was successful"); //$NON-NLS-1$
    return partnerConnection;
}
 
Example #16
Source File: ForceBulkWriter.java    From datacollector with Apache License 2.0 5 votes vote down vote up
private JobBatches processJob(
    String sObjectName, OperationEnum operation, List<Record> records, String externalIdField
) throws
    StageException {
  try {
    JobInfo job = createJob(sObjectName, operation, externalIdField);
    List<BatchInfo> batchInfoList = createBatchesFromRecordCollection(job, records, operation);
    closeJob(job.getId());
    return new JobBatches(job, batchInfoList, records);
  } catch (AsyncApiException | IOException e) {
    throw new StageException(Errors.FORCE_13,
        ForceUtils.getExceptionCode(e) + ", " + ForceUtils.getExceptionMessage(e)
    );
  }
}
 
Example #17
Source File: SalesforceDataprepSource.java    From components with Apache License 2.0 5 votes vote down vote up
protected BulkConnection connectBulk(ConnectorConfig config) throws ComponentException {
    /*
     * When PartnerConnection is instantiated, a login is implicitly executed and, if successful, a valid session is
     * stored in the ConnectorConfig instance. Use this key to initialize a BulkConnection:
     */
    ConnectorConfig bulkConfig = new ConnectorConfig();
    bulkConfig.setSessionId(config.getSessionId());
    // For session renew
    bulkConfig.setSessionRenewer(config.getSessionRenewer());
    bulkConfig.setUsername(config.getUsername());
    bulkConfig.setPassword(config.getPassword());
    /*
     * The endpoint for the Bulk API service is the same as for the normal SOAP uri until the /Soap/ part. From here
     * it's '/async/versionNumber'
     */
    String soapEndpoint = config.getServiceEndpoint();
    // set it by a default property file

    // Service endpoint should be like this:
    // https://ap1.salesforce.com/services/Soap/u/37.0/00D90000000eSq3
    String apiVersion = soapEndpoint.substring(soapEndpoint.lastIndexOf("/services/Soap/u/") + 17);
    apiVersion = apiVersion.substring(0, apiVersion.indexOf("/"));
    String restEndpoint = soapEndpoint.substring(0, soapEndpoint.indexOf("Soap/")) + "async/" + apiVersion;
    bulkConfig.setRestEndpoint(restEndpoint);
    bulkConfig.setCompression(true);// This should only be false when doing debugging.
    bulkConfig.setTraceMessage(false);
    bulkConfig.setValidateSchema(false);
    try {
        return new BulkConnection(bulkConfig);
    } catch (AsyncApiException e) {
        throw new ComponentException(e);
    }
}
 
Example #18
Source File: SalesforceBulkQueryReader.java    From components with Apache License 2.0 5 votes vote down vote up
protected void executeSalesforceBulkQuery() throws IOException, ConnectionException {
    String queryText = getQueryString();
    LOG.debug("Execute SOQL:" + queryText);
    try {
        bulkRuntime.doBulkQuery(getModuleName(), queryText);
    } catch (AsyncApiException | InterruptedException | ConnectionException e) {
        throw new IOException(e);
    }
}
 
Example #19
Source File: SalesforceBulkQueryReader.java    From components with Apache License 2.0 5 votes vote down vote up
@Override
public void close() throws IOException {
    try {
        bulkRuntime.closeJob();
    } catch (AsyncApiException | ConnectionException e) {
        throw new IOException(e);
    }
}
 
Example #20
Source File: SalesforceBulkExecReader.java    From components with Apache License 2.0 5 votes vote down vote up
@Override
public boolean start() throws IOException {

    TSalesforceBulkExecProperties sprops = (TSalesforceBulkExecProperties) properties;
    bulkRuntime =
            new SalesforceBulkRuntime(((SalesforceSource) getCurrentSource()).connect(container).bulkConnection);
    bulkRuntime.setConcurrencyMode(sprops.bulkProperties.concurrencyMode.getValue());
    bulkRuntime.setAwaitTime(sprops.bulkProperties.waitTimeCheckBatchState.getValue());

    try {
        // We only support CSV file for bulk output
        bulkRuntime
                .executeBulk(sprops.module.moduleName.getStringValue(), sprops.outputAction.getValue(),
                        sprops.hardDelete.getValue(), sprops.upsertKeyColumn.getStringValue(), "csv",
                        sprops.bulkFilePath.getStringValue(), sprops.bulkProperties.bytesToCommit.getValue(),
                        sprops.bulkProperties.rowsToCommit.getValue());
        if (bulkRuntime.getBatchCount() > 0) {
            batchIndex = 0;
            isOutputUpsertKey =
                    SalesforceOutputProperties.OutputAction.UPSERT.equals(sprops.outputAction.getValue())
                            && sprops.outputUpsertKey.getValue();
            if (isOutputUpsertKey) {
                currentBatchResult = bulkRuntime.getBatchLog(0, sprops.upsertKeyColumn.getValue());
            } else {
                currentBatchResult = bulkRuntime.getBatchLog(0);
            }
            resultIndex = 0;
            boolean startable = currentBatchResult.size() > 0;
            if (startable) {
                countData();
            }
            return startable;
        }
        return false;
    } catch (AsyncApiException | ConnectionException e) {
        throw new IOException(e);
    }
}
 
Example #21
Source File: SalesforceBulkExecReader.java    From components with Apache License 2.0 5 votes vote down vote up
@Override
public boolean advance() throws IOException {
    if (++resultIndex >= currentBatchResult.size()) {
        if (++batchIndex >= bulkRuntime.getBatchCount()) {
            return false;
        } else {
            try {
                if (isOutputUpsertKey) {
                    currentBatchResult = bulkRuntime
                            .getBatchLog(batchIndex,
                                    ((TSalesforceBulkExecProperties) properties).upsertKeyColumn.getValue());
                } else {
                    currentBatchResult = bulkRuntime.getBatchLog(batchIndex);
                }
                resultIndex = 0;
                boolean isAdvanced = currentBatchResult.size() > 0;
                if (isAdvanced) {
                    countData();
                }
                return isAdvanced;
            } catch (AsyncApiException | ConnectionException e) {
                throw new IOException(e);
            }
        }
    }
    countData();
    return true;
}
 
Example #22
Source File: SalesforceSourceOrSink.java    From components with Apache License 2.0 5 votes vote down vote up
protected BulkConnection connectBulk(ConnectorConfig config) throws ComponentException {
    final SalesforceConnectionProperties connProps = getConnectionProperties();
    /*
     * When PartnerConnection is instantiated, a login is implicitly executed and, if successful, a valid session id is
     * stored in the ConnectorConfig instance. Use this key to initialize a BulkConnection:
     */
    ConnectorConfig bulkConfig = new ConnectorConfig();
    setProxy(bulkConfig);
    bulkConfig.setSessionId(config.getSessionId());
    // For session renew
    bulkConfig.setSessionRenewer(config.getSessionRenewer());
    bulkConfig.setUsername(config.getUsername());
    bulkConfig.setPassword(config.getPassword());
    /*
     * The endpoint for the Bulk API service is the same as for the normal SOAP uri until the /Soap/ part. From here
     * it's '/async/versionNumber'
     */
    String soapEndpoint = config.getServiceEndpoint();
    // Service endpoint should be like this:
    // https://ap1.salesforce.com/services/Soap/u/37.0/00D90000000eSq3
    String apiVersion = soapEndpoint.substring(soapEndpoint.lastIndexOf("/services/Soap/u/") + 17);
    apiVersion = apiVersion.substring(0, apiVersion.indexOf("/"));
    String restEndpoint = soapEndpoint.substring(0, soapEndpoint.indexOf("Soap/")) + "async/" + apiVersion;
    bulkConfig.setRestEndpoint(restEndpoint);
    // This should only be false when doing debugging.
    bulkConfig.setCompression(connProps.needCompression.getValue());
    bulkConfig.setTraceMessage(connProps.httpTraceMessage.getValue());
    bulkConfig.setValidateSchema(false);
    try {
        return new BulkConnection(bulkConfig);
    } catch (AsyncApiException e) {
        throw new ComponentException(e);
    }
}
 
Example #23
Source File: BulkResultIterator.java    From incubator-gobblin with Apache License 2.0 5 votes vote down vote up
public OpenAndSeekException(String msg, Throwable rootCause) {
  super(msg, rootCause);
  if (rootCause instanceof AsyncApiException &&
      ((AsyncApiException) rootCause).getExceptionCode() == AsyncExceptionCode.ExceededQuota) {
    _isCurrentExceptionExceedQuota = true;
  }
}
 
Example #24
Source File: BulkResultIterator.java    From incubator-gobblin with Apache License 2.0 5 votes vote down vote up
public OpenAndSeekException(String msg, Throwable rootCause, Exception currentException) {
  super(msg, rootCause);
  if (currentException instanceof AsyncApiException &&
      ((AsyncApiException) currentException).getExceptionCode() == AsyncExceptionCode.ExceededQuota) {
    _isCurrentExceptionExceedQuota = true;
  }
}
 
Example #25
Source File: SalesforceBulkRuntime.java    From components with Apache License 2.0 5 votes vote down vote up
protected BatchInfo createBatchFromStream(JobInfo job, InputStream input) throws AsyncApiException, ConnectionException {
    try {
        return bulkConnection.createBatchFromStream(job, input);
    } catch (AsyncApiException sfException) {
        if (AsyncExceptionCode.InvalidSessionId.equals(sfException.getExceptionCode())) {
            SalesforceRuntimeCommon.renewSession(bulkConnection.getConfig());
            return createBatchFromStream(job, input);
        }
        throw sfException;
    }
}
 
Example #26
Source File: ForceBulkWriter.java    From datacollector with Apache License 2.0 5 votes vote down vote up
private void getJobResults(JobBatches jb, List<OnRecordErrorException> errorRecords) throws
    StageException {
  try {
    awaitCompletion(jb);
    checkResults(jb, errorRecords);
  } catch (AsyncApiException | IOException e) {
    throw new StageException(Errors.FORCE_13,
        ForceUtils.getExceptionCode(e) + ", " + ForceUtils.getExceptionMessage(e)
    );
  }
}
 
Example #27
Source File: ForceBulkWriter.java    From datacollector with Apache License 2.0 5 votes vote down vote up
private void createBatch(byte[] bytes, int count, List<BatchInfo> batchInfos, JobInfo jobInfo)
    throws AsyncApiException {
  try {
    createBatchInternal(bytes, count, batchInfos, jobInfo);
  } catch (AsyncApiException e) {
    ForceUtils.renewSession(bulkConnection, e);
    createBatchInternal(bytes, count, batchInfos, jobInfo);
  }
}
 
Example #28
Source File: ForceBulkWriter.java    From datacollector with Apache License 2.0 5 votes vote down vote up
private void createBatchInternal(byte[] bytes, int count, List<BatchInfo> batchInfos, JobInfo jobInfo) throws
    AsyncApiException {
  BatchInfo batchInfo;
  batchInfo = bulkConnection.createBatchFromStream(jobInfo, new ByteArrayInputStream(bytes, 0, count));
  LOG.info("Wrote Bulk API batch: {}", batchInfo);
  batchInfos.add(batchInfo);
}
 
Example #29
Source File: ForceBulkWriter.java    From datacollector with Apache License 2.0 5 votes vote down vote up
private void closeJob(String jobId)
    throws AsyncApiException {
  JobInfo job = new JobInfo();
  job.setId(jobId);
  job.setState(JobStateEnum.Closed);
  try {
    bulkConnection.updateJob(job);
  } catch (AsyncApiException e) {
    ForceUtils.renewSession(bulkConnection, e);
    bulkConnection.updateJob(job);
  }
}
 
Example #30
Source File: ForceBulkWriter.java    From datacollector with Apache License 2.0 5 votes vote down vote up
private void checkResults(
    JobBatches jb, List<OnRecordErrorException> errorRecords
) throws AsyncApiException, IOException {
  Record[] recordArray = jb.records.toArray(new Record[0]);
  int recordIndex = 0;
  for (BatchInfo b : jb.batchInfoList) {
    CSVReader rdr = null;
    try {
      rdr = new CSVReader(bulkConnection.getBatchResultStream(jb.job.getId(), b.getId()));
    } catch (AsyncApiException e) {
      ForceUtils.renewSession(bulkConnection, e);
      rdr = new CSVReader(bulkConnection.getBatchResultStream(jb.job.getId(), b.getId()));
    }
    List<String> resultHeader = rdr.nextRecord();
    int resultCols = resultHeader.size();

    List<String> row;
    while ((row = rdr.nextRecord()) != null) {
      Map<String, String> resultInfo = new HashMap<>();
      for (int i = 0; i < resultCols; i++) {
        resultInfo.put(resultHeader.get(i), row.get(i));
      }
      boolean success = Boolean.parseBoolean(resultInfo.get("Success"));
      String error = resultInfo.get("Error");
      if (!success) {
        Record record = recordArray[recordIndex];
        errorRecords.add(new OnRecordErrorException(
            record,
            Errors.FORCE_11,
            record.getHeader().getSourceId(),
            error
        ));
      }
      recordIndex++;
    }
  }
}