I have 2 work flow 'A' and 'B', after deleted 'B', run cron and flush caches, the states of 'B' still shows in rules.
aadd

Comments

Workflow states aren't being deleted when a workflow is deleted. Thats the root of the problem. I deleted a workflow and the states associated with that workflow still exist in the database.

Status:Active» Closed (duplicate)

You are correct. They aren't deleted.

See: #1347116: States don't get removed when a workflow is deleted

Deleting or not deleting the states is something that I need to track down with the older maintainers to determine what the design decision on this was, and why they weren't being deleted.

I'm closing this ticket as it's a duplicate of the existing ticket, and should be handed on that one.