Skip to content

Commit

Permalink
#20840 now when a content type has associated a non system workflow o…
Browse files Browse the repository at this point in the history
…n community license, shows the system workflow
  • Loading branch information
jdotcms committed Jun 15, 2022
1 parent 8de2a15 commit e2323c2
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,17 @@ public List<WorkflowStep> findStepsByContentlet(final Contentlet contentlet, fin
this.deleteWorkflowTask(this.findWorkFlowTaskById(workflowTaskId));
}

steps = Collections.emptyList();
// if it is the community license, has a diff workflow of the system workflow instead of removing the steps, use the first steps of the system workflow
if ((LicenseUtil.getLevel() < LicenseLevel.STANDARD.level) && null != workflowTaskId && !WorkflowAPI.SYSTEM_WORKFLOW_ID.equals(workflowTaskId)) {

final List<WorkflowStep> schemeSteps = this.findSteps(this.findSystemWorkflow());
if(UtilMethods.isSet(schemeSteps)){
final WorkflowStep step = schemeSteps.get(0);
steps.add(step);
}
} else {
steps = Collections.emptyList();
}
}

cache.addSteps(contentlet, steps);
Expand Down

0 comments on commit e2323c2

Please sign in to comment.