On Mon, May 2, 2011 at 3:38 PM, John Mettraux <[email protected]> wrote:
> Hello,
>
> up until now, ruote understood process definitions expressed in Ruby, in XML 
> or directly as trees (Ruby or JSON).
>
> Thus, this Ruby process definition
>
> ---8<---
> Ruote.process_definition 'test', :revision => '1.0' do
>  alpha
>  concurrence do
>    bravo :timeout => '2d'
>    charly
>  end
>  delta :task => 'final changes'
> end
> --->8---
>
> would be equivalent to (Ruby array)
>
> ---8<---
> ['define', {'revision'=>'1.0', 'test'=>nil}, [
>  ['alpha', {}, []],
>  ['concurrence', {}, [
>    ['bravo', {'timeout'=>'2d'}, []],
>    ['charly', {}, []]]],
>  ['delta', {'task'=>'final changes'}, []]]]
> --->8---
>
> or (JSON string)
>
> ---8<---
> ["define", {"revision":"1.0", "test":null}, [
>  ["alpha", {}, []],
>  ["concurrence", {}, [
>    ["bravo", {"timeout":"2d"}, []],
>    ["charly", {}, []]]],
>  ["delta", {"task":"final changes"}, []]]]
> --->8---
>
> or (XML)
>
> ---8<---
> <process-definition name='test' 'revision'='1.0'>
>  <alpha />
>  <concurrence>
>    <bravo timeout='2d' />
>    <charly />
>  </concurrence>
>  <delta task='final changes' />
> </process-definition>
> --->8---
>
> The new "radial" process definition language looks like :
>
> ---8<---
> process-definition test, revision: 1.0
>  alpha
>  concurrence
>    bravo timeout: 2d
>    charly
>  delta task: 'final changes'
> --->8---
>
> It's mostly the Ruby syntax, without the "do" and the "end", and attributes 
> that are expressed with the javascript 'lazy' syntax.
>
> Since it accomodates Ruby-like and JSON-like styles, these are equivalent :
>
> ---8<---
>  bravo timeout: 2d
>  bravo "timeout": 2d
>  bravo 'timeout': 2d
>  bravo timeout: "2d"
>  bravo timeout: '2d'
> --->8---
>
> Attribute values can be expresses the JSON way or the Ruby way :
>
> ---8<---
>  charly info: { a: 'b', c: [ 1, 2, 3 ] }
>  charly info: { 'a' => 'b', 'c' => [ 1, 2, 3 ] }
>  # ...
> --->8---
>
> Comments start after the "#" sign.
>
> Multiline strings are OK, they are delimited by ''' or """
>
> It should accomodate a very relaxed style of writing.
>
> The big minus point : your favourite text editor won't have a syntax file for 
> it.
>
>
> Comments and questions are welcome,
>

One question:  Would it be possible to include/execute arbitrary Ruby
code in this new syntax?

> --
> John Mettraux - http://jmettraux.wordpress.com
>
> --
> you received this message because you are subscribed to the "ruote users" 
> group.
> to post : send email to [email protected]
> to unsubscribe : send email to [email protected]
> more options : http://groups.google.com/group/openwferu-users?hl=en

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to