2016-10-24 07:54 AM
When I try to delete a custom dictionary that I no longer need I get:
"Server fault. Please refer to the logs for more info."
I have already deleted the workflow and command used by the dictionary.
From the logs:
2016-10-24 10:47:08,293 WARNING [org.mariadb.jdbc.internal.mysql.MySQLProtocol] (default task-12) Could not execute query sql : 'delete from wfa.dictionary_entry where id=?', parameters : : Cannot delete or update a parent row: a foreign key constraint fails (`wfa`.`workflow_command_mapped_object`, CONSTRAINT `fk_workflow_command_mapped_object_dictionary_entry_id` FOREIGN KEY (`dictionary_entry_id`) REFERENCES `dictionary_entry` (`id`))
2016-10-24 10:47:08,309 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-12) SQL Error: 1451, SQLState: 23000
2016-10-24 10:47:08,309 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-12) Cannot delete or update a parent row: a foreign key constraint fails (`wfa`.`workflow_command_mapped_object`, CONSTRAINT `fk_workflow_command_mapped_object_dictionary_entry_id` FOREIGN KEY (`dictionary_entry_id`) REFERENCES `dictionary_entry` (`id`))
I am new to WFA so not sure where to go from here. Thanks.
Solved! SEE THE SOLUTION
2016-10-25 12:21 AM
Thank you for attaching the log. Could you please provide below information too?
1. WFA version.
2. Is there any content which refers to the dictionary entry? If possible could you please share the custom content which you were developing by "Administration->Export All" operation, it will generate a dar file.
2016-10-25 06:19 AM
1. WFA Version
2. As far as I can tell, the only remaining items are the dictionary and scheme. I obviously can't delete the scheme because the dictionary is still around. Since other members on our storage team have already created a few workflows with company information, I am not comfortable exporting everything.
2016-10-25 08:22 AM
Again, I have not seen this problem, but have the following suggestion. If we think that something is referencing the dictionary/schema, we should be able to check that in each of the potential locations. So filter on your schema in each of the following locations and see if WFA shows any items.
1) First ensure that you have removed the data source (Execution)
2) Delete the Data Source Types (Designer)
3) Check Reservations (Execution)
4) Check Workflow Design Elements (Workflows, Finders, Filters, Commands, Templates)
5) Check Data Source Design Elements (Cache Queries)
6) Check the Schema to make sure it is not "locked"
7) Try to delete individual dictionary entries from the schema
It looks like a lot of things to check, but it should be quick and easy to see if something is referencing the dictionary/schema.
2016-10-26 09:53 PM
We were able to replicate the issue and these were the steps that was followed.
My guess is that, there might be something similar done in your setup too when the problem occured.
- Create a dictionary entry
- Create a command where one of the parameter was mapped to some attribute of this dictionary entry
- Create a workflow that uses this command
- Deletion of dictionary entry at this stage will obviously fail due to references to it from command
- Now modify the command such that the parameter is no more mapped to that dictionary entry. So, the relation from command to dictionary entry is no more there
- Now try deleting the dictionary entry
- It fails with the "server fault" error.
- Reason is: In WFA, when the command was updated, the workflow step definitions which referred to the command was not yet updated.
WFA does it, but only when the workflow is referred to next, i.e next time someone opens it or previews it or executes it.
However, I agree that the error was misleading and it should be handled better. So, I have filed the bug #1046125 to handle this scenario better.