if (null != bundleTarget.getResourceType().getResourceTypeBundleConfiguration()) {
// Ask the agent to schedule the request. The agent should add history as needed.
try {
BundleScheduleRequest request = bundleManager.getScheduleRequest(subject, resourceDeployment.getId(),
isCleanDeployment, isRevert);
// add the deployment request history (in a new trans)
BundleResourceDeploymentHistory history = new BundleResourceDeploymentHistory(subject.getName(),
AUDIT_ACTION_DEPLOYMENT_REQUESTED, deployment.getName(), null,
BundleResourceDeploymentHistory.Status.SUCCESS, "Requested deployment time: "
+ request.getRequestedDeployTimeAsString(), null);
bundleManager.addBundleResourceDeploymentHistoryInNewTrans(subjectManager.getOverlord(),
resourceDeployment.getId(), history);
BundleScheduleResponse response = bundleAgentService.schedule(request);