Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async ack(message: IMessage | undefined, IWorkflowProps>) {
if (this.hasBeenThreated) {
return Promise.resolve();
}
// TODO: change any to real type body
const vars = getVariablesWhenChanged(message, msg => ZeebeMessage.unwrap(msg));
if (vars) {
this.hasBeenThreated = complete.success(vars.variables);
} else {
this.hasBeenThreated = complete.success();
}
return Promise.resolve();
},
async nack(error: FailureException) {
async ack(message: IMessage) {
if (this.hasBeenThreated) {
return;
}
const vars = getVariablesWhenChanged(message, m => CamundaMessage.unwrap(m));
await payload.taskService.complete(task, vars);
this.hasBeenThreated = true;
},
/**