So, I’ve encountered a bit of a roadblock. I have a process where, through a form, a user requests vacations. Then, their answers are checked by another user. Initially, I was doing everything with Tasklist. Now, I’m starting to migrate everything to my own webapp.
So, what exactly is the problem? To test, I’m using the Swagger UI for Tasklist. This is what I’ve done.
I get the taskId through a request to the /v1/tasks/search endpoint. Works fine.
I assign the task to a certain user through the /v1/tasks/{taskId}/assign endpoint. Also works fine.
I then try to complete the task through the /v1/tasks/{taskId}/complete endpoint, and I specify in the body my variables as shown next:
I’ve tried formatting the variables different, but the outcome keeps being the same. I don’t know If this is happening because by user tasks are linked to forms and, in the BPMN diagram, they don’t have inputs or outputs defined.
What do you all think is happening?
EDIT: Escaping does not help, and with certain values, the next error appears. To me, my input looks valid according to what the error message says, but I could be missing something.
I was using a radius element because, to me, it is more explicit to have those two options. But, thinking about it, a checkbox would be easier to handle. Now, does that cause the bug that I showed earlier? And if so, why?
Hi guys, all right?
The problem can also be in the gateway line, if there is no “” in the aprobada, it returns this error as it cant identify it as a string.
Example: ${decision ==aprobada} instead of ${decision == “aprobada”} would cause this error.
That was exactly the problem! Thank you so much @GotnOGuts. Since in the documentation I just saw normal “strings” being used in the value field, I assumed I had to use just normal strings. Reading the original JSON standard (JSON) also helped me make a bit more sense about this.
Hi @Rosana! Thanks for your answer. What you suggest was one of the first things that I checked. I was declaring the value as a string inside of the gateway line.
Now, your answer does leave me with a doubt. I’ve seen some other BPMN diagrams where people use the ${…} format when referring to variables or expressions. As far as I know, Camunda uses FEEL, and that notation is primarly used in template strings in JS. So, am I also writing my expressions wrong?