Skip to content

Commit

Permalink
Adding trigger to each user in grouper resource during reconciliation
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan committed Dec 31, 2020
1 parent d43b6f7 commit 31070f5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,28 +136,6 @@
<ref>ri:member</ref>
<fetchStrategy>explicit</fetchStrategy>
<storageStrategy>indexOnly</storageStrategy>
<inbound id="14">
<expression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xsi:type="c:ScriptExpressionEvaluatorType">
<code>
import com.evolveum.midpoint.xml.ns._public.common.common_3.*
import com.evolveum.prism.xml.ns._public.types_3.*
import static com.evolveum.midpoint.schema.constants.SchemaConstants.*
import com.evolveum.midpoint.schema.util.*
import com.evolveum.midpoint.prism.path.*
import com.evolveum.midpoint.schema.constants.*
import com.evolveum.midpoint.prism.delta.*
TRIGGER_FIRE_AFTER = 180000
TRIGGER_SAFETY_MARGIN = 4000
added = midpoint
.getOptimizingTriggerCreator(TRIGGER_FIRE_AFTER, TRIGGER_SAFETY_MARGIN)
.createForNamedUser(input)
log.info('Recompute trigger for {}: {}', input, added ? 'added' : 'not added (already present or user not found)')
return input
</code>
</script>
</expression>
</inbound>
</attribute>
</objectType>
</schemaHandling>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,26 @@
<ref>ri:uid</ref>
<displayName>UID</displayName>
<inbound>
<expression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xsi:type="c:ScriptExpressionEvaluatorType">
<code>
import com.evolveum.midpoint.xml.ns._public.common.common_3.*
import com.evolveum.prism.xml.ns._public.types_3.*
import static com.evolveum.midpoint.schema.constants.SchemaConstants.*
import com.evolveum.midpoint.schema.util.*
import com.evolveum.midpoint.prism.path.*
import com.evolveum.midpoint.schema.constants.*
import com.evolveum.midpoint.prism.delta.*
TRIGGER_FIRE_AFTER = 180000
TRIGGER_SAFETY_MARGIN = 4000
added = midpoint
.getOptimizingTriggerCreator(TRIGGER_FIRE_AFTER, TRIGGER_SAFETY_MARGIN)
.createForNamedUser(input)
log.info('Recompute trigger for {}: {}', input, added ? 'added' : 'not added (already present or user not found)')
return input
</code>
</script>
</expression>
<target>
<path>name</path>
</target>
Expand Down

0 comments on commit 31070f5

Please sign in to comment.