admin管理员组

文章数量:1026989

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?

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?

本文标签: javascriptFailing to understand quotOR splitquot in AEM workflowStack Overflow