Class CurrentActivityState<WS extends AbstractActivityWorkStateType>
java.lang.Object
com.evolveum.midpoint.repo.common.activity.run.state.ActivityState
com.evolveum.midpoint.repo.common.activity.run.state.CurrentActivityState<WS>
- Type Parameters:
WS- Work (business) state of the activity.
- All Implemented Interfaces:
DebugDumpable
- Direct Known Subclasses:
VirtualActivityState
Activity state for the current activity run. Provides the full functionality, including creation of the work state
and maintenance of live progress and statistics.
-
Field Summary
Fields inherited from class com.evolveum.midpoint.repo.common.activity.run.state.ActivityState
beansFields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the activity state.@NotNull VirtualActivityState<WS>createOrFindVirtualChildActivityState(@NotNull String childIdentifier) Creates or finds a state for a virtual child activity.protected voiddebugDumpExtra(StringBuilder sb, int indent) @NotNull ActivityPath@NotNull AbstractActivityRun<?,?, WS> @NotNull BucketsReport@NotNull ConnIdOperationsReportprotected @NotNull String@NotNull InternalOperationsReport@NotNull ItemsReport@NotNull ActivityItemProcessingStatistics@NotNull ActivityProgress@NotNull ActivityStatisticsprotected @NotNull TaskgetTask()@NotNull ComplexTypeDefinitionvoidinitialize(OperationResult result) Puts the activity state into operation: 1. finds/creates activity and optionally also work state container values; 2. initializes live structures - currently that means progress and statistics objects.voidinitializeAfterRestart(@NotNull OperationResult result) After purging of activity state on restart inActivityTreePurger, there are some additional steps to do.voidmarkAborted(OperationResultStatus resultStatus, @NotNull ActivityAbortingInformationType abortingInformation, Long endTimestamp) voidmarkComplete(OperationResultStatus resultStatus, Long endTimestamp) voidrecordException(@NotNull Throwable t) voidrecordRealizationStart(long startTimestamp) voidrecordRealizationStart(XMLGregorianCalendar startTimestamp) voidrecordRunEnd(Long endTimestamp) voidrecordRunStart(Long startTimestamp) voidsetMessage(LocalizableMessage message) voidsetMessage(String message) voidvoidsetResultStatus(@NotNull OperationResultStatus status) voidsetRunEndTimestamp(Long value) voidvoidMethods inherited from class com.evolveum.midpoint.repo.common.activity.run.state.ActivityState
addDeleteItemRealValues, debugDump, flushPendingTaskModifications, flushPendingTaskModificationsChecked, getAbortingInformation, getAbortingInformationRequired, getAbortingWorkerRef, getActivityStateDownwards, getActivityStatesUpwardsForParent, getActivityStateUpwards, getBucketProcessingRole, getCounters, getCurrentActivityStateInParentTask, getDisplayOrder, getExecutionAttempt, getParentActivityState, getPropertyRealValue, getRawRunRecordsClone, getRealizationStartTimestamp, getRealizationState, getRestartPolicyActionRequired, getResultStatus, getSimulationResultOid, getSimulationResultRef, getWorkStateItemRealValueClone, getWorkStatePropertyRealValue, getWorkStateReferenceRealValue, getWorkStateReferenceRealValues, incrementCounters, isAborted, isBeingRestarted, isBeingRestartedOrSkipped, isBeingSkipped, isBucketedWorkAborted, isBucketedWorkComplete, isComplete, isDelegating, isScavenger, isSimulationResultCreated, isWorker, setAbortingWorkerRef, setBucketProcessingRole, setDisplayOrder, setItemRealValues, setItemRealValuesCollection, setSimulationResultCreated, setSimulationResultOid, setWorkStateItemRealValues, setWorkStateItemRealValues, toString, updatePoliciesMethods 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
-
CurrentActivityState
-
-
Method Details
-
initialize
Puts the activity state into operation: 1. finds/creates activity and optionally also work state container values; 2. initializes live structures - currently that means progress and statistics objects. This method may or may not be called just before the real run. For example, there can be a need to initialize the state of all child activities before starting their real run.- Throws:
ActivityRunException
-
initializeAfterRestart
public void initializeAfterRestart(@NotNull @NotNull OperationResult result) throws SchemaException, ObjectNotFoundException, ObjectAlreadyExistsException After purging of activity state on restart inActivityTreePurger, there are some additional steps to do. -
close
public void close()Closes the activity state. Currently, this means closing the reports. -
recordRunStart
- Throws:
ActivityRunException
-
recordRunEnd
- Throws:
ActivityRunException
-
recordRealizationStart
- Throws:
ActivityRunException
-
recordRealizationStart
- Throws:
ActivityRunException
-
markAborted
public void markAborted(OperationResultStatus resultStatus, @NotNull @NotNull ActivityAbortingInformationType abortingInformation, Long endTimestamp) throws ActivityRunException - Throws:
ActivityRunException
-
markComplete
public void markComplete(OperationResultStatus resultStatus, Long endTimestamp) throws ActivityRunException - Throws:
ActivityRunException
-
setRealizationState
- Throws:
ActivityRunException
-
setRunEndTimestamp
- Throws:
ActivityRunException
-
setResultStatus
public void setResultStatus(@NotNull @NotNull OperationResultStatus status) throws ActivityRunException - Throws:
ActivityRunException
-
setMessage
- Throws:
ActivityRunException
-
setMessage
- Throws:
ActivityRunException
-
recordException
- Throws:
ActivityRunException
-
getActivityPath
- Specified by:
getActivityPathin classActivityState
-
getActivityRun
-
getItemPath
-
getTask
- Specified by:
getTaskin classActivityState
-
getWorkStateComplexTypeDefinition
- Specified by:
getWorkStateComplexTypeDefinitionin classActivityState
-
createOrFindVirtualChildActivityState
@Experimental @NotNull public @NotNull VirtualActivityState<WS> createOrFindVirtualChildActivityState(@NotNull @NotNull String childIdentifier) Creates or finds a state for a virtual child activity. May flush the task modifications, if the state does not exist yet. EXPERIMENTAL! Do not use in production code. -
getLiveProgress
-
getLiveStatistics
-
getLiveItemProcessingStatistics
-
updateProgressAndStatisticsNoCommit
- Throws:
ActivityRunException
-
updateProgressNoCommit
- Throws:
ActivityRunException
-
getBucketsReport
-
getItemsReport
-
getConnIdOperationsReport
-
getInternalOperationsReport
-
debugDumpExtra
- Specified by:
debugDumpExtrain classActivityState
-
getEnhancedClassName
- Overrides:
getEnhancedClassNamein classActivityState
-