Interface BuildableConditionalResultBuilder


public interface BuildableConditionalResultBuilder
Builder interface for creating and configuring ConditionalResult instances. OptionalConditionalResultBuilder provides a fluent API for setting optional properties of conditional workflow results, allowing for flexible and readable conditional result configuration.

This builder is used when creating conditional results for transitions where different outcomes are possible based on runtime conditions. All methods are optional, allowing developers to configure only the properties they need.

The builder supports chaining method calls for fluent configuration and ensures that all configured properties are properly validated before building the final ConditionalResult instance.

Since:
1.0
See Also:
  • Method Details

    • id

      Sets the ID for this conditional result.
      Parameters:
      id - the result ID
      Returns:
      this builder for method chaining
    • dueAt

      Sets the due date for this conditional result.
      Parameters:
      dueAt - the due date in ISO format
      Returns:
      this builder for method chaining
    • exitStatus

      Sets the exit status for this conditional result.
      Parameters:
      exitStatus - the status when exiting the current state
      Returns:
      this builder for method chaining
    • owners

      Sets the owners for this conditional result.
      Parameters:
      owners - the list of owner identifiers
      Returns:
      this builder for method chaining
    • postFunctions

      BuildableConditionalResultBuilder postFunctions(Iterable<Function> postFunctions)
      Sets the post-functions for this conditional result.
      Parameters:
      postFunctions - the functions to execute after the transition
      Returns:
      this builder for method chaining
    • preFunctions

      Sets the pre-functions for this conditional result.
      Parameters:
      preFunctions - the functions to execute before the transition
      Returns:
      this builder for method chaining
    • validators

      Sets the validators for this conditional result.
      Parameters:
      validators - the validators to check before executing the result
      Returns:
      this builder for method chaining
    • enterStatus

      Sets the enter status for this conditional result.
      Parameters:
      enterStatus - the status when entering the destination state
      Returns:
      this builder for method chaining
    • complete

      BuildableConditionalResultBuilder complete(boolean complete)
      Sets the completion status for this conditional result.
      Parameters:
      complete - true if the result is complete, false otherwise
      Returns:
      this builder for method chaining
    • build

      Builds the ConditionalResult instance with all configured properties.
      Returns:
      a new ConditionalResult instance