cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to get values of Enum property

bhupendra1
Champ in-the-making
Champ in-the-making
We have a got a Task form associated with the task.
The form has enum type field as

<activiti:formProperty id="cpApproved" name="Approve Contractor proposal" type="enum" required="false" readable="true" writable="true">
<activiti:value id="yes" name="Yes"></activiti:value>
<activiti:value id="no" name="No"></activiti:value>
</activiti:formProperty>

In the listner associated with this task, we are getting form values as below:

TaskFormData taskFormdata =new GetTaskFormCmd(task.getId()).execute( Context.getCommandContext() );
List<FormProperty> formList= taskFormdata.getFormProperties();

And finaly getting values as

formType.getValue();

While it returns values for other fields like date, string correctly, it returns the value of enum field as null. Please suggest how should be value of selected enum value should be fetched.

Thanks!
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Use getInformation()


@Override
  public Object getInformation(String key) {
    if (key.equals("values")) {
      return values;
    }
    return null;
  }