Class Ruote::Reader
In: lib/ruote/reader.rb
Parent: Object

A process definition reader.

Can reader XML, JSON, Ruby (and more) process definition representations.

Methods

Classes and Modules

Class Ruote::Reader::Error

Public Class methods

Class method for parsing process definition (XML, Ruby, from file or from a string, …) to syntax trees. Used by ruote-fluo for example.

Returns true if the defintion is a remote URI

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.

Turns the process definition tree (ruote syntax tree) to a JSON String.

Turns the given tree into a radial process definition.

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.

Protected Class methods

split the txt => nil entry and sorts the rest of the attributes.

Public Instance methods

Turns the input into a ruote syntax tree (raw process definition). This method is used by engine.launch(x) for example.

Protected Instance methods

Minimal test. Used by read.

[Validate]