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, activityStateDefinition, endTimestamp, reportingCharacteristics, startTimestamp, taskRun
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLocalActivityRun(@NotNull ActivityRunInstantiationContext<WD,AH> context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @NotNull ActivityReportingCharacteristicscreateReportingCharacteristics()This method should be called only after the concrete instance is fully initialized.@NotNull OperationResultStatusTypegetCurrentResultStatusBean()protected @Nullable ObjectReferenceTypegetDesiredTaskObjectRef()Returns the value that should be put into task.objectRef.booleanisExcludedFromStalenessChecking()True if the task is excluded from staleness checking while running this activity.protected @NotNull ActivityRunResultrunInternal(OperationResult result)Carries out the actual run of this activity.protected abstract @NotNull ActivityRunResultrunLocally(OperationResult result)booleanshouldUpdateProgressInStateOverview()voidupdateItemProgressInTreeOverviewIfTimePassed(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, autoComputeRunResult, canRun, debugDump, debugDumpExtra, determineActivityStateDefinition, determineActivityStateForCounters, getActivity, getActivityDefinition, getActivityHandler, getActivityLocalPath, getActivityPath, getActivityState, getActivityStateDefinition, getBeans, getDiagName, getEndTimestamp, getExecutionMode, getItemsProcessed, getLocalParentRun, getPersistenceType, getPrismContext, getReportingCharacteristics, getReportingDefinition, getRunningTask, getStartTimestamp, getStartTimestampRequired, getTaskRun, getTreeStateOverview, getWorkDefinition, getWorkStateTypeName, incrementCounters, incrementProgress, isBucketAnalysis, isDryRun, isFullExecution, isNoExecution, isNonScavengingWorker, isPreview, isProgressSupported, isWorker, 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:AbstractActivityRunThis method should be called only after the concrete instance is fully initialized.- Overrides:
createReportingCharacteristicsin 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:AbstractActivityRunCarries out the actual run of this activity.- Specified by:
runInternalin classAbstractActivityRun<WD extends WorkDefinition,AH extends ActivityHandler<WD,AH>,BS extends AbstractActivityWorkStateType>- Throws:
ActivityRunException
-
runLocally
@NotNull protected abstract @NotNull ActivityRunResult runLocally(OperationResult result) throws ActivityRunException, CommonException
- Throws:
ActivityRunExceptionCommonException
-
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.
-
-