Interface ManualActivityCompletionClient


public interface ManualActivityCompletionClient
This client is attached to a specific activity execution and let user report completion (successful, failed or confirm cancellation) and perform heartbeats.

May be obtained by calling ActivityExecutionContext.useLocalManualCompletion()

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    complete(Object result)
    Completes the activity execution successfully.
    void
    fail(Throwable failure)
    Completes the activity execution with failure.
    void
    Records heartbeat for an activity
    void
    Confirms successful cancellation to the server.
  • Method Details

    • complete

      void complete(@Nullable Object result)
      Completes the activity execution successfully.
      Parameters:
      result - of the activity execution
    • fail

      void fail(@Nonnull Throwable failure)
      Completes the activity execution with failure.
      Parameters:
      failure - the exception to be used as a failure details object
    • recordHeartbeat

      void recordHeartbeat(@Nullable Object details) throws CanceledFailure
      Records heartbeat for an activity
      Parameters:
      details - to record with the heartbeat
      Throws:
      CanceledFailure
    • reportCancellation

      void reportCancellation(@Nullable Object details)
      Confirms successful cancellation to the server.
      Parameters:
      details - to record with the cancellation