Is it possible to do multiple button clicks in a single user Task form and do respective actions via triggering REST api's

Is it possible to do multiple button clicks in a single user Task’s form and do respective actions via triggering REST api’s. For example I have a review user task. I have to review something and I have to enter my comments. after entering comments I have to click a save button which will trigger a REST api to a different server and save the comments. Now for the Review task I have approve and reject button. Both buttons are linked to respective rest api calls to different servers. On clicking Save button I will save my comments(will not complete the task). On clicking Approve or Reject button, I have to call respective rest api and complete the task. Is this possible in flowable. Eevent listener or task listener or execution listener can be used? Any suggestion?

Hey.

The way I’d do this is use the “Http Task” right after the “User Task” which contains the said buttons with desired actions. If you use a dropdown list in your “User Task” instead of buttons, you could then use conditional flows to determine to which “Http Task” the process should go. Each “Http Task” results in a REST call according to the selected option.

You could go one step further and place “Script Task” inbetween the “User Task” and a single “Http Task”, and with the help of Groovy script you could set up the needed variables, properties and payloads which you can then reference in the single “Http Task”.