I migrated my aem instance from 6.3 to 6.5 and the model got migrated and are working well. But the workflow with scripts are not working because it is not able to pick up the script from the location (checked both before/after migrating scripts to new locations it was through same error). The OOTB scripts are also not getting picked for usage.
Error:
*DEBUG* org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory createResource: No JCR Item exists at path '/apps/workflow/scripts/mine.ecma'
*DEBUG* org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl Resource null /apps/workflow/scripts/mine.ecma
*DEBUG* org.apache.sling.resourceresolver.impl.ResourceResolverImpl getResourceInternal: Cannot resolve path '/apps/workflow/scripts/mine.ecma' to a resource
*ERROR* com.adobe.granite.workflow.core.rule.ScriptingRuleEngine Could not find script resource /apps/workflow/scripts/mine.ecma. Workflow Scripts may need to be located in /libs or /apps to be executed
*ERROR* com.adobe.granite.workflow.core.rule.RuleEngineAdminImpl Cannot evaluate rule:
/apps/workflow/scripts/mine.ecma
com.adobe.granite.workflow.WorkflowException: Unable to find script resource /apps/workflow/scripts/mine.ecma, make sure scripts are located in /libs or /apps
at com.adobe.granite.workflow.core.rule.ScriptingRuleEngine.evaluate(ScriptingRuleEngine.java:112) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.rule.RuleEngineAdminImpl.evaluate(RuleEngineAdminImpl.java:53) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.WorkflowSessionImpl.evaluate(WorkflowSessionImpl.java:1369) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.jcr.WorkItemManager.resolveTransition(WorkItemManager.java:963) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.jcr.WorkItemManager.resolveTransition(WorkItemManager.java:991) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.jcr.WorkItemManager.getRoutes(WorkItemManager.java:676) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.WorkflowSessionImpl.getRoutes(WorkflowSessionImpl.java:993) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.job.JobHandler.getNextRouteToProcess(JobHandler.java:517) [com.adobe.granite.workflow.core:2.0.240]
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:328) [com.adobe.granite.workflow.core:2.0.240]
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502) [org.apache.sling.event:4.2.12]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293) [org.apache.sling.event:4.2.12]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [org.apache.sling.event:4.2.12]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229) [org.apache.sling.event:4.2.12]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Any help would be appreciated.