Getting system properties in user task form

Hello,

I have a process with a number of service and user tasks. During the execution of these tasks the process should get data (JSON, binary) from REST backend.

Service tasks retrieve data by http-connector, and user tasks use cam-script like:

inject([‘$scope’, ‘$http’, function ($scope, $http)

API keys/secrets of these services stored in system properties that I can extract by java.lang.System.getProperties(“secret”) and substitute in Service task API call.

Is it possible to get system properties in cam-script without the use of process variables?

System.getProperties doesn’t work :frowning:

Hi @mms,

I am afraid that it is not possible to get the java system properties out-of-the-box via cam-script.

Cheers,
Tassilo

Hi, Tassilo

Is it possible to implement a custom field (and use it in an embedded form) that can get data before displaying the form?

WBR, Mstislav

Hi @mms,

please see the task form lifecycle hooks [1,2]

Cheers,
Tassilo

[1] https://docs.camunda.org/manual/7.10/reference/embedded-forms/javascript/lifecycle/
[2] https://docs.camunda.org/manual/7.10/reference/embedded-forms/lifecycle/

2 Likes