Flow Designer - Creating duplicate tasks when "update record" action is first action after trigger condition.

IndianaJones
Tera Expert

We want to update the additional comments of the requested item to let the end user know their request has been received and a service desk technician will be reaching out to them. This works fine if the flow trigger is configure to "run flow in background". What we have noticed that if we choose to run the flow "in the foreground" that the update record causes the flow to create 10 tasks of the first catalog task and also create 10 executions of the flow itself. Is there a way to fix this? We want to run this flow in the foreground because the tasks are sequential and we want them to load accordingly when someone closes the next task. Is there a way to update the RITM after it is created without these duplicate tasks being generated?

 

In the screenshot below, if I remove this update record action, the flow works as intended. I saw in another forum to add a wait condition (which I tried, it waits for 5 seconds) but that does not seem to resolve the duplicate task creations. 

find_real_file.png

 

Screen shot of that first task, but it created 10 of the same task.

find_real_file.png

 

 

Executions of the 1 flow being requested.

find_real_file.png

1 ACCEPTED SOLUTION

Yes I understand now what you mean now.

Just to confirm; did you add the timer before the Update Record action? The support article here has that suggested fix:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0963931

Failing this, I'm all out of ideas other than reverting to run in the background.

Geoff

View solution in original post

7 REPLIES 7

Geoff_T
Mega Sage

Hi,

I have experienced the same issue and I switched to run flow in background (you mention this works already).

You said - We want to run this flow in the foreground because the tasks are sequential and we want them to load accordingly when someone closes the next task

Not sure I understand your issue here. The flow is executed asynchronously; the tasks etc within depend on how you configure them. If you check the 'Wait' checkbox in each of the catalog tasks, the first one needs to be completed before the next and so on. Therefore they will be completed sequentially.

Geoff

To clarify on the catalog tasks being sequential. What I have noticed is if you close a catalog task, the UI doesnt update in time if the flow runs in the background. So you have to reload the page on the RITM for the stage to update or the next task to show in the related list. 

Yes I understand now what you mean now.

Just to confirm; did you add the timer before the Update Record action? The support article here has that suggested fix:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0963931

Failing this, I'm all out of ideas other than reverting to run in the background.

Geoff

Unfortunately I have tried this and it does not seem to fix the issue. As a different solution, is there a way for the related tasks/ritm to update without needing the page refresh? If I could solve that issue, then I can move the flow back to running in the background.