Do I add JavaScript code to a file rule?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2020 05:14 PM
Hi guys,
I want to know how to add JavaScript code to a file rule. My main idea is to execute a post method to send data to other software. I already have everything configured but it doesn't recognize the JavaScript code. I am following these steps. https://hub.alfresco.com/t5/alfresco-content-services-forum/call-external-class-by-javascript-in-rul...
Is there a simpler tutorial or another way to do it? I thank you for all your collaboration. Thank you.
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2020 02:57 AM
From https://docs.alfresco.com/community/references/rule-actions.html
Execute script | Runs a custom JavaScript script from the Data Dictionary/Scripts folder. There are a number of sample scripts available. The list can vary depending on how Alfresco Community Edition is configured for your organization. |
https://docs.alfresco.com/community/concepts/API-JS-intro.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2020 10:11 AM
Hi @angelborroy
Thank you very much for you helping..
I added my file in Data Dictionary/Scripts also Also I configure the rule to run my JS file. My problem is that any JS command that I add to the JS file gives me error. For example. I add just console.log ("Work Fine"); and this gives me error. I would like to know how I have to add the JS code in my file rules. And if possible a use case.
