How to write a JSS event

A JSS event is a process trigger event written in JSS (Javascript Server-Side).

Creating a JSS event

Creation of process triggers events is described in How to set up process triggers. To create a JSS event, select the type "JSS script".

Tutorials

The tutorials below demonstrate common examples of JSS events:
1. Tutorial 1 - Upload file to server: demonstrates an uploading event, which is triggered when a user uploads a file to server.
2. Tutorial 2 - Error handling: demonstrates error handling using a try-catch statement.
3. Tutorial 3 - Multiple Uploading: demonstrates how to create a JSS event using multiple uploads.
4. Tutorial 4 - Scheduled events: demonstrates how to work with scheduled events.
5. Tutorial 5 - Record the type of event: demonstrates how to record events in a file.
6. Tutorial 6 - Move a file from this Path to another Path: demonstrates how to move a file from this Path to another Path.

Note: if you run these tutorials on localhost, note that the script's uploading of the file will trigger the same event again.

Apart from the normal JSS API, you also have access to the new Ftp class. You can find the reference for Ftp class here.

For easier debugging, use the pop-out, real-time log via the View/Show logging window, Monitoring/Open in window, and in Events/Show log.

Now please proceed to Tutorial 1- Upload file to server.