Expand my Community achievements bar.

SOLVED

Migration of workflow from /etc to /var for 6.5 to 6.5 upgrade

Avatar

Level 4

I migrated my custom workflow model from /etc to /var and scripts from /etc to /apps. But on execution of the workflow I am getting the below error:

"...  com.adobe.granite.workflow.core.rule.ScriptingRuleEngine Could not find script resource /apps/workflow/scripts/new.ecma.  Workflow Scripts may need to be located in /libs or /apps to be executed  ...."

I have crossed check my workflow. It refers to the script at path /apps/workflow/scripts/new.ecma but on execution it is not able to find the resource.

Is there anything that I missed out which might be causing this issue?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hello,

You have to explicitly give Read permission to workflow-service (initiates the workflowSession) to this new location /apps/workflow/scripts.

Regards,

Vishu

View solution in original post

8 Replies

Avatar

Employee Advisor

Can you please confirm you have done all the workflow related movements as mentioned in Common Repository Restructuring in AEM 6.4

Also please ensure you have synced the workflow models on edit page of models from http://localhost:4502/libs/cq/workflow/admin/console/content/models.html

it will come like below at the top right once synced.

Screenshot 2019-11-25 at 12.52.51.png

Avatar

Employee Advisor

Also, check permissions of the workflow-service user to these scripts at the given paths.

Thanks,

Wasil

Avatar

Level 4

Im following that document for the migration, and I had migrated all the workflow model and instances to the new location. But, when I migrated the scripts I got the error that I had mentioned.

Avatar

Level 4

To /etc/workflow i have this:

image1.png

and to /etc/workflow/scripts i have this:

image2.png

This is post migration and I am still getting similar error:

"...  com.adobe.granite.workflow.core.rule.ScriptingRuleEngine Could not find script resource /etc/workflow/scripts/new.ecma.  Workflow Scripts may need to be located in /libs or /apps to be executed  ...."

Avatar

Correct answer by
Employee

Hello,

You have to explicitly give Read permission to workflow-service (initiates the workflowSession) to this new location /apps/workflow/scripts.

Regards,

Vishu

Avatar

Level 1

How do we change the location of the generated-packages from etc/workflow/packages to var/workflow/packages?

Avatar

Level 4

Thanks Wasil and Vishu, that permission fixed the problem partially.

The behaviour of my custom workflow seems to be a little peculiar. For some workflow models, the scripts are getting picked and complied correctly, whereas for some other, I am getting the above error that the script doesn't exist [even though it does]. Any help on that?

Avatar

Level 3
Hello @ shaheenas113483, I have same problem with my new instance AEM 6.5. Workflows work well, but some scripts are not found. How did you fix this error? Thanks