@RequestMapping(value = "get-form/start/{processDefinitionId}")
@ResponseBody
@SuppressWarnings("unchecked")
public Map<String, Object> findStartForm(@PathVariable("processDefinitionId") String processDefinitionId) throws Exception {
Map<String, Object> result = new HashMap<String, Object>();
StartFormDataImpl startFormData = (StartFormDataImpl) formService.getStartFormData(processDefinitionId);
startFormData.setProcessDefinition(null);
/*
* 读取enum类型数据,用于下拉框
*/
List<FormProperty> formProperties = startFormData.getFormProperties();
for (FormProperty formProperty : formProperties) {
Map<String, String> values = (Map<String, String>) formProperty.getType().getInformation("values");
if (values != null) {
for (Entry<String, String> enumEntry : values.entrySet()) {
logger.debug("enum, key: {}, value: {}", enumEntry.getKey(), enumEntry.getValue());