Help needed... Initiate Process, Wait Status Change -> Action Run or Timeoout

What is the most efficient way to do this (example code appreciated)…

a) Virtual switch is turned on
→ this Initiates a process

b) PLEG watches for changes in one or more devices

c1) Conditions are met - example: all 5 motion sensors are no longer triggered
→ this completes the cycle and Actions ran.

or

c2) Condition is not met in specific time frame (say 5 minutes)
→ actions are not triggered but notification is sent telling user the action timed out and which conditions were not met

thanks for the help!

Input:
VS - Virtual Switch is On Trigger
T1 - Device 1 Trigger

TN - Device N Trigger
TimeoutTimer - Schedule SelfTrigger, Off in 5 Minites

Condition:
VSOn VS
ALLOFF !T1 and … and !TN
Notify !ALLOFF and VS and (VS;!TimeoutTimer)

Actions:
VSOn Start Timer TimeoutTimer
Notify VeraAlerts SendAlert Msg= Alert: T1:{{(T1)}} … TN:{{(TN)}}