What is the order of migration?
The high-level steps are:
Plan your migration with your team and stakeholders
Migrate your content, current workflow state and users using the Confluence Cloud Migration Assistant
Apply the cloud workflow to the newly migrated space (after you have it prepared in a test space)
If you are using a custom workflow, you will need to recreate your workflow using the workflow builder or the code editor. If the custom workflow is used in several spaces, simply copy the workflow code and paste it into the code editor in the destination space Document Management dashboard. There is no option to add and manage a workflow at global level.
You can use workflow translator in your server app to convert a custom workflow to cloud JSON code. The workflow translator tool highlights and unsupported server workflow functionality that cannot be translated to Cloud.