Question regarding Flow Executing

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Question regarding Flow Executing

Post by husky » 12 May 2017 12:41

Hello,

I'm trying to set up a way to check whether or not a particular flow X is already executing.
From what I understand, Flow Executing sholuld give me the answer.

So, set condition true if flow X is executing and issue a warning. if not, simply start flow X.

Reasoning:

Avoid starting a flow that is already up and running.

The Problem:

No matter the Flow X status, the Flow Executing always exits on the true side, ie, it acknlowledges an execution that is not there.

The Question:

What am I missing here?

Why Flow Executing does not recognize Flow X status "NOT executing" ?


Thank You


Husky
"Basic research is what I'm doing when I don't know what I'm doing"

User avatar
Philip
Posts: 82
Joined: 08 Jun 2015 19:20
Location: Hampshire, UK

Re: Question regarding Flow Executing

Post by Philip » 12 May 2017 17:57

Not sure why it's not working, but couldn't you achieve your objective using Skip execution when an instance is already executing in the flow's options?
--
Philip

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Question regarding Flow Executing

Post by husky » 12 May 2017 19:08

Phillip,


Thanks for the reply.



Setting the Skip (locally or Globally) does not work either.

Since this is flow that runs once a day and then does nothing more, my guess is that the flow is "dormant" or whatever.

So every click on the widget, is treated as a new run.

The whole idea was avoiding erroneus click on the widget and restart what does not need to be restarted.

I wonder if this has any workaround.


Anyway, thanks for the hint. Let you knoe if I can come up with a better explanation.


Regards


Husky
"Basic research is what I'm doing when I don't know what I'm doing"

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Question regarding Flow Executing

Post by Scotty » 12 May 2017 19:31

I use that condition in several flows - it works fine (i.e., it correctly recognizes both TRUE and FALSE conditions).

The only thing that I can come up with is this: are you certain that the flow that is being queried is not actually running? If you look at it in the main Automagic window, is it red (indicating that it is actively running) or teal (indicating that it's enabled, but not actively running)?

EDIT: I just noticed your second post, in which you wrote: So every click on the widget, is treated as a new run. The whole idea was avoiding erroneus click on the widget and restart what does not need to be restarted.

I am probably mis-interpreting that text, but it looks as if (i) you click the widget, which (ii) runs the flow that contains the "flow executing" condition, and (iii) that then checks whether ITS OWN FLOW (i.e., the one execute by the widget-click) is actively executing - in which case, of course, the answer will always be TRUE....

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Question regarding Flow Executing

Post by husky » 13 May 2017 12:21

Hi Scotty,

Thanks for the reply.

Well, I ran a couple of tests and I can't explain it in other term than IBM mainframe. My guess is that would be a bit of Greek to you.

Bottom line: If I use a "Starter" flow to kick-off the main flow(Start-Flows), any new run of the "Starter" flow will execute Start-Flows from the top even if it had already been executed.

If the check is within the Start-Flows( no "Starter" flow) ends in TRUE as you pointed out.

So, to make a long story short, I found a workaround, not very elegant, but it does work.
Set up a flat file, with flag of 0 for first run and at the end of the run change the 0 to 1 (do not run this flow again).
0= first run
1=do not run the flow again


The other flow, Stop-Flows, when called (clicked), will reset the flag from 0 to 1.

Pretty dumb solution if you ask me but works fine at the expense of one I/O.


Regards

Husky
"Basic research is what I'm doing when I don't know what I'm doing"

Post Reply