Class | Ruote::Reader |
In: |
lib/ruote/reader.rb
|
Parent: | Object |
A process definition reader.
Can reader XML, JSON, Ruby (and more) process definition representations.
Class method for parsing process definition (XML, Ruby, from file or from a string, …) to syntax trees. Used by ruote-fluo for example.
Produces an expid annotated radial version of the process definition, like:
0 define name: "nada" 0_0 sequence 0_0_0 alpha 0_0_1 participant "bravo", timeout: "2d", on_board: true
Can be useful when debugging noisy engines.
Used by .to_expid_radial. Outputs an array of ‘lines’. Each line is a process definition line, represented as an array:
[ level, expid, name, atts ]
Like in:
[[0, "0", "define", " name: \"nada\""], [1, "0_0", "sequence", ""], [2, "0_0_0", "alpha", ""], [2, "0_0_1", "participant", " \"bravo\", timeout: \"2d\"]]
Turns the given process definition tree (ruote syntax tree) to a Ruby process definition (a String containing that ruby process definition).
Mainly used by ruote-fluo.
Turns the given process definition tree (ruote syntax tree) to an XML String.
Mainly used by ruote-fluo.
Turns the input into a ruote syntax tree (raw process definition). This method is used by engine.launch(x) for example.