最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - Failing to understand "OR split" in AEM workflow - Stack Overflow

matteradmin8PV0评论

I have a workflow.

In the first step it sets a variable called language.

WorkflowData data = workItem.getWorkflow().getWorkflowData();
data.getMetaDataMap().put("language", "English");
workflowSession.updateWorkflowData(workItem.getWorkflow(), data);

Next is "OR SPLIT", it has 2 branches with ECMA script First branch is checked with default and has following

function check(){
   var action = workflowData.getMetaDataMap().get("language");
   return (action == "en_US");
}

Second branch has only,

function check(){
   return true;
}

When the flow runs through first branch, it works fine. If it goes through second branch I face following error.

.adobe.granite.workflow.WorkflowException: No route found to continue from step node1 in model /etc/workflow/models/example/jcr:content/model. Probably a configuration error.
    at .adobe.granite.workflow.core.WorkflowSessionImpl.getRoutes(WorkflowSessionImpl.java:734)
    at .adobe.granite.workflow.core.job.HandlerBaseplete(HandlerBase.java:497)
    at .adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:336)
    at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:512)
    at org.apache.sling.event.impl.jobs.queues.JobRunner.run(JobRunner.java:205)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

I have a workflow.

In the first step it sets a variable called language.

WorkflowData data = workItem.getWorkflow().getWorkflowData();
data.getMetaDataMap().put("language", "English");
workflowSession.updateWorkflowData(workItem.getWorkflow(), data);

Next is "OR SPLIT", it has 2 branches with ECMA script First branch is checked with default and has following

function check(){
   var action = workflowData.getMetaDataMap().get("language");
   return (action == "en_US");
}

Second branch has only,

function check(){
   return true;
}

When the flow runs through first branch, it works fine. If it goes through second branch I face following error.

.adobe.granite.workflow.WorkflowException: No route found to continue from step node1 in model /etc/workflow/models/example/jcr:content/model. Probably a configuration error.
    at .adobe.granite.workflow.core.WorkflowSessionImpl.getRoutes(WorkflowSessionImpl.java:734)
    at .adobe.granite.workflow.core.job.HandlerBase.plete(HandlerBase.java:497)
    at .adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:336)
    at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:512)
    at org.apache.sling.event.impl.jobs.queues.JobRunner.run(JobRunner.java:205)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Share Improve this question edited Feb 24, 2016 at 12:46 Dileepa asked Feb 24, 2016 at 11:40 DileepaDileepa 1,0392 gold badges16 silver badges42 bronze badges 2
  • could you post your workflow model definition? – awd Commented Feb 24, 2016 at 12:29
  • Added model screenshot – Dileepa Commented Feb 24, 2016 at 12:47
Add a ment  | 

1 Answer 1

Reset to default 6

have you tried adding a no operation step to the second branch?

Post a comment

comment list (0)

  1. No comments so far