Use wfrefchk.sql to check for invalid workflow data that is missing primary key data for a foreign key.
sqlplus <user> @wfrefchk Enter password: <password>