Interface StatusInfo<T>

All Superinterfaces:
DebugDumpable, Serializable

public interface StatusInfo<T> extends Serializable, DebugDumpable
Information about the status of a smart integration operation executing in the background.
  • 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

      Status of the operation, typically one of the following: - OperationResultStatus.UNKNOWN if the operation was not started yet or if the status is unknown - OperationResultStatus.IN_PROGRESS if 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_ERROR if the operation failed and it is not expected to complete successfully - OperationResultStatus.PARTIAL_ERROR if 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 use wasStarted(), isExecuting(), isComplete() methods instead of relying on the status.
    • getMessage

      @Nullable @Nullable LocalizableMessage getMessage()
      Returns an explanatory message about the operation status, if available. Should be present for error statuses.
    • getLocalizedMessage

      @Nullable @Nullable String getLocalizedMessage()
      Returns the message (if available) in the system locale.
    • getProgressInformation

      @Nullable @Nullable ActivityProgressInformation 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 like ActivityProgressInformation.isInProgress()) to see the state of the activity. * ActivityProgressInformation.getItemsProgress() to see the (numerical) progress of the activity. Alternatively, you can use ActivityProgressInformation.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

      @Nullable @Nullable BasicResourceObjectSetType 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

      @Nullable @Nullable XMLGregorianCalendar 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

      @Nullable @Nullable XMLGregorianCalendar 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

      @Nullable @Nullable XMLGregorianCalendar 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

      @Nullable default @Nullable QName 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

      @Nullable default @Nullable String getObjectClassNameLocalPart()