return;
}
// add general errors
if (status.getError() != null)
{
ErrorType errorType = ErrorHelper.createError(status.getError());
runtime.getError().add(errorType);
}
Iterator<?> iterator = status.getActivities();
while (iterator.hasNext())
{
Entry<ActivityInstanceName, ActivityProcessingStatus> entry =
(Entry<ActivityInstanceName, ActivityProcessingStatus>) iterator.next();
if (entry.getValue().getStatus() == ActivityStatus.ERROR)
{
ProcessingElementErrorType pe =
mObjectFactory.createProcessingElementErrorType();
// TODO activity name needs to be mapped to processing element
Activity activity = mActivities.get(entry.getKey());
if (activity != null)
{
pe.setType(activity.getActivityName().toString());
}
else
{
// if the activity instance can't be mapped then it was
// inserted automatically by OGSA-DAI
// only Tee is inserted automatically at the moment
pe.setType(UNKNOWN);
}
Throwable exception = entry.getValue().getError();
ErrorType errorType = ErrorHelper.createError(exception);
pe.getError().add(errorType);
runtime.getProcessingElement().add(pe);
}
}
}