The FlexRAID Expression Language

The FlexRAID Expression Language

Starting with FlexRAID 2.0 preview build 9

This is for all those users that have either:
– been using the scripting feature of FlexRAID in version 1.4
– or been wishing for a powerful way to script FlexRAID’s operations

You are all herein served.
Note: expression scripts can only be scheduled. However, you can schedule them to run “now”.
Expression scripts are a powerful way to create an execution workflow.

  1. [@config <RAID config name>]
  2. [@queued <true|false>]
  3. @execute <executable|@task <create|verify|validate|quick-validate|update>>
  4. [@param <value>]
  5. [@param <value>]
  6. [@in <working directory>]
  7. [@interactive @wait <wait time before response> @response <response>]
  8. [@interactive @wait <wait time before response> @response <response>]
  9. [@error <@run <expression script name>|@email <message>|@sms <message>>]
  10. [@error <@run <expression script name>|@email <message>|@sms <message>>]
  11. [@success <@run <expression script name>|@email <message>|@sms <message>>]
  12. [@success <@run <expression script name>|@email <message>|@sms <message>>]

[]: means optional element or value… when value, the first listed value is the default value
<>: value must be provided
|: separates the possible values
@: expression keyword
…: the expression can repeat multiple times (one or more)

@config: the RAID configuration name to execute against (required if the executable is a RAID task or if the execution is to be queued based on the context of a RAID configuration)
@queued: whether to queue the execution if another task is running against the named RAID configuration… if false, the script will abort
@execute: the executable or FlexRAID task to run… the executable can also be a DOS or Shell script (required)
@param: a parameter value to pass to the executable as argument or to the task as task property (e.g., @param verifyStart=20GB)

Executables (as opposed to RAID tasks) can have these additional expressions:

@in: the working directory when running an executable
@interactive: for interactive scripts, you can automate responding the prompts
@wait: when in interactive mode, the time in milliseconds to wait before responding. FlexRAID cannot really detect a prompt from your script or executable. Therefore, you must time the interaction and know when a response is needed.
@response: when in interactive mode, the response text to pass to the executable

@error: what to do on error (an exit code > 0 equals error for scripts)
@success: what to do on success
@run: the next expression script to run (expression scripts can be chained – watch out for recursions!)
@email: send an e-mail notification
@sms: send an SMS notification

** All keywords are case insensitive
** RAID configuration names are case sensitive

Be Sociable, Share!


Tags: , ,

4 Responses to “The FlexRAID Expression Language”

  1. Bazinga March 27, 2012 at 8:24 PM #

    Would be good to have a list of params for each of the tasks. Otherwise how do we know which params are available and what their type is?

  2. Dizzy August 11, 2012 at 11:02 PM #

    Is there a collection of Expression Scripts around? I know there have to be some really useful ones out there people have created.

Leave a Reply