Script task API
The platform provides the ability to create handler script task logic from Eximee Designer. The process designer only needs to write the handler logic and attach it in the process.
Creating a script task
We can create and edit script tasks using the Eximee Designer application. To do this, in the module Library select the tab Script tasks:

A detailed description of script creation is available in: Script tasks.
Handler API
Set the list of groups that will have access to the process instance on the case list
Sample script tasks
The script retrieves the variable with the identifier "testVariable", multiplies it by itself, and assigns the result to a new variable "result":
Calling Rest services in a script task
Invocation documentation: [Rest] Calling external REST services (ScriptCode)
The only change compared to the above documentation is the configuration file.
For ScriptCode Handler, it is called script-handler-api.xml and is located in the directory /etc/eximee/webforms/script-handler-config
Example of a script task with a call to an external REST service:
Retrieving business application configuration
Invocation documentation: Scripts (scriptService)#Retrievingapplicationconfiguration
Example of a script task with configuration retrieval:
Calling Eximee Status in ScriptCode Handler
For the call to work properly, the EXIMEE_STATUS_URL parameter pointing to the eximee-status API must be set.
The methods calling eximee-status require the process variable statusId, which should contain the request number for which the specified update is to occur.
Status API
Example ScriptCodeHandler with eximee-status call:
Retrieving Content contents
Functionality available from platform version: 3.332.0
From a script task, you can retrieve the contents of the artifact Content (textContent) created in Eximee Designer, using the function: api.repository.v1.textContent. This function returns an object that contains the content for each defined translation. To retrieve the content for a given translation, we use the function language. Example usage:
The function
textContentthrows an exception if it does not find an artifact with the specified parameters.The function
languagethrows an exception if it does not find a translation in the specified language.
If we are not sure that the parameters we provided are correct, we can handle exceptions using try catch:
Data model
More information in Data model API
Saving data in the data model
In script tasks, we can save data to the model using the 'complete' method; the first parameter saves data to the process, and the second parameter saves data to the model:
The model key must exist in the data model for it to be saved correctly
Last updated
Was this helpful?
