This project is a sample script to show how to import 3rd party npm packages in a Laserfiche Nodejs Rule script project.
- Copy the content of the bundle output folder
\distto your remote agent folder- e.g.,
C:\Program Files\Laserfiche\Server\RemoteAgent\ScriptRunner\Nodejs\script
- e.g.,
-
Create a new rule
- Select the script rule type: Nodejs
- Script location:
ProcessAutomationWorker\bin\Scripts\node\distance-between-zipcodes\distance.js - Input:
- Zipcode1
- Zipcode2
- Output:
- Distance
- Providing two zip code inputs, this script would calculate the distance between the two zip codes and return the result in miles under output parameter named "Distance"
- Run the workflow and verify the script calculate the distance between the two zip codes


