Open vadeerhunter opened 3 years ago
The form properties should be in the XML model which is saved in binary format in the resources table (act_ge_bytearray).
It is in my xml, but is not available from code when I try and retrieve the values to build a user screen. Does not return "values"
Sample code FormService formService = processEngine.getFormService();
List<FormProperty> formProperties = formService.getTaskFormData(taskID).getFormProperties();
int counter = 0;
for (FormProperty formProperty : formProperties) {
if (formProperty.getId().equals(propertyName)){
Map<String, String> values = (Map<String, String>) formProperty.getType().getInformation("values");
String[][] result = new String[values.size()][2];
if (values != null) {
for (Entry<String, String> enumEntry : values.entrySet()) {
result[counter][0] = enumEntry.getKey();
result[counter][1] = enumEntry.getValue();
counter++;
}
return result;
}
}
}
Are you able to send the XML model?
Here is my form
From: 4gsim @.> Sent: Thursday, June 10, 2021 3:26 PM To: flowable/flowable-engine @.> Cc: vadeerhunter @.>; Author @.> Subject: Re: [flowable/flowable-engine] Form Properties enum (org.flowable.engine.impl.form.EnumFormType) Not saving values during deployment (#2936)
Are you able to send the XML model?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flowable/flowable-engine/issues/2936#issuecomment-858952602 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQO25PUJVVI57BA2CZJTA3TSEGVFANCNFSM45S56T7Q .
Sorry I cannot see your form. Are you sure you are trying to get the values from an enum property type? Is that propertyName variable the id of an enum property type?
Yes it is an enum type. The template works fine in Activiti 5.22, trying the same template under Flowable I get no results from the same code. I have attached inline.
<?xml version="1.0" encoding="UTF-8"?>
From: 4gsim @.> Sent: Friday, June 11, 2021 9:13 AM To: flowable/flowable-engine @.> Cc: vadeerhunter @.>; Author @.> Subject: Re: [flowable/flowable-engine] Form Properties enum (org.flowable.engine.impl.form.EnumFormType) Not saving values during deployment (#2936)
Sorry I cannot see your form. Are you sure you are trying to get the values from an enum property type? Is that propertyName variable the id of an enum property type?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flowable/flowable-engine/issues/2936#issuecomment-859572662 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQO25N42JACMIYNBGVQ4WTTSIDVXANCNFSM45S56T7Q .
Do you get the same error if you remove async flag from the task?
The enum Form properties types do not save to the database during deployment, verified that it is in the process definition file before deploying the bar file
The formProperty.getType().getInformation("values") will always return nothing. Have looked in the tables and cannot see the variables of type enum.
Trying to migrate from Activiti 5.22 to Flowable 6. We are using Flowable as an embedded engine in our application and using the Eclipse Flowable Designer 5.22 for process creation.
Sample process
<?xml version="1.0" encoding="UTF-8"?>