Interface StatusInfo<T>
- All Superinterfaces:
DebugDumpable,Serializable
Information about the status of a smart integration operation executing in the background.
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the message (if available) in the system locale.@Nullable LocalizableMessageReturns an explanatory message about the operation status, if available.default @Nullable QNameReturns the name of the object class that is being processed by this operation, if applicable.default @Nullable String@Nullable ActivityProgressInformationReturns the details about the progress of the activity and potential sub-activities.@Nullable XMLGregorianCalendarWhen the operation was finished.@Nullable XMLGregorianCalendarWhen the operation was started.@Nullable BasicResourceObjectSetTypeReturns the information about what objects (resource, object class, kind, intent) is this request about.Result of the operation (e.g., suggested object types) - if applicable.@Nullable XMLGregorianCalendarWhen the last operation run finished.Status of the operation, typically one of the following: -OperationResultStatus.UNKNOWNif the operation was not started yet or if the status is unknown -OperationResultStatus.IN_PROGRESSif the operation is still running and there is a chance that it will complete -OperationResultStatus.SUCCESS(or warning or handled error) if the operation completed more-or-less successfully -OperationResultStatus.FATAL_ERRORif the operation failed and it is not expected to complete successfully -OperationResultStatus.PARTIAL_ERRORif the operation partially failed Note that, in theory, completed operations may still have a kind of error status.getToken()Identification token of the operation.booleanIs the operation already complete?booleanReturns true if the operation is currently executing.default booleanisHalted()Was the operation started but failed without completing?booleanIs the operation currently suspended?booleanWas the operation already started?Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Method Details
-
getToken
String getToken()Identification token of the operation. -
wasStarted
boolean wasStarted()Was the operation already started? -
isExecuting
boolean isExecuting()Returns true if the operation is currently executing. This means the activity is not completed yet and there is at least one task executing the activity. -
isComplete
boolean isComplete()Is the operation already complete? This generally means that it produced at least partially usable result. If the operation was suspended or failed,isHalted()is true instead. -
isHalted
default boolean isHalted()Was the operation started but failed without completing? (E.g. suspended by admin or failed.) -
isSuspended
boolean isSuspended()Is the operation currently suspended? -
getStatus
OperationResultStatusType getStatus()Status of the operation, typically one of the following: -OperationResultStatus.UNKNOWNif the operation was not started yet or if the status is unknown -OperationResultStatus.IN_PROGRESSif the operation is still running and there is a chance that it will complete -OperationResultStatus.SUCCESS(or warning or handled error) if the operation completed more-or-less successfully -OperationResultStatus.FATAL_ERRORif the operation failed and it is not expected to complete successfully -OperationResultStatus.PARTIAL_ERRORif the operation partially failed Note that, in theory, completed operations may still have a kind of error status. Also, suspended or failed operations still can have a kind of success status. Hence, to learn about the execution status of the operation, it is recommended to usewasStarted(),isExecuting(),isComplete()methods instead of relying on the status. -
getMessage
Returns an explanatory message about the operation status, if available. Should be present for error statuses. -
getLocalizedMessage
Returns the message (if available) in the system locale. -
getProgressInformation
Returns the details about the progress of the activity and potential sub-activities. Most relevant information are: *ActivityProgressInformation.getActivityIdentifier()used to derive the activity display name using properties, like this: ** `Activity.name.shadowsCollection="Shadows collection"` ** `Activity.explanation.shadowsCollection="Collecting correlated shadows"` (Note that activity identifier is `null` for the root activity, i.e. the operation itself.) *ActivityProgressInformation.getDisplayOrder()used to order the activities in the UI. *ActivityProgressInformation.getRealizationState()(or helper methods likeActivityProgressInformation.isInProgress()) to see the state of the activity. *ActivityProgressInformation.getItemsProgress()to see the (numerical) progress of the activity. Alternatively, you can useActivityProgressInformation.toHumanReadableString(boolean)to get a human-readable progress right away. Note that that method deserves internationalization. *ActivityProgressInformation.getChildren()to get the sub-activities of the activity. -
getRequest
Returns the information about what objects (resource, object class, kind, intent) is this request about. Note that "suggest object types" request has obviously no kind and intent; and other (type related) requests might miss the object class name. This may change in the future. -
getRealizationStartTimestamp
When the operation was started. Normally not null, but may be null if there are some issues with scheduling and the task was not started yet.- See Also:
-
getRealizationEndTimestamp
When the operation was finished. Null if the operation is still unfinished. By "finished" we mean "finished with at least some result". So, e.g., if the operation was suspended by admin, or totally failed because of the remote service unavailability, this is still null.- See Also:
-
getRunEndTimestamp
When the last operation run finished. Null if the operation is still running. There will be a value here even if the operation was suspended by admin or failed. NOTE: If some of these activities would be delegated (to a separate task) or distributed (to worker tasks), the timestamp here would be the moment when the activity yielded the control to delegate or to worker tasks. This is currently not the case, as we do not use delegation or distribution in smart integration operations. But it may change in the future. After that, we'd need to introduce something like "when the task stopped executing the activity" timestamp. We don't have it now. -
getResult
T getResult()Result of the operation (e.g., suggested object types) - if applicable. -
getObjectClassName
Returns the name of the object class that is being processed by this operation, if applicable. Currently present on "suggest object types" operations only. -
getObjectClassNameLocalPart
-