Class FailActivity


public final class FailActivity extends ControlActivity
This activity will fail within its own scope and output a custom error message and error code. The error message and code can provided either as a string literal or as an expression that can be evaluated to a string at runtime. The activity scope can be the whole pipeline or a control activity (e.g. foreach, switch, until), if the fail activity is contained in it.
  • Constructor Details

    • FailActivity

      public FailActivity()
  • Method Details

    • withName

      public FailActivity withName(String name)
      Set the name property: Activity name.
      Overrides:
      withName in class ControlActivity
      Parameters:
      name - the name value to set.
      Returns:
      the Activity object itself.
    • withDescription

      public FailActivity withDescription(String description)
      Set the description property: Activity description.
      Overrides:
      withDescription in class ControlActivity
      Parameters:
      description - the description value to set.
      Returns:
      the Activity object itself.
    • withDependsOn

      public FailActivity withDependsOn(List<ActivityDependency> dependsOn)
      Set the dependsOn property: Activity depends on condition.
      Overrides:
      withDependsOn in class ControlActivity
      Parameters:
      dependsOn - the dependsOn value to set.
      Returns:
      the Activity object itself.
    • withUserProperties

      public FailActivity withUserProperties(List<UserProperty> userProperties)
      Set the userProperties property: Activity user properties.
      Overrides:
      withUserProperties in class ControlActivity
      Parameters:
      userProperties - the userProperties value to set.
      Returns:
      the Activity object itself.
    • message

      public Object message()
      Get the message property: The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).
      Returns:
      the message value.
    • withMessage

      public FailActivity withMessage(Object message)
      Set the message property: The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).
      Parameters:
      message - the message value to set.
      Returns:
      the FailActivity object itself.
    • errorCode

      public Object errorCode()
      Get the errorCode property: The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).
      Returns:
      the errorCode value.
    • withErrorCode

      public FailActivity withErrorCode(Object errorCode)
      Set the errorCode property: The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string).
      Parameters:
      errorCode - the errorCode value to set.
      Returns:
      the FailActivity object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class ControlActivity
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.