Package io.camunda.client.api.command
Class CompleteJobResult
java.lang.Object
io.camunda.client.api.command.CompleteJobResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncorrect(JobResultCorrections corrections) Applies corrections to the user task attributes.correct(UnaryOperator<JobResultCorrections> corrections) Dynamically applies corrections to the user task attributes using a lambda expression.correctAssignee(String assignee) Correct the assignee of the task.correctCandidateGroups(List<String> candidateGroups) Correct the candidate groups of the task.correctCandidateUsers(List<String> candidateUsers) Correct the candidate users of the task.correctDueDate(String dueDate) Correct the due date of the task.correctFollowUpDate(String followUpDate) Correct the follow up date of the task.correctPriority(Integer priority) Correct the priority of the task.deniedReason(String deniedReason) Indicates the reason why the worker denied the job.deny(boolean isDenied) Indicates whether the worker denies the work, i.e. explicitly doesn't approve it.booleanisDenied()
-
Constructor Details
-
CompleteJobResult
public CompleteJobResult()
-
-
Method Details
-
deny
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 tofalse.- Parameters:
isDenied- indicates if the worker has denied the reason for the job- Returns:
- this job result
-
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
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
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 asassignee,dueDate,priority, and so on) directly via a lambda expression. The lambda receives the currentJobResultCorrectionsinstance, which can be updated as needed. If no corrections have been set yet, a defaultJobResultCorrectionsinstance is provided.- Parameters:
corrections- a lambda expression to modify theJobResultCorrections.- Returns:
- this job result
-
correctAssignee
Correct the assignee of the task.- Parameters:
assignee- assignee of the task- Returns:
- this job result
-
correctDueDate
Correct the due date of the task.- Parameters:
dueDate- due date of the task- Returns:
- this job result
-
correctFollowUpDate
Correct the follow up date of the task.- Parameters:
followUpDate- follow up date of the task- Returns:
- this job result
-
correctCandidateGroups
Correct the candidate groups of the task.- Parameters:
candidateGroups- candidate groups of the task- Returns:
- this job result
-
correctCandidateUsers
Correct the candidate users of the task.- Parameters:
candidateUsers- candidate users of the task- Returns:
- this job result
-
correctPriority
Correct the priority of the task.- Parameters:
priority- priority of the task- Returns:
- this job result
-
isDenied
public boolean isDenied() -
getDeniedReason
-
getCorrections
-