Class WorkflowRun.Builder

    • Method Detail

      • id

        public WorkflowRun.WorkflowStage id​(@NotNull
                                            java.lang.String id)

        The ID of the workflow run.

        Example: "workflow_run_xKm9pNv3qWsY_jL2tR5Dh"

        The ID of the workflow run.

        Example: "workflow_run_xKm9pNv3qWsY_jL2tR5Dh"

        Specified by:
        id in interface WorkflowRun.IdStage
        Returns:
        Reference to this so that method calls can be chained together.
      • dashboardUrl

        public WorkflowRun.StatusStage dashboardUrl​(@NotNull
                                                    java.lang.String dashboardUrl)

        A URL to view this workflow run in the Extend dashboard.

        Example: "https://dashboard.extend.ai/workflows/workflow_run_xKm9pNv3qWsY_jL2tR5Dh"

        A URL to view this workflow run in the Extend dashboard.

        Example: "https://dashboard.extend.ai/workflows/workflow_run_xKm9pNv3qWsY_jL2tR5Dh"

        Specified by:
        dashboardUrl in interface WorkflowRun.DashboardUrlStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reviewed

        public WorkflowRun._FinalStage reviewed​(boolean reviewed)

        Whether the workflow run has been reviewed.

        Whether the workflow run has been reviewed.

        Specified by:
        reviewed in interface WorkflowRun.ReviewedStage
        Returns:
        Reference to this so that method calls can be chained together.
      • usage

        public WorkflowRun._FinalStage usage​(Nullable<RunUsage> usage)

        Usage credits consumed by this workflow run, including a breakdown of every contributing child run.

        Availability: Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.

        Specified by:
        usage in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • usage

        public WorkflowRun._FinalStage usage​(RunUsage usage)

        Usage credits consumed by this workflow run, including a breakdown of every contributing child run.

        Availability: Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.

        Specified by:
        usage in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • usage

        public WorkflowRun._FinalStage usage​(java.util.Optional<RunUsage> usage)

        Usage credits consumed by this workflow run, including a breakdown of every contributing child run.

        Availability: Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.

        Specified by:
        usage in interface WorkflowRun._FinalStage
      • addAllStepRuns

        public WorkflowRun._FinalStage addAllStepRuns​(java.util.List<StepRun> stepRuns)

        An array of WorkflowStepRun objects. Each WorkflowStepRun represents a single run of a WorkflowStep and contains details about the step's execution and result.

        Specified by:
        addAllStepRuns in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • addStepRuns

        public WorkflowRun._FinalStage addStepRuns​(StepRun stepRuns)

        An array of WorkflowStepRun objects. Each WorkflowStepRun represents a single run of a WorkflowStep and contains details about the step's execution and result.

        Specified by:
        addStepRuns in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • stepRuns

        public WorkflowRun._FinalStage stepRuns​(java.util.List<StepRun> stepRuns)

        An array of WorkflowStepRun objects. Each WorkflowStepRun represents a single run of a WorkflowStep and contains details about the step's execution and result.

        Specified by:
        stepRuns in interface WorkflowRun._FinalStage
      • endTime

        public WorkflowRun._FinalStage endTime​(Nullable<java.time.OffsetDateTime> endTime)

        The time (in UTC) that the workflow finished executing. Will follow the RFC 3339 format. Will be null if the workflow run has not finished executing.

        Example: "2024-03-21T15:35:00Z"

        Specified by:
        endTime in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • endTime

        public WorkflowRun._FinalStage endTime​(java.time.OffsetDateTime endTime)

        The time (in UTC) that the workflow finished executing. Will follow the RFC 3339 format. Will be null if the workflow run has not finished executing.

        Example: "2024-03-21T15:35:00Z"

        Specified by:
        endTime in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • endTime

        public WorkflowRun._FinalStage endTime​(java.util.Optional<java.time.OffsetDateTime> endTime)

        The time (in UTC) that the workflow finished executing. Will follow the RFC 3339 format. Will be null if the workflow run has not finished executing.

        Example: "2024-03-21T15:35:00Z"

        Specified by:
        endTime in interface WorkflowRun._FinalStage
      • startTime

        public WorkflowRun._FinalStage startTime​(Nullable<java.time.OffsetDateTime> startTime)

        The time (in UTC) at which the workflow run started executing. This will always be after the initialRunAt time. Will follow the RFC 3339 format. Will be null if the workflow run has not started executing.

        Example: "2024-03-21T15:30:00Z"

        Specified by:
        startTime in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • startTime

        public WorkflowRun._FinalStage startTime​(java.time.OffsetDateTime startTime)

        The time (in UTC) at which the workflow run started executing. This will always be after the initialRunAt time. Will follow the RFC 3339 format. Will be null if the workflow run has not started executing.

        Example: "2024-03-21T15:30:00Z"

        Specified by:
        startTime in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • startTime

        public WorkflowRun._FinalStage startTime​(java.util.Optional<java.time.OffsetDateTime> startTime)

        The time (in UTC) at which the workflow run started executing. This will always be after the initialRunAt time. Will follow the RFC 3339 format. Will be null if the workflow run has not started executing.

        Example: "2024-03-21T15:30:00Z"

        Specified by:
        startTime in interface WorkflowRun._FinalStage
      • reviewedAt

        public WorkflowRun._FinalStage reviewedAt​(Nullable<java.time.OffsetDateTime> reviewedAt)

        The time (in UTC) at which the workflow run was reviewed. Will follow the RFC 3339 format. Will be null if the workflow run has not been reviewed.

        Example: "2024-03-21T16:45:00Z"

        Specified by:
        reviewedAt in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reviewedAt

        public WorkflowRun._FinalStage reviewedAt​(java.time.OffsetDateTime reviewedAt)

        The time (in UTC) at which the workflow run was reviewed. Will follow the RFC 3339 format. Will be null if the workflow run has not been reviewed.

        Example: "2024-03-21T16:45:00Z"

        Specified by:
        reviewedAt in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reviewedAt

        public WorkflowRun._FinalStage reviewedAt​(java.util.Optional<java.time.OffsetDateTime> reviewedAt)

        The time (in UTC) at which the workflow run was reviewed. Will follow the RFC 3339 format. Will be null if the workflow run has not been reviewed.

        Example: "2024-03-21T16:45:00Z"

        Specified by:
        reviewedAt in interface WorkflowRun._FinalStage
      • rejectionNote

        public WorkflowRun._FinalStage rejectionNote​(java.lang.String rejectionNote)

        A note that is added if a workflow run is rejected.

        Example: "Invalid invoice format"

        Specified by:
        rejectionNote in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reviewedByUser

        public WorkflowRun._FinalStage reviewedByUser​(Nullable<java.lang.String> reviewedByUser)

        The email address of the person who reviewed the workflow run. Will be null if the workflow run has not been reviewed.

        Example: "jane.doe@example.com"

        Specified by:
        reviewedByUser in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reviewedByUser

        public WorkflowRun._FinalStage reviewedByUser​(java.lang.String reviewedByUser)

        The email address of the person who reviewed the workflow run. Will be null if the workflow run has not been reviewed.

        Example: "jane.doe@example.com"

        Specified by:
        reviewedByUser in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reviewedByUser

        public WorkflowRun._FinalStage reviewedByUser​(java.util.Optional<java.lang.String> reviewedByUser)

        The email address of the person who reviewed the workflow run. Will be null if the workflow run has not been reviewed.

        Example: "jane.doe@example.com"

        Specified by:
        reviewedByUser in interface WorkflowRun._FinalStage
      • initialRunAt

        public WorkflowRun._FinalStage initialRunAt​(Nullable<java.time.OffsetDateTime> initialRunAt)

        The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format. Will be null if the run hasn't started yet.

        Example: "2025-04-28T17:01:39.285Z"

        Specified by:
        initialRunAt in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • initialRunAt

        public WorkflowRun._FinalStage initialRunAt​(java.time.OffsetDateTime initialRunAt)

        The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format. Will be null if the run hasn't started yet.

        Example: "2025-04-28T17:01:39.285Z"

        Specified by:
        initialRunAt in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • initialRunAt

        public WorkflowRun._FinalStage initialRunAt​(java.util.Optional<java.time.OffsetDateTime> initialRunAt)

        The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format. Will be null if the run hasn't started yet.

        Example: "2025-04-28T17:01:39.285Z"

        Specified by:
        initialRunAt in interface WorkflowRun._FinalStage
      • failureMessage

        public WorkflowRun._FinalStage failureMessage​(Nullable<java.lang.String> failureMessage)

        A more detailed message about the failure. Will only be included if the workflow run status is "FAILED".

        Specified by:
        failureMessage in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • failureMessage

        public WorkflowRun._FinalStage failureMessage​(java.lang.String failureMessage)

        A more detailed message about the failure. Will only be included if the workflow run status is "FAILED".

        Specified by:
        failureMessage in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • failureReason

        public WorkflowRun._FinalStage failureReason​(Nullable<java.lang.String> failureReason)

        The reason why the workflow run failed. Will only be included if the workflow run status is "FAILED".

        Specified by:
        failureReason in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • failureReason

        public WorkflowRun._FinalStage failureReason​(java.lang.String failureReason)

        The reason why the workflow run failed. Will only be included if the workflow run status is "FAILED".

        Specified by:
        failureReason in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • batchId

        public WorkflowRun._FinalStage batchId​(Nullable<java.lang.String> batchId)

        The batch ID of the WorkflowRun. If this WorkflowRun was created as part of a batch of files, all runs in that batch will have the same batch ID.

        Example: "batch_7Ws31-F5"

        Specified by:
        batchId in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • batchId

        public WorkflowRun._FinalStage batchId​(java.lang.String batchId)

        The batch ID of the WorkflowRun. If this WorkflowRun was created as part of a batch of files, all runs in that batch will have the same batch ID.

        Example: "batch_7Ws31-F5"

        Specified by:
        batchId in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • batchId

        public WorkflowRun._FinalStage batchId​(java.util.Optional<java.lang.String> batchId)

        The batch ID of the WorkflowRun. If this WorkflowRun was created as part of a batch of files, all runs in that batch will have the same batch ID.

        Example: "batch_7Ws31-F5"

        Specified by:
        batchId in interface WorkflowRun._FinalStage
      • metadata

        public WorkflowRun._FinalStage metadata​(java.lang.String key,
                                                java.lang.Object value)

        The metadata that was passed in when running the Workflow.

        Specified by:
        metadata in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • putAllMetadata

        public WorkflowRun._FinalStage putAllMetadata​(java.util.Map<java.lang.String,​java.lang.Object> metadata)

        The metadata that was passed in when running the Workflow.

        Specified by:
        putAllMetadata in interface WorkflowRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.