Active IQ Unified Manager Discussions

Server Fault Deleting Custom Dictonary

Mogley766
9,217 Views

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 : [85]: 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.

1 ACCEPTED SOLUTION

shailaja
9,028 Views

Hi,

 

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.

 

Thanks,
Shailaja

View solution in original post

9 REPLIES 9

geringer
9,212 Views

Just a guess, but have you tried to reset your schema and then delete the dictionary?

Mogley766
9,206 Views

Thanks for the quick response.

 

Sorry, I should have mentioned that I did try resetting the schema, but didn't have any luck.

anuk
9,172 Views

Could you please graniteds.log file as well?

Mogley766
9,154 Views

Log attached.  Thanks.

anuk
9,123 Views

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. 

 

Regards

Anu

Mogley766
9,107 Views

1.  WFA Version

 

Version:  4.0.0.0.0

Build:  3670333

 

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.

geringer
9,095 Views

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.

 

Mike

 

Mogley766
9,064 Views

Still no luck.

 

At this point, I restored the database to the day before and I have not encountered the problem again.

 

Thanks for all the help.

shailaja
9,029 Views

Hi,

 

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.

 

Thanks,
Shailaja

Public