Page History
This activity "calls" a named method in a Ruby script. See also the description of the CALL_RUBY activity.
For more information about Ruby, you might start by referring to Ruby Programming Language.
...
The CALL_RUBY_EX activity passes and receives the name-value pairs using an instance of a Ruby Hash class. Your method must be written to accept a single parameter, which is the Hash, and optionally, to return an instance of Hash containing any name-value pairs that you wish to return to the Processing Sequence.
| Note | ||||
|---|---|---|---|---|
| ||||
This activity requires that the LANSA Integrator JSM is executing on a JVM at Java 6 or above. |
CALL_RUBY_EX Example
The following is an example of a Ruby script containing a method that is suitable for use with the CALL_RUBY_EX activity. It receives name-value pairs in a Hash instance in the method parameter properties. It extracts the values for the names STRINGIN1 and STRINGIN2 and concatenates them. It then creates and returns a new Hash instance containing values for the names STATUS and STRINGOUT.
...