I am using activiti community version 6.0. I have gone through the documentation but cannot see a REST API to retrieve task-form.
I noticed Activiti uses following request url to get the form definitions:
http://localhost:8080/activiti-app/app/rest/task-forms/{taskId}
I tried using this url along with a restTemplate to access the task forms and resulted in 401 error code.
@Service
public class GetTaskForm {
String baseURL = "http://localhost:8080/activiti-app/app/rest/task-forms/";
public void getTaskForm(String taskId){
String taskURL = baseURL + taskId;
RestTemplate restTemplate = new RestTemplate();
String taskForm = restTemplate.getForObject(taskURL, String.class);
System.out.println(taskForm);
}
}
What would be the best way to achieve this?