Collection<Element> children = new ArrayList<Element>();
Collection<WorkflowVariable> variableList = workflowManager.getProcessVariableList(processId);
for (WorkflowVariable variable : variableList) {
String varId = variable.getId();
String varName = variable.getName();
TextField tf = new TextField();
tf.setProperty(FormUtil.PROPERTY_ID, varId);
tf.setProperty(FormUtil.PROPERTY_LABEL, varName);
tf.setProperty(AppUtil.PROPERTY_WORKFLOW_VARIABLE, varId);
children.add(tf);
}
form.setChildren(children);
// load form