Skip to content

Commit

Permalink
fix fo MID-6009 - ITSM Manual connector shadow conflict
Browse files Browse the repository at this point in the history
(cherry picked from commit e911c7a)
  • Loading branch information
katkav committed Mar 16, 2020
1 parent 63e8481 commit dd7dd75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Expand Up @@ -1457,6 +1457,19 @@ private PrismObject<ShadowType> refreshShadowAsyncStatus(ProvisioningContext ctx
if (operationCompleted && gracePeriod == null) {
LOGGER.trace("Deleting pending operation because it is completed (no grace): {}", pendingOperation);
shadowDelta.addModificationDeleteContainer(ShadowType.F_PENDING_OPERATION, pendingOperation.clone());

ObjectDeltaType pendingDeltaType = pendingOperation.getDelta();
ObjectDelta<ShadowType> pendingDelta = DeltaConvertor.createObjectDelta(pendingDeltaType, prismContext);

if (pendingDelta.isAdd()) {
shadowInception = true;
}

if (pendingDelta.isDelete()) {
shadowInception = false;
shadowManager.addDeadShadowDeltas(repoShadow, refreshAsyncResult, (List)shadowDelta.getModifications());
}

continue;

} else {
Expand Down
Expand Up @@ -348,6 +348,8 @@ private OperationResultStatus translateOutcome(String outcome) {
return null;
} else if (outcome.equals(OperationResultStatusType.SUCCESS.value())) {
return OperationResultStatus.SUCCESS;
} else if (SchemaConstants.MODEL_APPROVAL_OUTCOME_APPROVE.equals(outcome)) {
return OperationResultStatus.SUCCESS;
} else {
return OperationResultStatus.UNKNOWN;
}
Expand Down

0 comments on commit dd7dd75

Please sign in to comment.