Flows not triggering?

Georgi Yordanov
Kilo Contributor

Hello,

I am having a very strange experience with the Flow Designer.
I am developing a scoped application with its own tables and I am trying out the Flow Designer.
So what I want to do is to update the records and send emails when a certain 'State' is reached. Then I want to change the 'Stage' of the record through updating the record. The Flow should trigger when the 'State' field is updated and I have listed all of the states that there are with 'changes to'.find_real_file.png

So what is the problem you will ask? The problem is that the flow does not trigger or triggers with 2-3 minutes delay.
There is no problem when the flow has like 1 or 2 conditions but I am unable do to it with 1 condition because, yes you guessed 'changes' trigger does not work too. And btw I know if the flow is triggered or not, because all of the 'State'-s have own case. Can the problem be that I am using if - if else - if else and not only ifs? To make the things even more bizarre, when I test from the flow designer, the flow always works I will try to run it and will update you if I discover something. Adding even more salt to the wound is that I have another flow which triggers on creation and it works 100/100 cases!

Edit: I forgot to include some errors I get whenever I update a record which should trigger the flow, but the bad thing is that those errors are there even if the flow is inactive.
Java & JS error
Java error


Have a GREAT day 🙂

5 REPLIES 5

DirkRedeker
Mega Sage

Hi Georgi

You wrote, that the flow starts delayed. That behaviour is by design! (read the extract from Docs online below).

This behaviour may be different, when testing and when using in production (triggered).

find_real_file.png

Okay but that doesn't solve the problem I have. Sometimes it runs with a delay like 1/10 times and the other 9 times the flow does not trigger at all. And the other question that I have is, why does my first flow need like 10 seconds to trigger while this one needs 1-2 min ? At the current moment I am unable to trigger the flow AT ALL, except from the test. And by that I mean that I have made an action that logs a message whenever you enter the flow and changing the state & updating the record, does not make this message log, which means that the flow is not triggered AT ALL. Thanks for the explanation btw, but my problem is that I can not make the flow trigger...
By the way I just thought of something, does the flow apply to the currently created records, to all records in general or to the newly created?

Edit, I added a simple log action at the top and somehow the flow started to get triggered.. I have no explanation of what's going on... And I look at this as a temporary 'fix'.

Hi

Generally, the Flow is attached to the ONE Record, which met the triggering condition (like workflows do).

The reason, why some flows may start within a few seconds, and others within 1 or 2 minutes, may depend on the scheduler, working the queue of the events (described in DOCS above).

Remember: If you have a lot of events in the queue, it may take a "while" until your (desired) event can be processed.

So the mean time to start your flow is depending on:

a) how often does the scheduler run at all (e.g. all 60 seconds - may mean, it may run latest after 60 seconds, but also may start "immediately")

b) how many events may be in the queue BEFORE your event you are looking at. If there is a bad application design (meaning long running event processing in the queue), it may take minutes (or event hours or days...).

 

Remember: The queues are worked on in sequence.

 

Maybe your flows are all triggered, but not while you are looking for it?!?

Did you check, if the system is busy while you try out your tests?

 

Another question:

Do you have also OTHER flows on the same table, or maybe workflows configured on the same table.

Maybe there is a mixup of them?

 

Just an Idea.

Let me know, if that answers your question and mark my answer as correct and helpful, please.

BR

Dirk

You can read more about my problem in this knowledge article: KB0724913.
So what was wrong was that I triggered the flow right after insert, and changing it's state which means that the new state value was the display value of the corresponding value (it's not setting the state's value to 2, but to Review-  it's display and not actual value). I think that this is the problem. I have lost the flow, and am not able to test if that's the case, but I reworked it as a workflow and everything is working now.