-
Notifications
You must be signed in to change notification settings - Fork 14
feat(zeebe): support Job Corrections in complete command fixes #347 #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: alpha
Are you sure you want to change the base?
Conversation
const res1 = await job.completeWithJobResult({ | ||
variables: {}, | ||
result: { | ||
denied: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 Given the test case (the process has a service task for which this job worker code will run) this code may eventually break.
Job result is at this time only meant to be used for User Task Listeners.
For now, we allow regular job completions with a job result ignoring the result. However, in the future we may add validations against it.
🔧 As a more durable test case, please consider a Camunda User Task
with a completing
task listener. You can then try to complete the user task, which creates a job that you can activate and complete with a job result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwulf Just a heads up about the deniedReason
/** Since Camunda 8.8 */ | ||
result?: JobResult | ||
} | ||
|
||
/** | ||
* Since Camunda 8.7 | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** Since Camunda 8.8 */ | |
result?: JobResult | |
} | |
/** | |
* Since Camunda 8.7 | |
*/ | |
/** Since Camunda 8.8 */ | |
result?: JobResult | |
} | |
/** | |
* Since Camunda 8.8 | |
*/ |
export interface JobResult { | ||
// Indicates whether the worker denies the work, i.e. explicitly doesn't approve it. | ||
// For example, a 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. | ||
denied?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 There's also a new deniedReason?: string
added:
Description of the change
[Describe your changes here]
Type of change
Checklist
alpha
branchFurther comments
[If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...]