Class: UU::OS::Script::ScriptExec Deprecated
- Inherits:
-
REST::DTO
- Object
- REST::DTO
- UU::OS::Script::ScriptExec
- Defined in:
- uu_os-0.29.16/lib/uu/os/script/script_exec.rb
Overview
Use Macro::MacroExec instead.
Instance Attribute Summary (collapse)
-
- (Object) data
Script data (parameters).
-
- (Object) options
Additional script options (may be an instance of Hash, JSON representing Hash or UESURI of text property containing JSON representing Hash).
-
- (Object) use_case_code
Code of use case be execute (use case code is translated to a particular script based on main entity using use case registry).
-
- (Object) wait_for_finish
Flag determining if the invoker wants the command to automatically wait for script completion (including all subtasks) or will handle the waiting itself (using the returned UESURI of script process).
Instance Method Summary (collapse)
Methods inherited from REST::DTO
Constructor Details
This class inherits a constructor from UU::OS::REST::DTO
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class UU::OS::REST::DTO
Instance Attribute Details
- (Object) data
Script data (parameters). The expected value is an instance of Hash, JSON representing Hash or UESURI of text property containing JSON representing Hash.
22 23 24 |
# File 'uu_os-0.29.16/lib/uu/os/script/script_exec.rb', line 22 def data @data end |
- (Object) options
Additional script options (may be an instance of Hash, JSON representing Hash or UESURI of text property containing JSON representing Hash).
26 27 28 |
# File 'uu_os-0.29.16/lib/uu/os/script/script_exec.rb', line 26 def @options end |
- (Object) use_case_code
Code of use case be execute (use case code is translated to a particular script based on main entity using use case registry).
13 14 15 |
# File 'uu_os-0.29.16/lib/uu/os/script/script_exec.rb', line 13 def use_case_code @use_case_code end |
- (Object) wait_for_finish
Flag determining if the invoker wants the command to automatically wait for script completion (including all subtasks) or will handle the waiting itself (using the returned UESURI of script process). Default value: do not wait automatically.
18 19 20 |
# File 'uu_os-0.29.16/lib/uu/os/script/script_exec.rb', line 18 def wait_for_finish @wait_for_finish end |
Instance Method Details
- (Object) to_hash
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'uu_os-0.29.16/lib/uu/os/script/script_exec.rb', line 60 def to_hash hash = super() # We have to send data and options as JSON. # (Server cannot parse Object representing Map) if hash[:data].kind_of?Hash hash[:data] = hash[:data].to_json end if hash[:options].kind_of?Hash hash[:options] = hash[:options].to_json end hash end |