Interface ActivityStateNotification

All Known Subinterfaces:
RemoteGUIManager
All Known Implementing Classes:
AbstractGUIManager, ActivityStateNotificationWrapper, NullGUIManager, RemoteHTMLGUIManager

public interface ActivityStateNotification
This interface is used as a callback for the events when an executed activity terminates, that is has been closed, suspended, reset, failed or signalled. The runtime manager informs the implementing class about the corresponding events. The implementation has to register when the corresponding activity is started (SynchronousActivityStarting.startActivitySynchronously(de.aristaflow.adept2.base.sessionmanagement.SessionToken, EBPInstanceReference, de.aristaflow.adept2.model.globals.ProcessConstants.ExecutionMode, URI[]) or resumed SynchronousActivityStarting.resumeActivitySynchronously(de.aristaflow.adept2.base.sessionmanagement.SessionToken, EBPInstanceReference, URI[])).
Since this interface is a callback-interface, no session tokens are used.
Note that all notifications will be only sent once per activity, that is after the notification, the listener will be deregistered. The only exception are suspended activities that are resumed. There will be a resume notification if the activity is resumed on the very same RuntimeManager. If the activity has been resumed without registering a new listener by using SynchronousActivityStarting.resumeActivitySynchronously(de.aristaflow.adept2.base.sessionmanagement.SessionToken, EBPInstanceReference), the registered listener will retrieve further notifications.
Author:
Ulrich Kreher
See Also:
  • Method Details

    • activityClosed

      void activityClosed(EBPInstanceReference activity, String sessionID)
      Notifies that the designated activity in the designated execution session has been closed.
      Parameters:
      activity - The activity that has been closed.
      sessionID - The ID of the execution session of the closed activity.
    • activitySuspended

      void activitySuspended(EBPInstanceReference activity, String sessionID)
      Notifies that the designated activity in the designated execution session has been suspended normally. There may be an resume and further notifications afterwards.
      Parameters:
      activity - The activity that has been suspended normally.
      sessionID - The ID of the execution session of the suspended activity.
    • activitySuspended

      void activitySuspended(EBPInstanceReference activity, String sessionID, long timeout)
      Notifies that the designated activity in the designated execution session has been suspended and needs to be resumed after the designated timeout. Usually this will be started by a ResumingRuntimeManager and thus there will be a resume and further notifications afterwards.
      Parameters:
      activity - The activity that has been suspended normally.
      sessionID - The ID of the execution session of the suspended activity.
      timeout - The time period (in milliseconds) when the suspended application wants to be resumed automatically.
    • activityResumed

      void activityResumed(EBPInstanceReference activity, String sessionID, URI[] newListener)
      Notifies that the designated activity has been resumed. This will only be sent if the activity is resumed on the very same runtime manager.
      Parameters:
      activity - The activity that has been suspended normally.
      sessionID - The ID of the new execution session of the resumed activity.
      newListener - The URIs of the listener that has been registered when resuming or null in case no listener has been registered when resuming. If a new listener has been registered, this listener will not be notified any more.
      See Also:
    • activityReset

      void activityReset(EBPInstanceReference activity, String sessionID)
      Notifies that the designated activity in the designated execution session has been reset.
      Parameters:
      activity - The activity that has been reset.
      sessionID - The ID of the execution session of the reset activity.
    • activitySignalled

      void activitySignalled(EBPInstanceReference activity, String sessionID, int signal)
      Notifies that the designated activity in the designated execution session has terminated with the designated signal.
      Parameters:
      activity - The activity that has been terminated.
      sessionID - The ID of the execution session of the signalled activity.
      signal - The signal that led to the termination of the activity.
    • activityFailed

      void activityFailed(EBPInstanceReference activity, String sessionID, String errorMessage, String state, long errorCode)
      Notifies that the designated activity in the designated execution session has failed with the designated additional failure information.
      Parameters:
      activity - The activity that has failed.
      sessionID - The ID of the execution session of the failed activity.
      errorMessage - The error message to be interpreted by a user or by a failure handling routine.
      state - Arbitrary state information specific to the instance, comparable to the vendor code in SQLException.
      errorCode - The error code specifying the type of error.