Class LocalActivityRun<WD extends WorkDefinition,AH extends ActivityHandler<WD,AH>,BS extends AbstractActivityWorkStateType>
- java.lang.Object
-
- com.evolveum.midpoint.repo.common.activity.run.AbstractActivityRun<WD,AH,BS>
-
- com.evolveum.midpoint.repo.common.activity.run.LocalActivityRun<WD,AH,BS>
-
- All Implemented Interfaces:
ExecutionSupport
,DebugDumpable
- Direct Known Subclasses:
AbstractCompositeActivityRun
,CleanupPartialActivityRun
,IterativeActivityRun
public abstract class LocalActivityRun<WD extends WorkDefinition,AH extends ActivityHandler<WD,AH>,BS extends AbstractActivityWorkStateType> extends AbstractActivityRun<WD,AH,BS>
The "real" run of an activity - i.e. not a delegation nor a distribution. Responsibilities at this level of abstraction: 1. records run start/stop + item progress in the tree state overview, 2. records run start/stop in the item processing statistics (run records), 3. updates progress information (clears uncommitted on start).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.task.api.ExecutionSupport
ExecutionSupport.CountersGroup
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.repo.common.activity.run.AbstractActivityRun
activity, activityState, endTimestamp, startTimestamp, taskRun
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LocalActivityRun(@NotNull ActivityRunInstantiationContext<WD,AH> context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @NotNull ActivityReportingCharacteristics
createReportingCharacteristics()
This method should be called only after the concrete instance is fully initialized.@NotNull OperationResultStatusType
getCurrentResultStatusBean()
protected @Nullable ObjectReferenceType
getDesiredTaskObjectRef()
Returns the value that should be put into task.objectRef.SimulationTransaction
getSimulationTransaction()
@NotNull TaskExecutionMode
getTaskExecutionMode()
boolean
isExcludedFromStalenessChecking()
True if the task is excluded from staleness checking while running this activity.protected @NotNull ActivityRunResult
runInternal(OperationResult result)
Carries out the actual run of this activity.protected abstract @NotNull ActivityRunResult
runLocally(OperationResult result)
boolean
shouldUpdateProgressInStateOverview()
void
updateItemProgressInTreeOverviewIfTimePassed(OperationResult result)
Updates item progress in the tree overview.-
Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.AbstractActivityRun
areActionsExecutedStatisticsSupported, areRunRecordsSupported, areStatisticsSupported, areSynchronizationStatisticsSupported, canRun, debugDump, debugDumpExtra, determineActivityStateDefinition, determineActivityStateForCounters, ensureFullExecution, ensureNoDryRun, ensureNoPreviewNorDryRun, getActivity, getActivityDefinition, getActivityExecutionMode, getActivityHandler, getActivityPath, getActivityState, getActivityStateDefinition, getBeans, getItemsProcessed, getLocalParentRun, getReportingCharacteristics, getRunningTask, getStartTimestampRequired, getTaskRun, getTreeStateOverview, getWorkDefinition, incrementCounters, incrementProgress, isBucketAnalysis, isDryRun, isFullExecution, isNoExecution, isNonScavengingWorker, isProgressSupported, isWorker, onActivityRealizationComplete, onActivityRealizationStart, recordIterativeOperationStart, run, setInstanceReady, shouldCreateWorkStateOnInitialization, standardRunResult, standardRunResult, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Constructor Detail
-
LocalActivityRun
protected LocalActivityRun(@NotNull @NotNull ActivityRunInstantiationContext<WD,AH> context)
-
-
Method Detail
-
createReportingCharacteristics
@NotNull public @NotNull ActivityReportingCharacteristics createReportingCharacteristics()
Description copied from class:AbstractActivityRun
This method should be called only after the concrete instance is fully initialized.- Overrides:
createReportingCharacteristics
in classAbstractActivityRun<WD extends WorkDefinition,AH extends ActivityHandler<WD,AH>,BS extends AbstractActivityWorkStateType>
-
runInternal
@NotNull protected @NotNull ActivityRunResult runInternal(OperationResult result) throws ActivityRunException
Description copied from class:AbstractActivityRun
Carries out the actual run of this activity.- Specified by:
runInternal
in classAbstractActivityRun<WD extends WorkDefinition,AH extends ActivityHandler<WD,AH>,BS extends AbstractActivityWorkStateType>
- Throws:
ActivityRunException
-
getTaskExecutionMode
@NotNull public @NotNull TaskExecutionMode getTaskExecutionMode() throws ConfigurationException
- Throws:
ConfigurationException
-
getSimulationTransaction
public SimulationTransaction getSimulationTransaction()
-
runLocally
@NotNull protected abstract @NotNull ActivityRunResult runLocally(OperationResult result) throws ActivityRunException, CommonException
- Throws:
ActivityRunException
CommonException
-
updateItemProgressInTreeOverviewIfTimePassed
public void updateItemProgressInTreeOverviewIfTimePassed(OperationResult result) throws SchemaException, ObjectNotFoundException
Updates item progress in the tree overview. Assumes that the activity run is still in progress.
-
shouldUpdateProgressInStateOverview
public boolean shouldUpdateProgressInStateOverview()
-
getCurrentResultStatusBean
@NotNull public @NotNull OperationResultStatusType getCurrentResultStatusBean()
-
isExcludedFromStalenessChecking
public boolean isExcludedFromStalenessChecking()
True if the task is excluded from staleness checking while running this activity.
-
getDesiredTaskObjectRef
@Nullable protected @Nullable ObjectReferenceType getDesiredTaskObjectRef()
Returns the value that should be put into task.objectRef. Should be overridden by subclasses. It should be called _after_IterativeActivityRunSpecifics.beforeRun(OperationResult)
method, in order to give the execution a chance to prepare data for this method.
-
-