Does Task Execution Policy (TEP) apply to entire Piston, or just statement it is set in?


#1

1) Give a description of the problem
I have a Piston with two IF statements, and in each THEN clause I have a statement with TEP set to “Execute tasks on condition state change only”.

2) What is the expected behavior?
If the condition in the first IF doesn’t change, but the condition in the second IF does, then the tasks in the statement in the second IF’s THEN clause should execute.

3) What is happening/not happening?
They don’t execute. From the picture you can see the second condition is not tested (no green or red color to the left of the condition), and from the log you can see that the rest of the Piston (i.e., the IF statement #6) is skipped once it is determined the condition in the first IF statement did not change.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
2/17/2018, 6:31:28 AM +910ms
+1ms ╔Received event [Doral Ct].:efb0da26275d7c058b6660da9b00b206: = @test2 with a delay of 73ms
+115ms ║RunTime Analysis CS > 24ms > PS > 68ms > PE > 22ms > CE
+117ms ║Runtime (38224 bytes) successfully initialized in 68ms (v0.2.102.20180116) (115ms)
+118ms ║╔Execution stage started
+129ms ║║Comparison (integer) 1 is_equal_to (integer) 1 = true (2ms)
+131ms ║║Condition #4 evaluated true (6ms)
+132ms ║║Condition group #1 evaluated true (state did not change) (7ms)
+133ms ║║Skipping execution for statement #5 because condition state did not change
+135ms ║╚Execution stage complete. (17ms)
+136ms ╚Event processed successfully (136ms)
2/17/2018, 6:31:17 AM +354ms
+0ms ╔Received event [Doral Ct].:efb0da26275d7c058b6660da9b00b206: = @test1 with a delay of 37ms
+87ms ║RunTime Analysis CS > 20ms > PS > 50ms > PE > 17ms > CE
+89ms ║Runtime (38225 bytes) successfully initialized in 50ms (v0.2.102.20180116) (88ms)
+90ms ║╔Execution stage started
+100ms ║║Comparison (integer) 1 is_equal_to (integer) 1 = true (1ms)
+102ms ║║Cancelling condition #4’s schedules…
+103ms ║║Condition #4 evaluated true (7ms)
+104ms ║║Cancelling condition #1’s schedules…
+105ms ║║Condition group #1 evaluated true (state changed) (9ms)
+109ms ║║Cancelling statement #2’s schedules…
+116ms ║║@test1 is 1
+117ms ║║Executed virtual command log (1ms)
+125ms ║║Comparison (integer) 0 is_equal_to (integer) 1 = false (2ms)
+127ms ║║Condition #10 evaluated false (6ms)
+128ms ║║Condition group #6 evaluated false (state did not change) (7ms)
+130ms ║╚Execution stage complete. (40ms)
+131ms ╚Event processed successfully (131ms)
2/17/2018, 6:30:56 AM +594ms
+0ms ╔Received event [Doral Ct].:efb0da26275d7c058b6660da9b00b206: = @test1 with a delay of 65ms
+113ms ║RunTime Analysis CS > 24ms > PS > 73ms > PE > 17ms > CE
+115ms ║Runtime (38219 bytes) successfully initialized in 73ms (v0.2.102.20180116) (114ms)
+117ms ║╔Execution stage started
+128ms ║║Comparison (integer) 0 is_equal_to (integer) 1 = false (1ms)
+129ms ║║Cancelling condition #4’s schedules…
+130ms ║║Condition #4 evaluated false (7ms)
+131ms ║║Cancelling condition #1’s schedules…
+132ms ║║Condition group #1 evaluated false (state changed) (10ms)
+140ms ║║Comparison (integer) 0 is_equal_to (integer) 1 = false (2ms)
+142ms ║║Cancelling condition #10’s schedules…
+143ms ║║Condition #10 evaluated false (6ms)
+144ms ║║Cancelling condition #6’s schedules…
+145ms ║║Condition group #6 evaluated false (state changed) (9ms)
+147ms ║╚Execution stage complete. (31ms)
+149ms ╚Event processed successfully (149ms)
2/17/2018, 6:30:56 AM +593ms
+0ms ╔Received event [Doral Ct].:efb0da26275d7c058b6660da9b00b206: = @test2 with a delay of 57ms
+108ms ║RunTime Analysis CS > 24ms > PS > 69ms > PE > 16ms > CE
+110ms ║Runtime (38219 bytes) successfully initialized in 69ms (v0.2.102.20180116) (109ms)
+111ms ║╔Execution stage started
+122ms ║║Comparison (integer) 0 is_equal_to (integer) 1 = false (1ms)
+123ms ║║Cancelling condition #4’s schedules…
+124ms ║║Condition #4 evaluated false (7ms)
+125ms ║║Cancelling condition #1’s schedules…
+126ms ║║Condition group #1 evaluated false (state changed) (9ms)
+133ms ║║Comparison (integer) 0 is_equal_to (integer) 1 = false (1ms)
+135ms ║║Cancelling condition #10’s schedules…
+136ms ║║Condition #10 evaluated false (7ms)
+137ms ║║Cancelling condition #6’s schedules…
+138ms ║║Condition group #6 evaluated false (state changed) (9ms)
+140ms ║╚Execution stage complete. (29ms)
+142ms ╚Event processed successfully

If TEP is set in individual statements, why does it appear to effect the entire Piston and not just that statement?


Location Mode changes away from produced incorrect result
#2

my read of the code is it is per statement setting.