Attaching a script task in the process

Attaching ScriptCode Handler in the process

For the process to be able to invoke the handler, you must set in the process definition ServiceTask to:

  • section Implementation: Topic = eximeeScriptCodeTask

Illustration 1. The 'Implementation' section in ServiceTask

  • section Extension properties: you should add a variable named script with the script name as the value that we want to invoke:

Illustration 2. The 'Extension properties' section in ServiceTask

In the section Inputs we have the option to define arguments for the handler; for the example script:

Illustration 3. The 'Inputs' section in ServiceTask

In the above example we added to the handler a variable testVariable with the value 10.

Keep in mind that in the handler's script we have access to all global process variables via the getVariable() and getAllVariables() methods.

Cache handling in process-handler-executor

process-handler-executor is an application that is part of the Eximee platform. It is responsible for executing script tasks. This application has a cache that reduces the number of requests for the content of script task artifacts, resulting in better performance.

The cache is configurable via the PROCESS_HANDLER_SCRIPT_CODE_CACHE_TTL parameter. Its value should be set depending on the frequency of artifact updates in a given environment. For development environments where artifacts are updated frequently, a low value is recommended, for example '1s'; for production environments a much higher value can be used, for example '10m'.

The cache can also be cleared on demand by making the request:

curl --location --request POST '
http://DOCKER_HOST/process-handler-executor/cache/invalidate'

Last updated

Was this helpful?