0

I'm trying to remove a Workflow instance from a Feature. But every time I uncheck the workflow and recreate the feature, the workflow gets deleted.

Now I know that with Views, Panels and other entities, all you have to do is to edit it, and it will be shown as overwritten (meaning it is using the database instead of code from the feature), and you can then safely remove it from the feature.

If I edit and save the workflow, it gives me a Revert link in the workflow menu. Yet if I then remove it from the feature, the workflow still gets deleted.

I've tried exporting the workflow and re-import it after removing, but then is just added with a new id (WID), which opens another can of worms on my site.

When I edit and save the workflow, I see in the workflow table in the db that the exportable status change from 2 to 3. I don't know what all the allowable statuses are. But this might be something to look into.

0

It looks like you've tried alot of possible solutions with mixed success.

A method I'm not certain you've tried is to apply a patch to Features 2.x for Drupal7 that Provides a way to Import Views/true exportables back to the database.

This patch creates a new tab in the Features Admin area called Import if you select the items in the selected Feature to import back to the database, it will then attempt to import the exportable back to the database. Unfortunately as some users note in the thread -- you may not receive a confirmation message that it was successful or not. Recent versions of this patch may have addressed this lack of a status message -- I used this module months ago to move about a dozen features out of Features and back into plain/simple database configuration.

There is also discussion in the thread about Drush Ctools Export Bonus. But I found this module difficult to use and produced an error with (i think) field_group stuff at the time.

  • I had a look at that patch, but I see it has problems with other modules and I am still not convinced it will work with work flow. I manage to fix this. Will answer – Quentin Campbell Sep 19 '17 at 7:58
0

It seems to me that Workflow does not work with id's (WID, SID...) but on the machine name when using Features.

After removing Workflow from Features (Which delete the Workflow), I then empty out the db tables for workflow_states and workflow transitions. And then:

ALTER TABLE tablename AUTO_INCREMENT = 1

on workflows, workflow_states and workflow_transitions tables.

Then I imported the original exported code and all is well.

Just note, I only have one Workflow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.