Hi Community.
In my Activiti BPM process i have a Service Task to retrieve the information that i would use to build the Enum Form property in the next User Task activity as depicted in the image below.
Then in the Java class bound to the "Retrieve the Type of Device..." Service Task i need to retrieve the types of device and build the enum property to present to the user through Activiti Explorer.
I try to use the org.activiti.engine.FormService and org.activiti.engine.form.TaskFormData classes as listed in the code below but when i complete the "Start User Task" i receive the following error:
I think the error is throwed because the User Task with id "showSignalTask" doesn't exist yet. I have the doubt about the possibility to build programmatically a standard activiti form in this way:
public void execute(DelegateExecution execution) throws Exception {
FormService formService = execution.getEngineServices().getFormService();
TaskFormData taskFormData = formService.getTaskFormData("showSignalTask");
List<FormProperty> formProperties = taskFormData.getFormProperties();
Map<String, String> values = new HashMap<String, String>();
ArrayList<String> deviceTypes = WebServiceClient.retrieveTypes();
for(String deviceType: deviceTypes){
values.put(deviceType, deviceType);
FormProperty fpro = (FormProperty) new EnumFormType(values);
formProperties.add(fpro);}
Any suggestion will be appreciated
Thanks in advance
Leo
Good Morning Community.
Sorry for the remind...are there any suggestion about my request? Otherwhise i need to evaluate an alternative solution with the instrument/construts available in Activiti.
Thanks in advance and apologize for my new message.
Regards
Leo
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.