Expand my Community achievements bar.

how to deploy ecma script on aem cloud

Avatar

Level 1

I'm looking for a way to upload or deploy ecma script in aem cloud in order to create custom workflow

Thanks

3 Replies

Avatar

Employee Advisor

Hi @AlexBorgo ,

 

Here's an article talking about ECMAScript :
https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-wor...


The article says :

Store your custom scripts in, for example, the /apps/myapp/workflow/scripts folder, or a subfolder.

Then you can simply include the script in your codebase (analogous to including overlays in code).
Add a filter in META-INF/filter.xml to get the mentioned path as part of code deployment.

This strategy should work for AEMaaCS as well older versions.

Thanks,

Milind

Avatar

Community Advisor

Hi @AlexBorgo ,
Store ecma script in your project specific filter. There is no fix rule but try to keep under workflow folder as 

/apps/<your-project>/workflow/scripts

You have to make sure this script should has property "jcr:mixinTypes" and it's one of the value should be "mix:title". You can have other values to. 
Add a filter in META-INF/filter.xml as per your code. 
Make sure you don't over write this location by Repository Initialization (repoinit) config. Generally, code location not overwritten by repo init config. But as you are using aem cloud, just make sure you don't over write this.