getBatchStatusCode
getBatchStatusCode()

The getBatchStatusCode method returns the highest status code from the array of commands executed by the executeBatch method.

Return value

The getBatchStatusCode method returns an integer.

*
*
*
Example

The following code sample gives an example of how to retrieve the BatchStatusCode.

// Top level status code is a short cut to determine if there are any Non-successes in
// the array of Response objects
if(batchResponse.getBatchStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("ExecuteBatch ran perfectly!");
}
else if(batchResponse.getBatchStatusCode() == Response.STATUS_WARNING)
{
System.out.println("ExecuteBatch call processed with at least one warning");
}
else
{
System.out.println("ExecuteBatch call processed with at least one error");
}

// Iterate through the array, and print out the message for any non-successes
for(Response response : batchResponse.getResponses())
{
if(response.getStatusCode()!=Response.STATUS_SUCCESS)
{
printDetailMessageOfWarningOrError("executeBatchCommand",
response.getAdvisoryMessages());
}
}


IBM Unica Interact
 
8.5.0
For more information, see our support and community site: Customer Central