AnsweredAssumed Answered

Empty connector shape data when one batch fails

Question asked by cstaikos220972 on Nov 10, 2016
Latest reply on Nov 11, 2016 by cstaikos220972

Hello,

 

I am testing a custom connector, running on a local Atom. Records are processed in batches, and I am getting some strange behavior when one of the batches fails: The "Connection Data" tab becomes empty, but shows "1-19 of 19". 

 

I can see that as the batches are processed, this tab shows records 1-5 as successful (batches are of size 5 currently for testing purposes). Once it reaches the failed batch, however, the records all disappear.

 

This seems like perhaps a bug in the Boomi UI - later failures shouldn't be affecting the display of successful records.

 

Any insight would be appreciated. See below for code and screenshots.

 

Thank you,

 

Code used to set input responses:

InputStream obj = httpResponse.getRawBody();                       
OperationStatus operationStatus = (httpResponse.getStatus() == 200 || httpResponse.getStatus() == 204) ? OperationStatus.SUCCESS : OperationStatus.FAILURE;

// Set all inputs responses to match the batch's response
if (obj != null) {
    for (ObjectData input: inputBatch) {
        response.addResult(input, operationStatus, String.valueOf(httpResponse.getStatus()), httpResponse.getStatusText(), ResponseUtil.toPayload(httpResponse.getRawBody()));
    }
}
else {
    for (ObjectData input: inputBatch) {
        response.addEmptyResult(input, operationStatus, String.valueOf(httpResponse.getStatus()), httpResponse.getStatusText());
    }
}

 

 

Screenshot just prior to empty state, while only the successful batches have been processed:

 

 

 

 

Screenshot of empty state:

Outcomes