从6.3到6.5 AEM升级的迁移的工作流模型和脚本,未获取脚本

问题描述 投票:1回答:1

我将我的aem实例从6.3迁移到6.5,并且该模型得到了迁移,并且运行良好。但是带有脚本的工作流无法正常工作,因为它无法从该位置提取脚本(在将脚本迁移到新位置之前/之后都进行了检查,这是由于相同的错误)。 OOTB脚本也没有被选择使用。

错误:DEBUG org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactorycreateResource:路径中不存在JCR项'/apps/workflow/scripts/mine.ecma'DEBUG org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl资源null /apps/workflow/scripts/mine.ecmaDEBUG org.apache.sling.resourceresolver.impl.ResourceResolverImpl getResourceInternal:无法解析路径'/apps/workflow/scripts/mine.ecma'到资源错误 com.adobe.granite.workflow.core.rule.ScriptingRuleEngine找不到脚本资源/apps/workflow/scripts/mine.ecma。工作流程脚本可能需要位于/ libs或/ apps中才能执行错误 com.adobe.granite.workflow.core.rule.RuleEngineAdminImpl无法评估规则:/apps/workflow/scripts/mine.ecmacom.adobe.granite.workflow.WorkflowException:无法找到脚本资源/apps/workflow/scripts/mine.ecma,确保脚本是位于/ libs或/ apps中com.adobe.granite.workflow.core.rule.ScriptingRuleEngine.evaluate(ScriptingRuleEngine.java:112)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.rule.RuleEngineAdminImpl.evaluate(RuleEngineAdminImpl.java:53)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.WorkflowSessionImpl.evaluate(WorkflowSessionImpl.java:1369)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.jcr.WorkItemManager.resolveTransition(WorkItemManager.java:963)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.jcr.WorkItemManager.resolveTransition(WorkItemManager.java:991)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.jcr.WorkItemManager.getRoutes(WorkItemManager.java:676)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.WorkflowSessionImpl.getRoutes(WorkflowSessionImpl.java:993)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.job.JobHandler.getNextRouteToProcess(JobHandler.java:517)[com.adobe.granite.workflow.core:2.0.240]在com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:328)[com.adobe.granite.workflow.core:2.0.240]在org.apache.sling.event.impl.jobs.JobConsumerManager $ JobConsumerWrapper.process(JobConsumerManager.java:502)[org.apache.sling.event:4.2.12]在org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)[org.apache.sling.event:4.2.12]在org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access $ 100(JobQueueImpl.java:60)[org.apache.sling.event:4.2.12]在org.apache.sling.event.impl.jobs.queues.JobQueueImpl $ 1.run(JobQueueImpl.java:229)[org.apache.sling.event:4.2.12]在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)在java.lang.Thread.run(Thread.java:748)

任何帮助将不胜感激。

javascript workflow aem upgrade
1个回答
0
投票

我遇到了类似的问题-我得到了

“找不到方法org.apache.sling.scripting.core.impl.InternalScriptHelper.getService(object)。(/ etc / workflow / scripts /..../*。ecma”

我查看了代码,发现在获取resourceresolver时出现错误,似乎已经更改了,所以代替

var解析器= sling.getService(Packages.org.apache.sling.jcr.resource.JcrResourceResolverFactory).getResourceResolver(session);

用于此并且错误消失了

var解析器= sling.getRequest()。getResource()。getResourceResolver();

© www.soinside.com 2019 - 2024. All rights reserved.