Explorar o código

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

Ahmad Kholid hai 1 ano
pai
achega
22ae9a8340
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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 },
+        });
       });
     }
   });