Parcourir la source

feat: support workflow variable in workflow event (#1390)

Ahmad Kholid il y a 1 an
Parent
commit
22ae9a8340
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/workflowEngine/index.js

+ 4 - 1
src/workflowEngine/index.js

@@ -113,7 +113,10 @@ export function startWorkflowExec(workflowData, options, isPopup = true) {
         if (status === 'error' && !event.events.includes('finish:failed'))
           return;
 
-        workflowEventHandler(event.action, { workflow: workflowRefData });
+        workflowEventHandler(event.action, {
+          workflow: workflowRefData,
+          variables: { ...engine.referenceData.variables },
+        });
       });
     }
   });