-
Improvement
-
Resolution: Fixed
-
Major
-
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:
- Read XML definition of the content type in override mode
- Read XML definition of the content type in normal mode
- Read XML definition of the parent's content type (override then normal)
- If tag "reference-table" is defined, return "reference-table" workflow
- 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
- testing discovered
-
CMS-10798 Computed and defined default workflow name should be differentiate
- Closed