"Creating workspace \"" + this.d.nameToPrint + "\"...";
this.pr.info(PrCodes.CREATE__INSTANCE_CREATING_PRINT_WAITING_DOTS, msg);
this.pr.flush();
}
final Workspace w;
try {
w = this.singleCreate.create();
} catch (WorkspaceResourceRequestDeniedFault e) {
final String err =
"Resource request denied: " + CommonUtil.faultString(e);
throw new ExecutionProblem(err, e);
} catch (WorkspaceSchedulingFault e) {
final String err =
"Scheduling problem: " + CommonUtil.faultString(e);
throw new ExecutionProblem(err, e);
} catch (WorkspaceMetadataFault e) {
final String err =
"Metadata problem: " + CommonUtil.faultString(e);
throw new ExecutionProblem(err, e);
} catch (WorkspaceContextualizationFault e) {
final String err =
"Context broker related problem: " + CommonUtil.faultString(e);
throw new ExecutionProblem(err, e);
} catch (WorkspaceEnsembleFault e) {
final String err =
"Ensemble related problem: " + CommonUtil.faultString(e);
throw new ExecutionProblem(err, e);
} catch (WorkspaceCreationFault e) {
final String err =
"General: " + CommonUtil.faultString(e);
throw new ExecutionProblem(err, e);
} catch (BaseFaultType e) {
final String err = CommonStrings.faultStringOrCommonCause(e);
throw new ExecutionProblem(err, e);
}
if (this.pr.enabled() && this.pr.useThis()) {
final String msg = " done.";
this.pr.infoln(PrCodes.CREATE__INSTANCE_CREATING_PRINT_WAITING_DOTS, msg);
if (!this.d.printLikeGroup) {
this.pr.infoln(PrCodes.CREATE__INSTANCE_CREATING_PRINT_WAITING_DOTS, "\n");
}
}
if (this.pr.enabled()) {
final String msg = "Workspace created: id " + w.getID();
if (this.pr.useThis()) {
this.pr.infoln(PrCodes.CREATE__EXTRALINES, "");
this.pr.infoln(PrCodes.CREATE__INSTANCE_ID_PRINT, msg);
} else if (this.pr.useLogging()) {
logger.info(msg);
}
}
final Schedule currentSchedule = w.getCurrentSchedule();
if (currentSchedule != null) {
if (currentSchedule.getActualInstantiationTime() == null) {
this.wasBestEffort = true;
}
}
if (this.d.printLikeGroup) {
final String netStr = NetUtils.oneLineNetString(w);
if (netStr != null) {
if (this.pr.useThis()) {
this.pr.infoln(PrCodes.CREATE__GROUP_CREATING_NET_ONELINE,
" - " + netStr);
} else if (this.pr.useLogging()) {
logger.info(netStr);
}
}
} else {
NetUtils.instanceCreateResultNetPrint(this.pr, w);
}
if (this.pr.useThis()) {
this.pr.infoln(PrCodes.CREATE__EXTRALINES, "");
}
ScheduleUtils.instanceCreateResultSchedulePrint(this.pr, w);
if (this.pr.useThis()) {
this.pr.infoln(PrCodes.CREATE__EXTRALINES, "");
}
if (this.d.createEnsemble) {
if (this.pr.enabled()) {
final String msg = "Ensemble created: " + w.getEnsembleID();
if (this.pr.useThis()) {
this.pr.infoln(PrCodes.CREATE__EXTRALINES, "");
this.pr.infoln(PrCodes.CREATE__ENSEMBLE_ID_PRINT,
msg);
} else if (this.pr.useLogging()) {
logger.info(msg);
}
}
}
final String elem =
this.eitherCreate.getSettings().getGeneratedEprElementName();
writeOneWorkspaceEprPossibly(w, this.d.instanceEprPath, elem, this.pr);
writeOneWorkspaceEprAndIpPossibly(w, this.d.args.eprIdDir);
this.writeEnsembleEprPossibly(w.getEnsembleMemberEPR());
return w;
}