Hi there,
Newbie here. Does anyone know of a good working example of a workflow step written in Ecma Script? Also, looking for some step-by-step or best practices in building workflow step using Ecma Script.
Thanks,
-Leo
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Please follow https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-wor...
You can see example scripts under /libs/workflow/scripts/ but as mentioned in the documentation do not change anything there. You will have to create a structure under /apps and add the file there.
Eg
var workflowData = graniteWorkItem.getWorkflowData(); if (workflowData.getPayloadType() == "JCR_PATH") { var path = workflowData.getPayload().toString(); var jcrsession = graniteWorkflowSession.adaptTo(Packages.javax.jcr.Session); var node = jcrsession.getNode(path); //Custom code - some action on the node.. }
Here - https://experienceleague.adobe.com/docs/experience-manager-64/forms/workflows/dynamically-select-a-u... two scrips under " /apps/fd/dashboard/scripts/" is described
More links -https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-wor...
Hi,
Please follow https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-wor...
You can see example scripts under /libs/workflow/scripts/ but as mentioned in the documentation do not change anything there. You will have to create a structure under /apps and add the file there.
Eg
var workflowData = graniteWorkItem.getWorkflowData(); if (workflowData.getPayloadType() == "JCR_PATH") { var path = workflowData.getPayload().toString(); var jcrsession = graniteWorkflowSession.adaptTo(Packages.javax.jcr.Session); var node = jcrsession.getNode(path); //Custom code - some action on the node.. }
Here - https://experienceleague.adobe.com/docs/experience-manager-64/forms/workflows/dynamically-select-a-u... two scrips under " /apps/fd/dashboard/scripts/" is described
More links -https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/extending-wor...