createResourceReport.setStatus(CreateResourceStatus.INVALID_ARTIFACT);
createResourceReport.setErrorMessage("Unable to start application '" + deploymentName
+ "' after deploying it, since lookup of the associated ManagedDeployment failed.");
}
if (managedDeployment != null) {
DeploymentState state = managedDeployment.getDeploymentState();
if (state != DeploymentState.STARTED) {
// The app failed to start - do not consider this a FAILURE, since it was at least deployed
// successfully. However, set the status to INVALID_ARTIFACT and set an error message, so
// the user is informed of the condition.
createResourceReport.setStatus(CreateResourceStatus.INVALID_ARTIFACT);