Hi,Using Activiti 5.16.3, I would like to get the form data by giving a taskId. I found using Rest API the following call :
GET form/form-data?taskId=" + taskId
With this call to the engine, I can see the different values of the enumValues :
{"formKey":null,"deploymentId":"550005","processDefinitionId":null,"processDefinitionUrl":null,"taskId":"645098","taskUrl":"http://zqism1001ap:8177/activiti-rest/service/runtime/tasks/645098','formProperties":[{"id":"__button__","name":"team6","type":"enum","value":null,"readable":true,"writable":true,"required":false,"datePattern":null,"enumValues":[{"id":"back","name":"Back"},{"id":"end","name":"End"}]}]}
So I tried to do the same with the engine :
public ListIterator<FormProperty> displayButtonsForTaskJavaAPI(
@QueryParam("taskId") String taskId)
throws Exception{
LOGGER.info("—> beginning showing all buttons for the task");
ListIterator<FormProperty> myButtons = null;
try{
myButtons = ProcessEngines
.getDefaultProcessEngine()
.getFormService()
.getTaskFormData(taskId)
.getFormProperties()
.listIterator();
if(myButtons == null)
LOGGER.info("no buttons");
LOGGER.info("myButtons : {}", myButtons);
}catch(Exception e){
LOGGER.error("Error displaying all buttons for task {}", taskId, e);
}
return myButtons;
}
But I lose the most important part, the one with "enumValues" !
[{"id":"__button__","name":"team6","type":{"name":"enum"},"value":null,"readable":true,"writable":true,"required":false}]
Isn't it the correct call to the engine ? if so, where am I wrong please ?Thanks for your help,RegardsAurelien