As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi,
I am using activiti in my spring web application and would like to get the name of field by using id. please let me know how to get the name?
Here id is reporting_manager_comments but name is Comments. I would like to display history of task with name. Please help me out solve this issue.
Thanks
Please anyone reply on this.
You can resolve the field name of form propery by using FormService.class
FormService (Activiti - Engine 6.0.0 API)
TaskFormData (Activiti - Engine 6.0.0 API)
Example code
TaskFormData formData = formService.getTaskFormData(task.getId()); List<FormProperty> formProperties = formData.getFormProperties(); for(FormProperty prop : formProperties){ if ("YOUR_ID".equals(prop.getId())){ System.out.println(prop.getName()); } }
TaskFormData formData = formService.getTaskFormData(task.getId());
List<FormProperty> formProperties = formData.getFormProperties();
for(FormProperty prop : formProperties){
if ("YOUR_ID".equals(prop.getId())){
System.out.println(prop.getName());
}