Your taskform can contain html as well as javascript, so sure you could for example have each one of your buttons have an onSubmit which calls different javascript functions that for example set a hidden variable value then return true so the form is submitted. The hidden variable would be mapped to a local task variable, and then as whabelitz mentioned you would need to map that out to a process variable for later use.