cancel
Showing results for 
Search instead for 
Did you mean: 

Write values into a Collection in activiti:value

burn83
Champ in-the-making
Champ in-the-making
Hello to everybody!!

I have a little problem…i've created a public java class that implements JavaDelegate in order to populate an activiti:formProperty type="enum", with some activiti:value!

with this Java istruction :

listidexams.add(idexams);
listexams.add(examsname);
arg0.setVariable("completeexams", listexams);
arg0.setVariable("completeidexams", listidexams);


…i put in collection listexams some value that i've extract from my db.

Now when I must prepare the xml code..how i must doing?!
<extensionElements>
       <activiti:formProperty id="esame" type="enum">
         <activiti:value id="first_id_of_exams" name="first_element_of_list" />
              <activiti:value id="second_id_of_exams" name="second_element_of_list" />
         …
              …
       </activiti:formProperty>
    </extensionElements>

Obviusly, this activiti:values must do dinamic!! Smiley Sad
14 REPLIES 14

burn83
Champ in-the-making
Champ in-the-making
but…how can i manage my problem!?

how can i make a cycle for recover my activiti:value from external db!?

trademak
Star Contributor
Star Contributor
Please explain with more details exactly what you want to do.
Frederik posted a response with his interpretation what was needed and you didn't reply to that.
What you can do with the BPMN converter module is define the values dynamically based on the database content.
If that's not what you are looking for and you need to load the values from the database when the form is rendered you would need to write this logic yourself, this is not supported by Activiti out-of-the-box.

Best regards,

burn83
Champ in-the-making
Champ in-the-making
Please explain with more details exactly what you want to do.
Frederik posted a response with his interpretation what was needed and you didn't reply to that.
What you can do with the BPMN converter module is define the values dynamically based on the database content.
If that's not what you are looking for and you need to load the values from the database when the form is rendered you would need to write this logic yourself, this is not supported by Activiti out-of-the-box.

Best regards,

I've followed the Frederik's suggestion…i try to edit BPMN Converter!! But, in order to edit it, i have founded a little problem…the "activiti:value" aren't inserted in my final XML..

I try, for now, to a static value in order to acquire more knowledge about the problem that i have mentioned above…. in the second moment, i import a JPA classes for recover values from external db..

sankarts
Champ in-the-making
Champ in-the-making
I have been using Activiti engine 5.16.1.

My requirement is to populate the values into "enum" (i.e. activiti:formProperty of type enum) dynamically at run time.

Is there any built-in mechanism in Activiti Explorer to achieve the same?

Whether using "custom" FormProperty is the viable option?


trademak
Star Contributor
Star Contributor
So want to fill an enum value in your model, right?
That's something for which you need to implement a custom FormProperty yes.

Best regards,