Class WorkflowRun.Builder
- java.lang.Object
-
- ai.extend.types.WorkflowRun.Builder
-
- All Implemented Interfaces:
WorkflowRun._FinalStage,WorkflowRun.DashboardUrlStage,WorkflowRun.IdStage,WorkflowRun.ReviewedStage,WorkflowRun.StatusStage,WorkflowRun.WorkflowStage,WorkflowRun.WorkflowVersionStage
- Enclosing class:
- WorkflowRun
public static final class WorkflowRun.Builder extends java.lang.Object implements WorkflowRun.IdStage, WorkflowRun.WorkflowStage, WorkflowRun.WorkflowVersionStage, WorkflowRun.DashboardUrlStage, WorkflowRun.StatusStage, WorkflowRun.ReviewedStage, WorkflowRun._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkflowRun._FinalStageaddAllFiles(java.util.List<FileSummary> files)WorkflowRun._FinalStageaddAllStepRuns(java.util.List<StepRun> stepRuns)An array of WorkflowStepRun objects.WorkflowRun._FinalStageaddFiles(FileSummary files)WorkflowRun._FinalStageaddStepRuns(StepRun stepRuns)An array of WorkflowStepRun objects.WorkflowRun._FinalStagebatchId(Nullable<java.lang.String> batchId)The batch ID of the WorkflowRun.WorkflowRun._FinalStagebatchId(java.lang.String batchId)The batch ID of the WorkflowRun.WorkflowRun._FinalStagebatchId(java.util.Optional<java.lang.String> batchId)The batch ID of the WorkflowRun.WorkflowRunbuild()WorkflowRun.StatusStagedashboardUrl(java.lang.String dashboardUrl)A URL to view this workflow run in the Extend dashboard.WorkflowRun._FinalStageendTime(Nullable<java.time.OffsetDateTime> endTime)The time (in UTC) that the workflow finished executing.WorkflowRun._FinalStageendTime(java.time.OffsetDateTime endTime)The time (in UTC) that the workflow finished executing.WorkflowRun._FinalStageendTime(java.util.Optional<java.time.OffsetDateTime> endTime)The time (in UTC) that the workflow finished executing.WorkflowRun._FinalStagefailureMessage(Nullable<java.lang.String> failureMessage)A more detailed message about the failure.WorkflowRun._FinalStagefailureMessage(java.lang.String failureMessage)A more detailed message about the failure.WorkflowRun._FinalStagefailureMessage(java.util.Optional<java.lang.String> failureMessage)A more detailed message about the failure.WorkflowRun._FinalStagefailureReason(Nullable<java.lang.String> failureReason)The reason why the workflow run failed.WorkflowRun._FinalStagefailureReason(java.lang.String failureReason)The reason why the workflow run failed.WorkflowRun._FinalStagefailureReason(java.util.Optional<java.lang.String> failureReason)The reason why the workflow run failed.WorkflowRun._FinalStagefiles(java.util.List<FileSummary> files)WorkflowRun.Builderfrom(WorkflowRun other)WorkflowRun.WorkflowStageid(java.lang.String id)The ID of the workflow run.WorkflowRun._FinalStageinitialRunAt(Nullable<java.time.OffsetDateTime> initialRunAt)The time (in UTC) at which the workflow run was created.WorkflowRun._FinalStageinitialRunAt(java.time.OffsetDateTime initialRunAt)The time (in UTC) at which the workflow run was created.WorkflowRun._FinalStageinitialRunAt(java.util.Optional<java.time.OffsetDateTime> initialRunAt)The time (in UTC) at which the workflow run was created.WorkflowRun._FinalStagemetadata(java.lang.String key, java.lang.Object value)The metadata that was passed in when running the Workflow.WorkflowRun._FinalStagemetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)The metadata that was passed in when running the Workflow.WorkflowRun._FinalStageputAllMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)The metadata that was passed in when running the Workflow.WorkflowRun._FinalStagerejectionNote(Nullable<java.lang.String> rejectionNote)A note that is added if a workflow run is rejected.WorkflowRun._FinalStagerejectionNote(java.lang.String rejectionNote)A note that is added if a workflow run is rejected.WorkflowRun._FinalStagerejectionNote(java.util.Optional<java.lang.String> rejectionNote)A note that is added if a workflow run is rejected.WorkflowRun._FinalStagereviewed(boolean reviewed)Whether the workflow run has been reviewed.WorkflowRun._FinalStagereviewedAt(Nullable<java.time.OffsetDateTime> reviewedAt)The time (in UTC) at which the workflow run was reviewed.WorkflowRun._FinalStagereviewedAt(java.time.OffsetDateTime reviewedAt)The time (in UTC) at which the workflow run was reviewed.WorkflowRun._FinalStagereviewedAt(java.util.Optional<java.time.OffsetDateTime> reviewedAt)The time (in UTC) at which the workflow run was reviewed.WorkflowRun._FinalStagereviewedByUser(Nullable<java.lang.String> reviewedByUser)The email address of the person who reviewed the workflow run.WorkflowRun._FinalStagereviewedByUser(java.lang.String reviewedByUser)The email address of the person who reviewed the workflow run.WorkflowRun._FinalStagereviewedByUser(java.util.Optional<java.lang.String> reviewedByUser)The email address of the person who reviewed the workflow run.WorkflowRun._FinalStagestartTime(Nullable<java.time.OffsetDateTime> startTime)The time (in UTC) at which the workflow run started executing.WorkflowRun._FinalStagestartTime(java.time.OffsetDateTime startTime)The time (in UTC) at which the workflow run started executing.WorkflowRun._FinalStagestartTime(java.util.Optional<java.time.OffsetDateTime> startTime)The time (in UTC) at which the workflow run started executing.WorkflowRun.ReviewedStagestatus(WorkflowRunStatus status)WorkflowRun._FinalStagestepRuns(java.util.List<StepRun> stepRuns)An array of WorkflowStepRun objects.WorkflowRun._FinalStageusage(Nullable<RunUsage> usage)WorkflowRun._FinalStageusage(RunUsage usage)WorkflowRun._FinalStageusage(java.util.Optional<RunUsage> usage)WorkflowRun.WorkflowVersionStageworkflow(WorkflowSummary workflow)WorkflowRun.DashboardUrlStageworkflowVersion(WorkflowVersionSummary workflowVersion)
-
-
-
Method Detail
-
from
public WorkflowRun.Builder from(WorkflowRun other)
- Specified by:
fromin interfaceWorkflowRun.IdStage
-
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:
idin interfaceWorkflowRun.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
workflow
public WorkflowRun.WorkflowVersionStage workflow(@NotNull WorkflowSummary workflow)
- Specified by:
workflowin interfaceWorkflowRun.WorkflowStage
-
workflowVersion
public WorkflowRun.DashboardUrlStage workflowVersion(@NotNull WorkflowVersionSummary workflowVersion)
- Specified by:
workflowVersionin interfaceWorkflowRun.WorkflowVersionStage
-
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:
dashboardUrlin interfaceWorkflowRun.DashboardUrlStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
status
public WorkflowRun.ReviewedStage status(@NotNull WorkflowRunStatus status)
- Specified by:
statusin interfaceWorkflowRun.StatusStage
-
reviewed
public WorkflowRun._FinalStage reviewed(boolean reviewed)
Whether the workflow run has been reviewed.
Whether the workflow run has been reviewed.
- Specified by:
reviewedin interfaceWorkflowRun.ReviewedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public WorkflowRun._FinalStage usage(Nullable<RunUsage> usage)
- Specified by:
usagein interfaceWorkflowRun._FinalStage
-
usage
public WorkflowRun._FinalStage usage(RunUsage usage)
- Specified by:
usagein interfaceWorkflowRun._FinalStage
-
usage
public WorkflowRun._FinalStage usage(java.util.Optional<RunUsage> usage)
- Specified by:
usagein interfaceWorkflowRun._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:
addAllStepRunsin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
addStepRunsin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
stepRunsin interfaceWorkflowRun._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:
endTimein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
endTimein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
endTimein interfaceWorkflowRun._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
initialRunAttime. 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:
startTimein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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
initialRunAttime. 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:
startTimein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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
initialRunAttime. 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:
startTimein interfaceWorkflowRun._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:
reviewedAtin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
reviewedAtin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
reviewedAtin interfaceWorkflowRun._FinalStage
-
rejectionNote
public WorkflowRun._FinalStage rejectionNote(Nullable<java.lang.String> rejectionNote)
A note that is added if a workflow run is rejected.
Example:
"Invalid invoice format"- Specified by:
rejectionNotein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
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:
rejectionNotein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
rejectionNote
public WorkflowRun._FinalStage rejectionNote(java.util.Optional<java.lang.String> rejectionNote)
A note that is added if a workflow run is rejected.
Example:
"Invalid invoice format"- Specified by:
rejectionNotein interfaceWorkflowRun._FinalStage
-
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:
reviewedByUserin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
reviewedByUserin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
reviewedByUserin interfaceWorkflowRun._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:
initialRunAtin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
initialRunAtin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
initialRunAtin interfaceWorkflowRun._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:
failureMessagein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
failureMessagein interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public WorkflowRun._FinalStage failureMessage(java.util.Optional<java.lang.String> failureMessage)
A more detailed message about the failure. Will only be included if the workflow run status is "FAILED".
- Specified by:
failureMessagein interfaceWorkflowRun._FinalStage
-
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:
failureReasonin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
failureReasonin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public WorkflowRun._FinalStage failureReason(java.util.Optional<java.lang.String> failureReason)
The reason why the workflow run failed. Will only be included if the workflow run status is "FAILED".
- Specified by:
failureReasonin interfaceWorkflowRun._FinalStage
-
addAllFiles
public WorkflowRun._FinalStage addAllFiles(java.util.List<FileSummary> files)
- Specified by:
addAllFilesin interfaceWorkflowRun._FinalStage
-
addFiles
public WorkflowRun._FinalStage addFiles(FileSummary files)
- Specified by:
addFilesin interfaceWorkflowRun._FinalStage
-
files
public WorkflowRun._FinalStage files(java.util.List<FileSummary> files)
- Specified by:
filesin interfaceWorkflowRun._FinalStage
-
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:
batchIdin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
batchIdin interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
batchIdin interfaceWorkflowRun._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:
metadatain interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso 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:
putAllMetadatain interfaceWorkflowRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public WorkflowRun._FinalStage metadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
The metadata that was passed in when running the Workflow.
- Specified by:
metadatain interfaceWorkflowRun._FinalStage
-
build
public WorkflowRun build()
- Specified by:
buildin interfaceWorkflowRun._FinalStage
-
-