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

shaheenas113483 22-11-2019

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?

Accepted Solutions (1)

Accepted Solutions (1)

Vish_dhaliwal
Employee
26-11-2019

Hello,

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

Regards,

Vishu

Answers (5)

Answers (5)

nirmaljosehere 25-11-2019

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

shaheenas113483 27-11-2019

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?

shaheenas113483 25-11-2019

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  ...."

shaheenas113483 25-11-2019

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.