java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IChainable, INextable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.963Z") @Stability(Deprecated) @Deprecated public class Task extends State implements INextable
Deprecated.
  • replaced by service integration specific classes (i.e. LambdaInvoke, SnsPublish)
(deprecated) Define a Task state in the state machine.

Reaching a Task state causes some work to be executed, represented by the Task's resource property. Task constructs represent a generic Amazon States Language Task.

For some resource types, more specific subclasses of Task may be available which are more convenient to use.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.stepfunctions.*;
 import software.amazon.awscdk.core.*;
 Object parameters;
 IStepFunctionsTask stepFunctionsTask;
 Task task = Task.Builder.create(this, "MyTask")
         .task(stepFunctionsTask)
         // the properties below are optional
         .comment("comment")
         .inputPath("inputPath")
         .outputPath("outputPath")
         .parameters(Map.of(
                 "parametersKey", parameters))
         .resultPath("resultPath")
         .timeout(Duration.minutes(30))
         .build();
 

  • Constructor Details

    • Task

      protected Task(software.amazon.jsii.JsiiObjectRef objRef)
      Deprecated.
    • Task

      protected Task(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      Deprecated.
    • Task

      @Stability(Deprecated) @Deprecated public Task(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TaskProps props)
      Deprecated.
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • addCatch

      @Stability(Deprecated) @Deprecated @NotNull public Task addCatch(@NotNull IChainable handler, @Nullable CatchProps props)
      Deprecated.
      (deprecated) Add a recovery handler for this state.

      When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.

      Parameters:
      handler - This parameter is required.
      props -
    • addCatch

      @Stability(Deprecated) @Deprecated @NotNull public Task addCatch(@NotNull IChainable handler)
      Deprecated.
      (deprecated) Add a recovery handler for this state.

      When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.

      Parameters:
      handler - This parameter is required.
    • addRetry

      @Stability(Deprecated) @Deprecated @NotNull public Task addRetry(@Nullable RetryProps props)
      Deprecated.
      (deprecated) Add retry configuration for this state.

      This controls if and how the execution will be retried if a particular error occurs.

      Parameters:
      props -
    • addRetry

      @Stability(Deprecated) @Deprecated @NotNull public Task addRetry()
      Deprecated.
      (deprecated) Add retry configuration for this state.

      This controls if and how the execution will be retried if a particular error occurs.

    • metric

      @Stability(Deprecated) @Deprecated @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      Deprecated.
      (deprecated) Return the given named metric for this Task.

      Default: sum over 5 minutes

      Parameters:
      metricName - This parameter is required.
      props -
    • metric

      @Stability(Deprecated) @Deprecated @NotNull public Metric metric(@NotNull String metricName)
      Deprecated.
      (deprecated) Return the given named metric for this Task.

      Default: sum over 5 minutes

      Parameters:
      metricName - This parameter is required.
    • metricFailed

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricFailed(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) Metric for the number of times this activity fails.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricFailed

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricFailed()
      Deprecated.
      (deprecated) Metric for the number of times this activity fails.

      Default: sum over 5 minutes

    • metricHeartbeatTimedOut

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricHeartbeatTimedOut(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) Metric for the number of times the heartbeat times out for this activity.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricHeartbeatTimedOut

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricHeartbeatTimedOut()
      Deprecated.
      (deprecated) Metric for the number of times the heartbeat times out for this activity.

      Default: sum over 5 minutes

    • metricRunTime

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricRunTime(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) The interval, in milliseconds, between the time the Task starts and the time it closes.

      Default: average over 5 minutes

      Parameters:
      props -
    • metricRunTime

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricRunTime()
      Deprecated.
      (deprecated) The interval, in milliseconds, between the time the Task starts and the time it closes.

      Default: average over 5 minutes

    • metricScheduled

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricScheduled(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) Metric for the number of times this activity is scheduled.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricScheduled

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricScheduled()
      Deprecated.
      (deprecated) Metric for the number of times this activity is scheduled.

      Default: sum over 5 minutes

    • metricScheduleTime

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricScheduleTime(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) The interval, in milliseconds, for which the activity stays in the schedule state.

      Default: average over 5 minutes

      Parameters:
      props -
    • metricScheduleTime

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricScheduleTime()
      Deprecated.
      (deprecated) The interval, in milliseconds, for which the activity stays in the schedule state.

      Default: average over 5 minutes

    • metricStarted

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricStarted(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) Metric for the number of times this activity is started.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricStarted

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricStarted()
      Deprecated.
      (deprecated) Metric for the number of times this activity is started.

      Default: sum over 5 minutes

    • metricSucceeded

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricSucceeded(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) Metric for the number of times this activity succeeds.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricSucceeded

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricSucceeded()
      Deprecated.
      (deprecated) Metric for the number of times this activity succeeds.

      Default: sum over 5 minutes

    • metricTime

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricTime(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) The interval, in milliseconds, between the time the activity is scheduled and the time it closes.

      Default: average over 5 minutes

      Parameters:
      props -
    • metricTime

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricTime()
      Deprecated.
      (deprecated) The interval, in milliseconds, between the time the activity is scheduled and the time it closes.

      Default: average over 5 minutes

    • metricTimedOut

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricTimedOut(@Nullable MetricOptions props)
      Deprecated.
      (deprecated) Metric for the number of times this activity times out.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricTimedOut

      @Stability(Deprecated) @Deprecated @NotNull public Metric metricTimedOut()
      Deprecated.
      (deprecated) Metric for the number of times this activity times out.

      Default: sum over 5 minutes

    • next

      @Stability(Deprecated) @Deprecated @NotNull public Chain next(@NotNull IChainable next)
      Deprecated.
      (deprecated) Continue normal execution with the given state.

      Specified by:
      next in interface INextable
      Parameters:
      next - This parameter is required.
      Returns:
      The chain of states built up
    • toStateJson

      @Stability(Deprecated) @Deprecated @NotNull public com.fasterxml.jackson.databind.node.ObjectNode toStateJson()
      Deprecated.
      (deprecated) Return the Amazon States Language object for this state.
      Specified by:
      toStateJson in class State
    • whenBoundToGraph

      @Stability(Deprecated) @Deprecated protected void whenBoundToGraph(@NotNull StateGraph graph)
      Deprecated.
      (deprecated) Called whenever this state is bound to a graph.

      Can be overridden by subclasses.

      Overrides:
      whenBoundToGraph in class State
      Parameters:
      graph - This parameter is required.
    • getEndStates

      @Stability(Deprecated) @Deprecated @NotNull public List<INextable> getEndStates()
      Deprecated.
      (deprecated) Continuable states of this Chainable.
      Specified by:
      getEndStates in interface IChainable
      Specified by:
      getEndStates in class State