Using 3rd party libraries in javascript script task

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018 05:54 PM
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.
Labels:
- Labels:
-
Alfresco Process Services
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018 09:32 AM
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
