From c02acfbb2723936ab869056a34fad44e555e03c9 Mon Sep 17 00:00:00 2001 From: Lalit Deore Date: Thu, 11 Jun 2026 14:41:30 +0530 Subject: [PATCH] fix - notification workflow execution issue --- notifications.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/notifications.go b/notifications.go index 1185bd2a..d4ca7d1d 100755 --- a/notifications.go +++ b/notifications.go @@ -313,6 +313,18 @@ func sendToNotificationWorkflow(ctx context.Context, notification Notification, return nil } + workflow, err := GetWorkflow(ctx, workflowId) + if err != nil { + log.Printf("[ERROR] Failed getting workflow %s: %s", workflowId, err) + } else if workflow.ExecutingOrg.Id != "" && workflow.ExecutingOrg.Id != authOrg.Id { + executionOrg, err := GetOrg(ctx, workflow.ExecutingOrg.Id) + if err != nil { + log.Printf("[ERROR] Failed getting execution org %s: %s", workflow.ExecutingOrg.Id, err) + } else { + authOrg = *executionOrg + } + } + //log.Printf("[DEBUG] Sending notification to workflow with id: %#v", workflowId) cachedNotifications := NotificationCached{}