prepare("UPDATE process_definitions SET definition_json = :json, start_node_id = 'awaiting_call' WHERE id = 4"); $stmt->execute([ ':json' => $json_definition, ]); echo "Updated process_definition_id=4 with the new follow-up workflow.\n"; // Deactivate process_definition_id=3 $stmt = $pdo->prepare("UPDATE process_definitions SET is_active = 0 WHERE id = 3"); $stmt->execute(); echo "Deactivated process_definition_id=3 ('guest_handling').\n"; } // Direct execution guard if (basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) { try { update_process_definition(); } catch (Exception $e) { echo "Failed to update process definitions: " . $e->getMessage() . "\n"; } }