If the stdout is less than 64kb then you can express it as a string either during the gathering of the outputs.
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
inputs:
message: string
baseCommand: echo
arguments: [ $(inputs.message) ]
stdout: message
outputs:
message_File: # Just to illustrate that you can process a file multiple times, not necessary for message_string to work
type: File
outputBinding:
glob: message
message_string:
type: string
outputBinding:
glob: message
loadContents: true
outputEval: $(self[0].contents)
And the output:
$ cwltool ../t.cwl --message "Hello, world!"
/home/michael/cwltool/env/bin/cwltool 1.0.20171107133715
Resolved '../t.cwl' to 'file:///home/michael/t.cwl'
[job t.cwl] /tmp/tmpAljfTQ$ echo \
'Hello, world!' > /tmp/tmpAljfTQ/message
[job t.cwl] completed success
{
"message_string": "Hello, world!\n",
"message_File": {
"checksum": "sha1$09fac8dbfd27bd9b4d23a00eb648aa751789536d",
"basename": "message",
"location": "file:///home/michael/u/message",
"path": "/home/michael/u/message",
"class": "File",
"size": 14
}
}
Final process status is success
If you don't want to change your tool definition, then you can use an ExpressionTool to convert the File to a string.
Please post your example code and expected output
Output from first step:
Input from second step:
Besides the tag it's unclear that this is about cwl - would be good to mention that. The question doesn't make sense if you don't read the tags.