true, 'total' => (int)$total, 'active' => (int)$active, 'workflows' => json_decode($workflows) ?: [] ]); } catch(Exception $e) { echo json_encode(['success' => false, 'error' => $e->getMessage()]); }