Class CompleteJobResult

java.lang.Object
io.camunda.client.api.command.CompleteJobResult

public class CompleteJobResult extends Object
  • Constructor Details

    • CompleteJobResult

      public CompleteJobResult()
  • Method Details

    • deny

      public CompleteJobResult deny(boolean isDenied)
      Indicates whether the worker denies the work, i.e. explicitly doesn't approve it. For example, a user task listener can deny the completion of a task by setting this flag to true. In this example, the completion of a task is represented by a job that the worker can complete as denied. As a result, the completion request is rejected and the task remains active. Defaults to false.
      Parameters:
      isDenied - indicates if the worker has denied the reason for the job
      Returns:
      this job result
    • deniedReason

      public CompleteJobResult deniedReason(String deniedReason)
      Indicates the reason why the worker denied the job. For example, a user task listener can deny the completion of a task by setting the deny flag to true and specifying the reason to deny. Defaults to an empty string.
      Parameters:
      deniedReason - indicates the reason why the worker denied the job
      Returns:
      this job result
    • correct

      public CompleteJobResult correct(JobResultCorrections corrections)
      Applies corrections to the user task attributes.

      This method allows the worker to modify key attributes of the user task (such as assignee, candidateGroups, and so on).

      Parameters:
      corrections - the corrections to apply to the user task.
      Returns:
      this job result
    • correct

      public CompleteJobResult correct(UnaryOperator<JobResultCorrections> corrections)
      Dynamically applies corrections to the user task attributes using a lambda expression.

      This method is a functional alternative to correct(JobResultCorrections). It allows the worker to modify key user task attributes (such as assignee, dueDate, priority, and so on) directly via a lambda expression. The lambda receives the current JobResultCorrections instance, which can be updated as needed. If no corrections have been set yet, a default JobResultCorrections instance is provided.

      Parameters:
      corrections - a lambda expression to modify the JobResultCorrections.
      Returns:
      this job result
    • correctAssignee

      public CompleteJobResult correctAssignee(String assignee)
      Correct the assignee of the task.
      Parameters:
      assignee - assignee of the task
      Returns:
      this job result
    • correctDueDate

      public CompleteJobResult correctDueDate(String dueDate)
      Correct the due date of the task.
      Parameters:
      dueDate - due date of the task
      Returns:
      this job result
    • correctFollowUpDate

      public CompleteJobResult correctFollowUpDate(String followUpDate)
      Correct the follow up date of the task.
      Parameters:
      followUpDate - follow up date of the task
      Returns:
      this job result
    • correctCandidateGroups

      public CompleteJobResult correctCandidateGroups(List<String> candidateGroups)
      Correct the candidate groups of the task.
      Parameters:
      candidateGroups - candidate groups of the task
      Returns:
      this job result
    • correctCandidateUsers

      public CompleteJobResult correctCandidateUsers(List<String> candidateUsers)
      Correct the candidate users of the task.
      Parameters:
      candidateUsers - candidate users of the task
      Returns:
      this job result
    • correctPriority

      public CompleteJobResult correctPriority(Integer priority)
      Correct the priority of the task.
      Parameters:
      priority - priority of the task
      Returns:
      this job result
    • isDenied

      public boolean isDenied()
    • getDeniedReason

      public String getDeniedReason()
    • getCorrections

      public JobResultCorrections getCorrections()