Dnn.Platform
Dnn.Platform copied to clipboard
[Enhancement]: Improve custom html workflow migration
Is there an existing issue for this?
- [x] I have searched the existing issues
Description of problem
In DNN 9, the HTML module relied on legacy workflows with only two built-in options. However, some advanced users manually created and used custom HTML workflows by extending the available tables.
Upon upgrading to DNN 10, the current migration logic offers only basic support for these custom workflows. As a result, some of them are not correctly migrated into the DNN Content Workflow system, causing invalid workflow states post-upgrade.
Description of solution
Implement C# code to migrate legacy custom HTML workflows to DNN content workflows.
- Iterate over portals, html wokflows, html workflow states
- Use
IWorkflowManagerto create content workflows per portal. - Map legacy workflows (
Workflow,WorkflowStates) to content workflows (ContentWorkflows,ContentWorkflowStates) by matching order and required states. - Support built-in workflows ("Direct Publish", "Content Staging") and detect or create equivalents.
- Preserve per-portal and multi-language context.
- Ensure "Published" is always the last state and required.
- Create helper to return mapped
ContentWorkflowStateIDfor any legacyWorkflowStateID.
This approach improves maintainability and avoids complex SQL logic.
Description of alternatives considered
No response
Anything else?
No response
Do you be plan to contribute code for this enhancement?
- [x] Yes
Would you be interested in sponsoring this enhancement?
- [ ] Yes
Code of Conduct
- [x] I agree to follow this project's Code of Conduct