private void notifyListeners(int aMsgType, Object[] entity, ProcessTrace aPTrace, Throwable t) {
// Add Callback Listeners
for (int j = 0; j < statusCbL.size(); j++) {
BaseStatusCallbackListener statCL = (BaseStatusCallbackListener) statusCbL.get(j);
if (statCL != null) {
EntityProcessStatusImpl eps = new EntityProcessStatusImpl(aPTrace);
// eps = new EntityProcessStatusImpl(aPTrace);
if (entity == null) {
if (t != null) {
eps.addEventStatus("Process", "Failed", t);
}
((StatusCallbackListener) statCL).entityProcessComplete(null, eps);
} else {
for (int i = 0; i < entity.length; i++) {
if (t != null) {
eps.addEventStatus("Process", "Failed", t);
}
if (entity[i] != null && entity[i] instanceof CAS) {
((StatusCallbackListener) statCL).entityProcessComplete((CAS) entity[i], eps);
} else {
((StatusCallbackListener) statCL).entityProcessComplete(null, eps);