How to specify outgoing when i completing a user task

Hello.
I have a process with User Task.
My User Task has two outgoings out1 and out2.
Also i have cutom user form in my app assigned with this User Task.
User form has two button: button1 and button2.
When user pressing button1 i want complete user task with outgoing out1.
When user pressing button2 i want complete user task with outgoing out2.
But method complete in TaskService in camunda API has no option to specify oitgoung :frowning:
Please, help me. How to resume process in the right way?

Hi @JackVlg

You can set a variable value in submitting each button, and then decide which outgoing sequence should be activated based on this variable value.

Thank you!

1 Like

This solution is working, but i think it’s a bad design.
I have to train our analysts to do conditional jumps.
It would be better if the API had a method complete(taskId, transitionId)

This is actually a foundationally baked-in decision of the language specification.
The gateways are supposed to be programmed to evaluate the process data and route to the next step based on that. So the analysts doing the programming have to understand what that data is in advance … but it means that the end-users don’t need to know or understand it.