}
this.listFieldType = listFieldType;
}
public static void metaworksCallback_changeMetadata(Type type){
FieldDescriptor fd;
fd = type.getFieldDescriptor("ListFieldType");
//ArrayList fieldNames = new ArrayList();
ArrayList fieldValues = new ArrayList();
try {
ProcessInstanceDAO piDAO;
WorkListDAO wlDAO;
wlDAO = (org.uengine.persistence.dao.WorkListDAO)GenericDAO.createDAOImpl(org.uengine.persistence.dao.WorkListDAO.class);
for(Iterator i = wlDAO.getImplementationObject().getPropertyTypes().keySet().iterator(); i.hasNext();){
String fieldName = (String)i.next();
//fieldNames.add(fieldName);
WorkListTableListFieldType listFieldType = new WorkListTableListFieldType();
listFieldType.setFieldName(fieldName);
fieldValues.add(listFieldType);
}
piDAO = (ProcessInstanceDAO)GenericDAO.createDAOImpl(ProcessInstanceDAO.class);
for(Iterator i = piDAO.getImplementationObject().getPropertyTypes().keySet().iterator(); i.hasNext();){
String fieldName = (String)i.next();
//fieldNames.add(fieldName);
InstanceTableListFieldType listFieldType = new InstanceTableListFieldType();
listFieldType.setFieldName(fieldName);
fieldValues.add(listFieldType);
}
ProcessDesigner pdr = ProcessDesigner.getInstance();
ProcessDefinition pd = (ProcessDefinition)pdr.getProcessDefinitionDesigner().getActivity();
ProcessVariable[] variables = pd.getProcessVariables();
if(variables != null){
for(int i=0; i<variables.length; i++){
if(variables[i].isDatabaseSynchronized()){
VariablePointingListFieldType listFieldType = new VariablePointingListFieldType();
listFieldType.setVariable(variables[i]);
fieldValues.add(listFieldType);
}
}
}
Object [] listFieldTypesInArray = new Object[fieldValues.size()];
fieldValues.toArray(listFieldTypesInArray);
fd.setInputter(new SelectInput(listFieldTypesInArray));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}