Check if running?

mhisted's Avatar

mhisted

25 Mar, 2014 07:45 PM

Chris,

Quick question that would be useful to know today sometime if you have a chance:

Is there an isRunning action or expression in the XML that tells you whether the state system is stopped or started?
Also, is there a way to specify actions that are guaranteed to get run after the state system (or trial) is finished, whether interrupted or not, like the try/finally structure in python?

  1. Support Staff 1 Posted by Christopher Sta... on 25 Mar, 2014 07:57 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    Is there an isRunning action or expression in the XML that tells you whether the state system is stopped or started?

    No. The #state_system_mode variable holds that information, but you can't access it from the XML (although a Python bridge script can see it).

    How did you hope to use such an action/expression?

    Also, is there a way to specify actions that are guaranteed to get run after the state system (or trial) is finished, whether interrupted or not, like the try/finally structure in python?

    No, but you've asked for this before, and it's on the to-do list.

    Chris

  2. 2 Posted by mhisted on 25 Mar, 2014 08:18 PM

    mhisted's Avatar

    > Also, is there a way to specify actions that are guaranteed to get run after the state system (or trial) is finished, whether interrupted or not, like the try/finally structure in python?
    >> No, but you've asked for this before, and it's on the to-do list

    Ah, my memory is not good. Thanks.

    My use case: I'm scheduling a set of actions to happen in the future. If the state system is stopped before the schedule, I'd like to cancel the scheduled actions. I could use an "if isRunning" or similar inside the scheduled payload, or I could cancel them from a "finally" block.

    Thanks, I'll work around this.

    Mark

  3. Christopher Stawarz closed this discussion on 27 Mar, 2014 01:38 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac