Class ActivityPolicyRule
java.lang.Object
com.evolveum.midpoint.repo.common.activity.policy.ActivityPolicyRule
- All Implemented Interfaces:
DebugDumpable
A policy rule that is being evaluated in a context of given activity.
- These objects are created when an activity run (
AbstractActivityRun) starts - in
ActivityPolicyRulesCollector.collectRulesAndPreexistingValues(OperationResult) method.
- They are evaluated periodically during the activity run - currently in
ActivityPolicyRulesProcessor.evaluateAndExecuteRules(ItemProcessingResult, OperationResult) method.
How it is related to EvaluatedActivityPolicyRuleImpl:
This class represents the rule as defined in the policy, enriched with data such as current state and counters, and persisted
in ActivityPolicyRulesContext throughout an activity run.
On the other hand, EvaluatedActivityPolicyRuleImpl is a lightweight wrapper used only during a single evaluation cycle.
TODO think of a better name, since this class is responsible for storing activity policy state (counters, data needs, etc.)-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Constructor Summary
ConstructorsConstructorDescriptionActivityPolicyRule(@NotNull PolicyRuleConfigItem policy, @NotNull ActivityPath path, PolicyRuleIdentifier customPolicyRuleIdentifier, @NotNull Set<DataNeed> dataNeeds) -
Method Summary
Modifier and TypeMethodDescriptiondebugDump(int indent) booleanDoes this policy rule need counters to be evaluated?Local count of the rule, i.e., the count that was computed for the current activity only.getName()getOrder()@NotNull ConfigurationItemOrigin@NotNull ActivityPathgetPath()@NotNull PolicyRuleType@NotNull PolicyRuleConfigItem@NotNull PolicyRuleIdentifierCurrent count that should be used for policy threshold evaluation.voidvoidsetCurrentState(ActivityPolicyStateType currentState) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Constructor Details
-
ActivityPolicyRule
public ActivityPolicyRule(@NotNull @NotNull PolicyRuleConfigItem policy, @NotNull @NotNull ActivityPath path, PolicyRuleIdentifier customPolicyRuleIdentifier, @NotNull @NotNull Set<DataNeed> dataNeeds)
-
-
Method Details
-
getPolicyRuleConfigItem
-
getPath
-
getRuleIdentifier
-
getName
-
getOrder
-
getLocalCount
Local count of the rule, i.e., the count that was computed for the current activity only. It is a part ofgetTotalCount().- See Also:
-
getTotalCount
Current count that should be used for policy threshold evaluation. This is the result of policy constraint evaluation. For activity trees, this value is the total count for the activity tree, i.e., it contains the relevant data from all activities that were already finished. -
getCurrentState
-
setCount
-
setCurrentState
-
getPolicyBean
-
getOrigin
-
doesUseCounters
public boolean doesUseCounters()Does this policy rule need counters to be evaluated? Currently not used, we take all counters from the whole tree. -
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable
-
toString
-