Js code in APS doesn't work in alfresco development framework ADF

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2023 06:59 AM
I'm using Alfresco process services. In the form editor in the JavaScript section, I wrote a JS code that does an AJAX call on the form rendered event to retrieve some information and add them to the form, all this is working fine. However, when I developed a new interface using ADF these scripts doesn't work.
How can I fix this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2023 02:28 PM
Hello @kmamine ,
Have you wrapped your js (I suppose vanilla) code, into the Angular environment?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2023 05:53 AM
I could get the JS script, but the problem is that I have to convert it to typescripts before execute it in angular. I was looking for a cleaner way, but it seems there is none.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2023 06:48 AM
I've wanted to the same thing a while ago with the ADW instead of an ADF app and as far as I am concerned there is no way to execute the APS JS code from the ADW/ADF app because of different major versions of angular. Since APS uses angular 1.x and ADW/ADF uses angular2+. At least that is what I've been told.
What you can do is let your ADF app execute the JS code and access APS variables/elements to manipulate them. You could add custom stencils in APS and the corresponding code in the ADF app.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2023 05:55 AM
I could access the APS code, but to execute it, it has to be compatible with typescript.
