Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Aug 22, 2019
2 parents c19329d + 3b85e62 commit 30ee6ab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Expand Up @@ -11188,7 +11188,7 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="limitPropagation" type="xsd:boolean" minOccurs="0" default="false">
<xsd:element name="limitPropagation" type="xsd:boolean" minOccurs="0" default="false">
<xsd:annotation>
<xsd:documentation>
If set to true, applicable synchronization reactions will propagate changes only form/to source
Expand Down Expand Up @@ -11427,6 +11427,19 @@
<xsd:element name="channel" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="synchronize" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<xsd:element name="reconcile" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<xsd:element name="reconcileAll" type="xsd:boolean" minOccurs="0" default="false">
<xsd:annotation>
<xsd:documentation>
If set to true, applicable synchronization reactions will attempt to reconcile the real attributes
from all resource with the state of the midPoint repository. This may require additional read and
recompute, therefore may be slightly less efficient.

If set to false, attribute values will not be reconciled.

If set to true, the full user reconciliation will be done.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="limitPropagation" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<xsd:element name="objectTemplateRef" type="tns:ObjectReferenceType" minOccurs="0">
<xsd:annotation>
Expand Down
Expand Up @@ -54,6 +54,7 @@
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.Validate;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -781,7 +782,8 @@ private <F extends FocusType> void reactToChange(SynchronizationContext<F> syncC

SynchronizationSituationType newSituation = syncCtx.getSituation();

if (syncCtx.getReaction() == null) {
SynchronizationReactionType reaction = syncCtx.getReaction();
if (reaction == null) {
LOGGER.trace("No reaction is defined for situation {} in {}", syncCtx.getSituation(), syncCtx.getResource());
eventInfo.setNewSituation(newSituation);
return;
Expand All @@ -800,15 +802,18 @@ private <F extends FocusType> void reactToChange(SynchronizationContext<F> syncC
options.setReconcile(doReconciliation);
options.setLimitPropagation(syncCtx.isLimitPropagation());

final boolean willSynchronize = isSynchronize(syncCtx.getReaction());
final boolean willSynchronize = isSynchronize(reaction);
LensContext<F> lensContext = null;

OperationResult parentResult = syncCtx.getResult();
Task task = syncCtx.getTask();
if (willSynchronize) {
lensContext = createLensContext(syncCtx, change, options, parentResult);
lensContext.setDoReconciliationForAllProjections(BooleanUtils.isTrue(reaction.isReconcileAll()));
}



if (LOGGER.isTraceEnabled() && lensContext != null) {
LOGGER.trace("---[ SYNCHRONIZATION context before action execution ]-------------------------\n"
+ "{}\n------------------------------------------", lensContext.debugDump());
Expand Down

0 comments on commit 30ee6ab

Please sign in to comment.