Jump to content

Folder Conditions


Algorithm

Recommended Posts

The programs continue to run, although this may not be the best semantics.

 

You can stop the programs explicitly, as in the following example. Make sure 'Program A' is not in the Folder, and that 'Program 1' and 'Program 2' are in the folder.

 

Program A:
IF 
   Condition 1 
THEN
  - 
Else 
   Stop Program 1
   Stop Program 2

Folder: 
IF 
   Program A is True 
THEN 
   Allow the programs in this folder to run.

Program 1: 
IF 
   Condition 2 
THEN 
   Action 1 
ELSE 
   Action 2 
ENDIF 

Program 3: 
IF 
   Condition 3 
THEN 
   Action 3 
ELSE 
   Action 4 
ENDIF

Link to comment
The programs continue to run, although this may not be the best semantics.

 

You can stop the programs explicitly, as in the following example.

 

Thank you! So the conditions on a folder determine when programs within it may begin running, but once started the programs will continue even when the folder conditions become False? And of course the running programs may be explicitly stopped.

 

That's just the way it should be, in my opinion. I wouldn't want all the running programs to terminate in the middle when the folder conditions became False.

 

However, does that not put folder conditions at variance with program conditions; i.e. doesn't a running program terminate immediately (even in the middle of its actions) when its conditions become False?

Link to comment

However, does that not put folder conditions at variance with program conditions; i.e. doesn't a running program terminate immediately (even in the middle of its actions) when its conditions become False?

 

Its definitely a topic to think about for Triggers 2.0.

 

When program conditions change for a running program it immediately stops, and then runs either the Then or Else. In this case, there isn't much choice but to to stop immediately otherwise you could have both the Then and Else running simultaneously.

Link to comment

However, does that not put folder conditions at variance with program conditions; i.e. doesn't a running program terminate immediately (even in the middle of its actions) when its conditions become False?

 

Its definitely a topic to think about for Triggers 2.0.

 

When program conditions change for a running program it immediately stops, and then runs either the Then or Else. In this case, there isn't much choice but to to stop immediately otherwise you could have both the Then and Else running simultaneously.

 

Yes, I agree. I shan't propose any changes just now, as I can't think of anything better at the moment. Perhaps others will have some thoughts on this.

 

But I've learned something new from your answer. If a program is running the Then (meaning either that its conditions are True, or that the Then path was invoked by another program), and while doing so the program's conditions become False, it doesn't just stop running the Then, but it also runs the Else. And further, if a program is running the Else (meaning either that it's conditions must be False, or that the Else path was invoked by another program), and while doing so the program's conditions become True, then it will immediately stop running the Else and start running the Then!

 

One more question regarding folder conditions: when a folder's conditions are False, can the programs within it still be run by other programs?

Link to comment
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...