From 1f80028042e1561d58b8a03a932fc4ab4a19090e Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Tue, 9 Sep 2025 11:58:45 +0200 Subject: [PATCH] Add enhanced debugging for trigger matching - Show detailed matching criteria for each trigger - Display typeMatch, collectionMatch, operationMatch for debugging - Help identify why triggers are not matching - Assists in troubleshooting workflow execution issues --- src/core/workflow-executor.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/core/workflow-executor.ts b/src/core/workflow-executor.ts index 5cd7d7d..b8c6000 100644 --- a/src/core/workflow-executor.ts +++ b/src/core/workflow-executor.ts @@ -1035,11 +1035,18 @@ export class WorkflowExecutor { triggerCount: triggers?.length || 0, triggers: triggers?.map(t => ({ type: t.type, + parameters: t.parameters, collection: t.parameters?.collection, collectionSlug: t.parameters?.collectionSlug, - operation: t.parameters?.operation - })) - }, 'Checking workflow triggers') + operation: t.parameters?.operation, + // Debug matching criteria + typeMatch: t.type === 'collection-trigger', + collectionMatch: (t.parameters?.collection === collection || t.parameters?.collectionSlug === collection), + operationMatch: t.parameters?.operation === operation + })), + targetCollection: collection, + targetOperation: operation + }, 'Checking workflow triggers with detailed matching info') const matchingTriggers = triggers?.filter(trigger => trigger.type === 'collection-trigger' &&