I’m trying to run a Workflow function that sends an email when a case’s status is changed. The modules are all custom except Users. The Workflow is not firing, and this error is showing up repeatedly in the log:
Thu Oct 8 14:24:03 2015 [FATAL] Query Failed: FROM cdata_assignments WHERE NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.aow_workflow_id=‘1e9d0647-042d-ed41-1cae-556783e1d63a’ AND aow_processed.parent_id=cdata_assignments.id AND aow_processed.status = ‘Complete’ AND aow_processed.deleted = 0) AND cdata_assignments.deleted = 0 : MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘FROM cdata_assignments WHERE NOT EXISTS (SELECT * FROM aow_processed WHERE aow_’ at line 1
I know I’m only replying to myself here, but maybe this will help someone else down the line. It looks like there are two separate problems. The one with the MySQL syntax is solved by changing line 169 in /modules/AOW_WorkFlow/AOW_WorkFlow.php like so:
$query .= ’ FROM ’ .$module->table_name.’ ';
$query .= ‘SELECT * FROM ’ .$module->table_name.’ ';
Still working on the second problem, which appears to be related to creating unique IDs when adding records to the tracker table.