* @author Tom Baeyens
*/
public class DefaultTaskFormHandler extends DefaultFormHandler implements TaskFormHandler {
public TaskFormData createTaskForm(TaskEntity task) {
TaskFormDataImpl taskFormData = new TaskFormDataImpl();
Expression formKey = task.getTaskDefinition().getFormKey();
if (formKey != null) {
Object formValue = formKey.getValue(task);
if (formValue != null) {
taskFormData.setFormKey(formValue.toString());
}
}
taskFormData.setDeploymentId(deploymentId);
taskFormData.setTask(task);
initializeFormProperties(taskFormData, task.getExecution());
initializeFormFields(taskFormData, task.getExecution());
return taskFormData;
}