mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
setWorkflowExecutionRunData fix
This commit is contained in:
parent
41512376a0
commit
d7a60611e2
|
@ -321,7 +321,7 @@ const nodeTitle = computed(() => {
|
|||
const waiting = computed(() => {
|
||||
const workflowExecution = workflowsStore.getWorkflowExecution as ExecutionSummary;
|
||||
|
||||
if (workflowExecution?.waitTill) {
|
||||
if (workflowExecution?.waitTill && !workflowExecution?.finished) {
|
||||
const lastNodeExecuted = get(workflowExecution, 'data.resultData.lastNodeExecuted');
|
||||
if (props.name === lastNodeExecuted) {
|
||||
const node = props.workflow.getNode(lastNodeExecuted);
|
||||
|
|
|
@ -325,7 +325,8 @@ export function useCanvasMapping({
|
|||
if (workflowExecution && lastNodeExecuted && isExecutionSummary(workflowExecution)) {
|
||||
if (
|
||||
node.name === workflowExecution.data?.resultData?.lastNodeExecuted &&
|
||||
workflowExecution.waitTill
|
||||
workflowExecution?.waitTill &&
|
||||
!workflowExecution?.finished
|
||||
) {
|
||||
const waitDate = new Date(workflowExecution.waitTill);
|
||||
|
||||
|
|
|
@ -345,24 +345,27 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof u
|
|||
const resolveWaitingNodesData = async (): Promise<void> => {
|
||||
return await new Promise<void>((resolve) => {
|
||||
const interval = setInterval(async () => {
|
||||
const execution = await workflowsStore.getExecution(executionId as string);
|
||||
const execution = await workflowsStore.getExecution((executionId as string) || '');
|
||||
localStorage.removeItem(FORM_RELOAD);
|
||||
|
||||
if (!execution || workflowsStore.workflowExecutionData === null) {
|
||||
clearInterval(interval);
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
if (execution.finished || ['error', 'canceled', 'crashed'].includes(execution.status)) {
|
||||
workflowsStore.setWorkflowExecutionData(execution);
|
||||
nodeHelpers.updateNodesExecutionIssues();
|
||||
uiStore.removeActiveAction('workflowRunning');
|
||||
clearInterval(interval);
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
if (execution.data) {
|
||||
if (execution.data?.waitTill) {
|
||||
workflowsStore.setWorkflowExecutionRunData(execution.data);
|
||||
} else {
|
||||
console.log(execution);
|
||||
}
|
||||
|
||||
if (execution.status === 'waiting') {
|
||||
|
@ -373,7 +376,6 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof u
|
|||
waitingNode.type === WAIT_NODE_TYPE &&
|
||||
waitingNode.parameters.resume === 'form'
|
||||
) {
|
||||
localStorage.removeItem(FORM_RELOAD);
|
||||
const testUrl = getFormResumeUrl(waitingNode, executionId as string);
|
||||
|
||||
if (isFormShown) {
|
||||
|
|
Loading…
Reference in a new issue