transitionName = JsfHelper.getParameter("transitionName");
ProcessInstance processInstance = null;
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
if (this.taskInstanceId > 0) {
TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession();
TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(this.taskInstanceId);
if (transitionName.equals("")) {
taskInstance.end();
} else {
taskInstance.end(transitionName);
}