CompleteWorkflowTasksRequest.Builder not working
Can someone explain what is needed to complete a workflow user task from the REST API? I assume this would be done with the CompleteWorkflowTasksRequest.Builder, but I can’t seem to get it to work as I am getting a 500 error: “The current user can’t complete the task ‘task’ as he is no candidate user of the task’ .” There is a “guestUserId” method but I have no clue what this is. The user task is simply a “submit” button.
The scenario is - we have a collibra account that we created in order to assign tasks that we want to be picked up by our AWS Lambda function. This lambda function will prompt AI to define the business term that is related to the user task that is assigned to said account. Once the AI defines the business term - we then will add the definition to the term. Once this step is complete we want to mark the task that is assigned to our lambda as complete so the requester of the business term (next user task in wf) can then validate the definition that the ai created before kicking off the approval process.
Any help would be greatly appreciated - this is for our hackathon and we have until this Friday so a bit of a time crunch!
jackfinegan
OP3 years ago · EditedOkay thank you for the response - I was attempting to complete it from the API swagger while signed into my own account, not the technical user which makes sense with the error I was getting. The technical user is authenticated through the lambda so it should work when running it from there. Thanks for the help Arthur!
arthurburkhardt
·3 years ago · EditedJust tested this right now: I have a task assigned to myself with two buttons: approve and reject.
get https://something.collibra.com/rest/2.0/workflowTasks?userId=a512fe78-a438-5fa5-9ed7-134f591e357cpost https://something.collibra.com/rest/2.0/workflowTasks/completedIf the task is assigned to the technical user of the AWS lambda, it should work just fine.