If you want to remove a workflow configuration and you get this message “Instances of this workflow are currently running. The workflow cannot be deleted.” then as the message mentions you have documents still in the system related to that workflow that need to be cleaned up. The best option is just to re-call them which sets them back to the state before the user hit the submit button. But this might not be case all the time so review the needs in your organization you might have to wait till that document is approved so you might have to chase up who it is assigned to first. Once you have worked out if you can recall or they need to be processed then you need to work out what documents to deal with. This can be done by looking at the workflow history.
Here is a quick overview.
AX2012 R3 CU9.
While I used CU9 in this example this process is the same in any release of AX2012.
Cheers
Lachlan