Class RuleWorker
- java.lang.Object
-
- com.identityworksllc.iiq.common.threads.SailPointWorker
-
- com.identityworksllc.iiq.common.threads.RuleWorker
-
- All Implemented Interfaces:
Serializable
,Runnable
public class RuleWorker extends SailPointWorker implements Serializable
A worker that runs a rule and returns its result.The Rule object will be loaded by each
RuleWorker
instance (per thread).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
SailPointWorker.ExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Object>
arguments
The arguments to pass to the ruleprotected String
ruleName
The rule name to runprotected sailpoint.object.Rule
ruleObject
The cached rule object (if that constructor is used)-
Fields inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
monitor, MULTI_SERIALIZED_WORKERS_ATTR, outcome
-
-
Constructor Summary
Constructors Constructor Description RuleWorker()
Used by the Serializable interface to begin deserializationRuleWorker(String ruleName, Map<String,Object> arguments)
ConstructorRuleWorker(sailpoint.object.Rule theRule, Map<String,Object> arguments)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
execute(sailpoint.api.SailPointContext threadContext, org.apache.commons.logging.Log logger)
Executes the Rule using the arguments provided and the provided thread context.-
Methods inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
addChild, addDependency, addTaskCallback, checkCancel, getDependencyOutput, getDependentPhase, getExceptionHandler, getMonitor, getParent, getPhase, getWorkerName, isTerminated, isTimedOut, run, runnable, setCompletedCounter, setDependentPhase, setExceptionHandler, setFailedCounter, setMonitor, setParent, setPhase, setTimeout, submitWithListeners, terminate, toCallable, toForkJoinTask, toFutureTask, toRequest, toRequest, toString
-
-
-
-
Constructor Detail
-
RuleWorker
public RuleWorker()
Used by the Serializable interface to begin deserialization
-
RuleWorker
public RuleWorker(String ruleName, Map<String,Object> arguments)
Constructor- Parameters:
ruleName
- The rule namearguments
- The rule arguments
-
RuleWorker
public RuleWorker(sailpoint.object.Rule theRule, Map<String,Object> arguments)
Constructor- Parameters:
theRule
- The rule objectarguments
- The rule arguments
-
-
Method Detail
-
execute
public Object execute(sailpoint.api.SailPointContext threadContext, org.apache.commons.logging.Log logger) throws Exception
Executes the Rule using the arguments provided and the provided thread context.- Specified by:
execute
in classSailPointWorker
- Parameters:
threadContext
- The private context to use for this thread workerlogger
- The log attached to this Worker- Returns:
- The result of the rule execution (usually ignored)
- Throws:
Exception
- if anything goes wrong
-
-