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

Default workflow for each content type

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 4.4.0
    • 4.4.0
    • None
    • None
    • 4.4 RC4

      Define the workflow in the XML definition of the content type to specify it.
      A Java method Optional<String> getDefaultWorkflowName() should be available on ContentType class. This method should be overridable.

      The value returned by the method should be define at initialization. Default implementation should be:

      1. Read XML definition of the content type in override mode
      2. Read XML definition of the content type in normal mode
      3. Read XML definition of the parent's content type (override then normal)
      4. If tag "reference-table" is defined, return "reference-table" workflow
      5. Otherwise, return "content"

      XML syntax example:

      <cms:content-type>
          <cms:label i18n="true">PLUGINS_ODF_COURSE_CONTENT_LABEL</cms:label>
          <cms:description i18n="true">PLUGINS_ODF_COURSE_CONTENT_DESCRIPTION</cms:description>
          <cms:default-title i18n="true">PLUGINS_ODF_COURSE_CONTENT_DEFAULT_TITLE</cms:default-title>
          <cms:default-workflow>course</cms:default-workflow>
          [...]
      </cms:content-type>

      Where <cms:default-workflow> is an optional tag. If it's not present, we follow rules 4 then 5 defined above.

      In the case of a content with several content types or without a specific workflow defined at the first level of the content (by inheritance), we will search to all workflows corresponding to these types:

      • If they are the same, the unique value is returned
      • If there is no workflow defined, previous rules 4 and 5 are applied
      • If they are different, we return an empty Optional

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

              Created:
              Updated:
              Resolved: