Skip to content

Commit

Permalink
Merge branch 'access-certification' of https://github.com/Evolveum/mi…
Browse files Browse the repository at this point in the history
…dpoint into access-certification
  • Loading branch information
KaterynaHonchar committed Dec 17, 2015
2 parents 75c09df + cf597a2 commit 86ed5ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Expand Up @@ -162,7 +162,7 @@ private CertDefinitionDto createDefinition() {
AccessCertificationDefinitionType definition = getPrismContext().createObjectable(AccessCertificationDefinitionType.class);
definition.setHandlerUri(AccessCertificationApiConstants.DIRECT_ASSIGNMENT_HANDLER_URI);
AccessCertificationStageDefinitionType stage = new AccessCertificationStageDefinitionType(getPrismContext());
stage.setName("First stage");
stage.setName("Stage 1");
stage.setNumber(1);
stage.setReviewerSpecification(new AccessCertificationReviewerSpecificationType(getPrismContext()));
definition.getStageDefinition().add(stage);
Expand Down
Expand Up @@ -300,9 +300,9 @@ protected AccessCertificationStageType createStage(AccessCertificationCampaignTy

AccessCertificationStageDefinitionType stageDef = CertCampaignTypeUtil.findStageDefinition(campaign, stage.getNumber());
XMLGregorianCalendar end = (XMLGregorianCalendar) stage.getStart().clone();
// if (stageDef.getDays() != null) {
if (stageDef.getDays() != null) {
end.add(XmlTypeConverter.createDuration(true, 0, 0, stageDef.getDays(), 0, 0, 0));
// }
}
end.setHour(23);
end.setMinute(59);
end.setSecond(59);
Expand Down
Expand Up @@ -276,12 +276,13 @@ public void startRemediation(String campaignOid, Task task, OperationResult pare
} else if (!REVIEW_STAGE_DONE.equals(state)) {
result.recordFatalError("Couldn't start the remediation as the last stage was not properly closed.");
} else {
updateHelper.setStageNumberAndState(campaign, lastStageNumber + 1, IN_REMEDIATION, task, result);

if (CertCampaignTypeUtil.isRemediationAutomatic(campaign)) {
remediationTaskHandler.launch(campaign, task, result);
} else {
result.recordWarning("The automated remediation is not configured. The campaign state was set to IN REMEDIATION, but all remediation actions have to be done by hand.");
}
updateHelper.setStageNumberAndState(campaign, lastStageNumber + 1, IN_REMEDIATION, task, result);

campaign = updateHelper.refreshCampaign(campaign, task, result);
eventHelper.onCampaignStageStart(campaign, task, result);
Expand Down

0 comments on commit 86ed5ab

Please sign in to comment.