Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-12653

[SearchModel] workflowStep criterion: enumerator configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.9.8, 4.10.0
    • 4.9.6
    • None
    • None

      In search models, when we want to use a different workflow than the default one (content) in a criterion, we currently often defined the criterion like this:

      <item ref="workflowStep">
          <enumeration>
              <custom-enumerator class="org.ametys.cms.workflow.DefaultWorkflowStepEnumerator">
                  <workflow-name>program</workflow-name>
                  <exclude-workflow-steps>
                      <id>9999</id>
                  </exclude-workflow-steps>
              </custom-enumerator>
          </enumeration>
      </item>

      But, all this definition is ignored because the only way to override the enumerator is like this:

      <item ref="workflowStep">
          <workflow name="program"/>
      </item>

      According to WorkflowStepSystemProperty, workflow steps greater or equals than 9000 and equals to 0 are ignored.

      So by side-effect, and because our workflows are consistent, it is quietly invisible in most cases.

      Maybe the WorkflowStepEnumerator should be able to get the defined enumeration if it is defined in the configuration.
      Also we are able to define the workflowStep configuration correctly with a simple modification in the existing search models.

            Unassigned Unassigned
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: