Create a static web site from a Script by applying transformation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 06:50 AM
One of the feature I am missing from old Alfresco, it's not the AVM itself but its ability to create a static web site, from WCM Web Form.
However I found out I can easily replicate this behaviour with script and transformation services.
I built a Script which reads every node on a specific folder and apply an ftl to each of them. In the end I have a nice static html site, ready to be transferred with FSTR.
Altough it's working (currently there are nearly 60 nodes), I wonder if in terms of performance and Alfresco way of working (and Java garbage issue) the Script is the correct way to deal with this, or if a Java Backed Script is rather to be preferred.
However I found out I can easily replicate this behaviour with script and transformation services.
I built a Script which reads every node on a specific folder and apply an ftl to each of them. In the end I have a nice static html site, ready to be transferred with FSTR.
Altough it's working (currently there are nearly 60 nodes), I wonder if in terms of performance and Alfresco way of working (and Java garbage issue) the Script is the correct way to deal with this, or if a Java Backed Script is rather to be preferred.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 11:05 AM
I can think of business rule in this scenario. You should set up a business rule on your folder to execute the script to apply ftl on incoming node and also anytime a node is updated. This way you will not have to scan through all the nodes in one go. Instead it is applying fti on a node as soon as it is added/updated to the folder.
Hope this helps.
Hope this helps.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2014 10:42 AM
Thanks for your reply.
Transforming the nodes one by one at once by means of Script, results in CPU hanging at 99% due to lot of Java Garbage Collection going on.
So I suppose the Script is not the correct way to go. Having said that, the idea of transforming a node once published is quite nice.
However I already have in place a Web Quick Start Web site, and seems that the publishing content workflow doesn't trigger the "on any created/deleted document" rule applied on Publishing folder, there's a specific question by me on the Web Content Services section. If you would like to give a comment…
Transforming the nodes one by one at once by means of Script, results in CPU hanging at 99% due to lot of Java Garbage Collection going on.
So I suppose the Script is not the correct way to go. Having said that, the idea of transforming a node once published is quite nice.
However I already have in place a Web Quick Start Web site, and seems that the publishing content workflow doesn't trigger the "on any created/deleted document" rule applied on Publishing folder, there's a specific question by me on the Web Content Services section. If you would like to give a comment…
