Skip to content

Commit

Permalink
Add executeOptions to synchronization reaction
Browse files Browse the repository at this point in the history
This is e.g. to enable/disable member recompute for specific
synchronization situations.

A part of MID-5967 implementation.
  • Loading branch information
mederly committed May 29, 2020
1 parent 177114c commit 2918d74
Show file tree
Hide file tree
Showing 25 changed files with 1,226 additions and 586 deletions.
Expand Up @@ -11444,6 +11444,19 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="executeOptions" type="c:ModelExecuteOptionsType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Model execute options that will be used when invoking this reaction.
Options explicitly specified here take precedence over any options derived
from the context or other parameters (like "recompute"). So please use with care.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.2</a:since>
<a:experimental>true</a:experimental>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="condition" type="c:ExpressionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand Down
Expand Up @@ -249,6 +249,10 @@ public static boolean isExecuteImmediatelyAfterApproval(ModelExecuteOptions opti
return is(options, F_EXECUTE_IMMEDIATELY_AFTER_APPROVAL);
}

public Boolean getLimitPropagation() {
return content.isLimitPropagation();
}

public ModelExecuteOptions limitPropagation(Boolean limitPropagation) {
content.setLimitPropagation(limitPropagation);
return this;
Expand Down Expand Up @@ -391,7 +395,7 @@ public ModelExecuteOptionsType toModelExecutionOptionsType() {
}

public static ModelExecuteOptions fromModelExecutionOptionsType(ModelExecuteOptionsType bean) {
return bean != null ? new ModelExecuteOptions(bean) : null;
return bean != null ? new ModelExecuteOptions(bean.clone()) : null;
}

public static ModelExecuteOptions fromRestOptions(List<String> options, PrismContext prismContext) {
Expand Down
Expand Up @@ -2063,6 +2063,10 @@ public boolean extensionOptionIsNotFalse(String localName) {
return BooleanUtils.isNotFalse(getBooleanExtensionOption(localName));
}

public boolean extensionOptionIsTrue(String localName) {
return BooleanUtils.isTrue(getBooleanExtensionOption(localName));
}

public Boolean getBooleanExtensionOption(String localName) {
return getExtensionOptionRealValue(localName, Boolean.class);
}
Expand Down

0 comments on commit 2918d74

Please sign in to comment.