Represents an input to a workflow.
If set, the file which has been used to supply this port’s data.
If set, the value held by this port. Could be a list (of lists (etc)).
Has this port been set via a baclava document?
# File lib/t2-server/port.rb, line 141 def baclava? @run.baclava_input? end
Set the file to use for this port’s data. The file will be uploaded to the server before the run starts. This has no effect if the run is already running or finished.
# File lib/t2-server/port.rb, line 130 def file=(filename) return unless @run.initialized? @value = nil @file = filename @remote_file = false end
Is this port’s data being supplied by a file? The file could be local or remote (already on the server) for this to return true.
# File lib/t2-server/port.rb, line 98 def file? !@file.nil? end
Set the remote file to use for this port’s data. The file must already be on the server. This has no effect if the run is already running or finished.
# File lib/t2-server/port.rb, line 117 def remote_file=(filename) return unless @run.initialized? @value = nil @file = filename @remote_file = true end
Is this port’s data being supplied by a remote (one that is already on the server) file?
# File lib/t2-server/port.rb, line 107 def remote_file? file? && @remote_file end
Has this port been set?
# File lib/t2-server/port.rb, line 149 def set? !value.nil? or file? or baclava? end
Set the value of this input port. This has no effect if the run is already running or finished.
# File lib/t2-server/port.rb, line 86 def value=(value) return unless @run.initialized? @file = nil @remote_file = false @value = value end