@kontrag
Here is a full function that you can drop in:
/**
* Load configuration file as a SPIN JSON variable in-memory and optionally as a process variable.
*
* @param string fileName The name of the configuration file in the deployment.
* @param string key The top level JSON key in the configuration file that will be saved, and other keys/objects are omitted.
* @param boolean persist Whether to save the configuration as a process variable.
* @return SPIN JSON Object
*/
function loadCon…
Hi @StephenOTT
Thanks for the reply !!!
So I dont want to write a script at start event instead i want to read a file placea at some external location in my script task. Script Type is Javascript.
Is there any way in which we can read external files ?
My use case is I want to assign some value to variable which is not workflow dependent and which a user can change at any point of time without changing the bpmn file.
I would argue that most common use cases have been posted by myself on the forum when they are scripting related ;). Went through many over the years. Best to search the forum a bit as there are many examples.
1 Like