Using 3rd party libraries in javascript script task

cancel
Showing results for 
Search instead for 
Did you mean: 
apita
Member II

Using 3rd party libraries in javascript script task

How would I go about importing external javascript libraries into alfresco script tasks? I'd like to use lodash for a task, but I'm not sure where to save lodash.js file and load it in my script task.

1 Reply
mteodori
Alfresco Employee

Re: Using 3rd party libraries in javascript script task

the javascript engine in activiti is the standard one provided by JDK which is Rhino until Java 7 and Nashorn from Java 8 on, so the standard ways to load external libraries you would use there apply to Activiti scripts as well

for example via the load function with Nashorn: http://www.baeldung.com/java-nashorn