Class WorkflowRun.Builder

    • Method Detail

      • object

        public WorkflowRun.IdStage object​(@NotNull
                                          java.lang.String object)

        The type of response. In this case, it will always be "workflow_run".

        The type of response. In this case, it will always be "workflow_run".

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

        public WorkflowRun.NameStage 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.
      • name

        public WorkflowRun.UrlStage name​(@NotNull
                                         java.lang.String name)

        The name of the workflow run.

        Example: "myFirstFile.pdf"

        The name of the workflow run.

        Example: "myFirstFile.pdf"

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

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

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

        Example: "https://dashboard.extend.ai/workflows/workflow_Bk9mNp2qWs5_xL8vR4tYh?workflowRunId=workflow_run_Zj3nMx7ZPd9f4c2WQ_kAg"

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

        Example: "https://dashboard.extend.ai/workflows/workflow_Bk9mNp2qWs5_xL8vR4tYh?workflowRunId=workflow_run_Zj3nMx7ZPd9f4c2WQ_kAg"

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

        public WorkflowRun.ReviewedStage initialRunAt​(@NotNull
                                                      java.time.OffsetDateTime initialRunAt)

        The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format.

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

        The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format.

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

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

        public WorkflowRun.WorkflowStage 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.
      • 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 and the run's output.

        Note: This field currently supports External Data Validation and Rule Validation step types. Document processor run outputs are included in the outputs field.

        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 and the run's output.

        Note: This field currently supports External Data Validation and Rule Validation step types. Document processor run outputs are included in the outputs field.

        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 and the run's output.

        Note: This field currently supports External Data Validation and Rule Validation step types. Document processor run outputs are included in the outputs field.

        Specified by:
        stepRuns in interface WorkflowRun._FinalStage
      • 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 not be included 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 not be included 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​(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 not be included 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 not be included 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​(java.time.OffsetDateTime reviewedAt)

        The time (in UTC) at which the workflow run was reviewed. Will follow the RFC 3339 format. Will not be included 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 not be included 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.
      • reviewedBy

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

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

        Example: "jane.doe@example.com"

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

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

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

        Example: "jane.doe@example.com"

        Specified by:
        reviewedBy in interface WorkflowRun._FinalStage
      • 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​(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​(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.