Knowledge Base

Import Error due to Workflow

  • 80views
  • February 6, 2024

Import Error due to Workflow

When you import a document of a DocType which has a workflow, you shouldn’t be able to set the workflow_state to a state except the first.
For example, your Workflow has 4 states: DraftSent for ApprovalApprovedRejected.

When preparing records for import using the Data Import Tool and setting the workflow_state of each record to “Approved,” you may encounter an issue. The system will not permit this action because you’re transitioning from the state “Draft” to “Approved,” which isn’t a valid transition according to your workflow settings.

To resolve this, you can disable the workflow, import your data, and then enable the workflow again. This will allow you to import the records successfully without violating the workflow transitions.