Tasklist forms and configurable parameters in tomcat shared engine

Hi,

we are using Camunda as a shared engine on a dedicated tomcat server. We are deploying processes like in “Get started”. Within this WAR files are embedded forms.

What would be an elegant way to get some configurable properties for the task list form? A restart of the system if configuration changes would be acceptable.

I am thinking about an extra configuration app inside the tomcat app which provides configuration information, but actually it is a bit to much overhead. Maybe there is a way to teach Camunda backend to pass some parameters to the tasklist frontend?

Example:
Some forms are loading via $http extra data via REST from another service. I would like to configure the url of this service anywhere, maybe inside the tomcat. Of course, I could set some Java environment props, but they wouldn’t be available in the Angular/Browser context.

EDIT:
I have decided to setup a Spring Zuul proxy server connected to eureka within the >>camunda’s tomcat<< which solves service dispatching.

However, my problem is not solved how to pass some configuration params to the camunda apps like tasklist.

BR,
Michael

Hi Michael,

you can have a look at the index.html of the Tasklist. That contains some “magic strings”, which are replaced by the server before sending the file to the client. We use this for example to provide information about which plugins are installed.

You could use a similar mechanism: Add a custom line to the Javascript and replace the value with your configuration information. I think you can do this with maven overlays, but I’m not sure.

Would this work for you?

Cheers
Sebastian

Hi Sebastian,

thx for your answer and sry for my late reply. No, it didn’t work for me.

I have tried to access the user dir for example which should be a property which is definitely available in JAVA backend.

<script cam-script type="text/form-script">
window.test = $USER_DIR;
...

$USER.DIR or $USERDIR doesn’t work also. Does switch needs to be turned on or something else that this switch is possible.

Or haven’t I understood you correctly. Are you replacing the variables during maven build process?

BR,
Michael

Hi Michael,

sorry, I think I left out an important detail :slight_smile: The server does not automatically replace such a magic string. So if you need the user dir in the index.html file, you can use whatever magic string you like, but you have to make sure that you implement the string replacement in Java.

You can have a look at the ProcessEnginesFilter.java file in the webapp repository. There we replace the strings for our magic variables like $APP_ROOT or $PLUGIN_PACKAGES. You could add your magic strings and replacements to this file and rebuild the webapp to get the changes.

Cheers
Sebastian

1 Like

Hi Sebastian,

thx for your help.

I have to admit that I have just realized now (with your hints) that those “process applications” are simple web application where I am free to add any other technologies. So, I have switched to a Spring Boot application with Thymeleaf (which is our preferred stack anyway) where the forms aren’t static html anymore but dynamically generated. Then I can add anything comfortable server side.

Best Regards,
Michael

(Written this answer for other member which have similar problems)

1 Like

@miwoe,
Hi, Michael:

Can you please share how to integrate with Eureka? I’m planning to do the similar thing: integrate with Eureka, Zuul. But I’d like to find some reference how we integrate the Camunda engine/rest to Eureka.

Thank you very much.
Best Regards,
Jeff.