I have already post this but on the developer forum and it was not the good, so I post my question.
And now, I have not one but two questions (sorry) :
First :
So, I have designed a simple process under activiti (start event –> taskuser1 –> taskuser2 –> end event). In the taskuser1, I have a form with some form properties. When I deploy my process under activiti explorer, it works fine with the form.
But, my next step is : take data from an external mysql database and display it into a form property.
How can I do that ? I tried to add in Preferences –> Data Management –> Connectivity –> Driver Definitions my jdbc driver and it's ok. But when I right click on my project in the activiti Explorer and choose New –> Other –> Connection Profile and try to add a connection, It doesn't work. Is it the best way to take data from an external database and inject them into a form ?
I try since yesterday but no way to do that.
(I specify that I want use H2 and an external database (mysql))"
Second : In a other way, I try to populate my external database with the data filled by the user in the usertask1 form but I don't know how do that. I think I should connect my external mysql database with a connection profil but like said in the first point, it seems not work fine (oing failed). But after, how do that ? I don't really understand the userguide about this point.
End of my questions.
Thanks for your responses
(I am sorry if this questions and so responses very simple, but I a very very beginner in activiti and not really good in development)
If you want to have external pre-data filled in into a form, you'll have to make activiti aware of your services that access that data. You can follow 2 approaches:
If you want to have a list of options to select from, you'll have to create a custom variable type, which does some lookup for you in the service and displays it. Additionally, when usig explorer, you should create a custom "rendered" from this. Look into org.activiti.explorer.ui.form.UserFormPropertyRenderer for inspiration on this.