Hello everyone,
In the default h2 database, I’ve created a custom table (PRODUCT_CATEGORIES) which is updated by a user.
In this user’s task form (in Tasklist), there is a drop-down menu (Product Categories), whose values are loaded by my custom h2 table every time this user signs in.
Everything it’s ok here but I have an issue:
I tried to update this custom table (e.x. by adding a new product category), but for some reason the taskform isn’t updated in Tasklist (the drop-down menu values remain the same).
Must I also update (clean, build and deploy) my Maven project in Eclipse in order to take the changes ? Or must I do sth else ? Could please anyone help ?
Thanks a lot,
Steve
Hi @steftriant,
how do you generate the form? Is it embedded/generated and if possible, can you post it?
First thing I can think of is that the browser cached the response. Does it work if you open Tasklist in a fresh browser/incognito mode?
KR
Martin
Hi @martin.stamm,
Thank you very much for your feedback 
This User Task form is an embedded html form which is loaded from a WAR archive during runtime.
Please let me explain my logic for the loading of those values (from my custom h2 table to user’s task form):
Those values are loaded via a Service Task (which calls a Java class file) and is before the User Task.
Since this Service Task is executed only once in the process, those values are also requested only once from the h2 table.
So, any change (after Service’s Task execution) in my custom h2 table doesn’t make any sense in user’s task form 
As a result, I must somehow change the way of calling this Java class file.
Maybe, I could define a Create (Execution/Task) Listener which could call this Java class every time the user loads this task form.
What is your opinion on this ?
Kind regards,
Steve
The execution listeners are only executed when the Task itself changes. Simply loading it multiple times would not result in the listener being executed again.
You can probably create a custom REST endpoint which will query the database and then call it from the form every time it is loaded. You won’t be able to use cam-form directives for form element with this approach and will have to use the variableManager to set process variables.
Here is an example on how to extend the Camunda API. You can also use Plugins to handle this.
Hi again @martin.stamm,
Can I ask you please what do you mean by saying that “the Task itself changes” ?
Additionally, could the Task Listeners be a solution for my purpose ?
Kind regards,
Steve
As far as I know triggers are only triggerd on changes of duedate, assignee etc.