<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I have not thought that hard about how to pass binary data, probably
the thing to do would be to enhance the Exec actor to optionally
pass an ObjectToken that would contain the binary data.<br>
<br>
Offhand, I don't know of anything in the StringToken that should
prevent binary data from being used, but there could be issues.
Some simple test cases would help here.<br>
<br>
One thing is that reading data from files can result in
transformation of the data. ptolemy/util/FileUtilities.java has a
method that safely reads a file and outputs it using
ByteArrayOutputStream.<br>
<br>
BTW - I'm used to Unix passing data as files that have newline
characters and using tools and scripts on textual data. A few
line-based tools tend to fail if the file does not have at least one
newline at the end of the file. Interestingly, the find command can
generate an output that has file names separated by null characters
and xargs can process that data with the -0 option. For example,
these commands find file names with spaces in them and then call
xargs to run a command. <br>
<br>
find . -name "* *" -print0 | xargs -0 ls -l<br>
<br>
(Of course, one could just do find . -name "* *" -ls, but the point
is to show how to pass filenames with spaces to xargs)<br>
<br>
<div class="moz-cite-prefix">On 4/19/13 6:06 PM, Jianwu Wang wrote:<br>
</div>
<blockquote cite="mid:5171EA17.1090100@sdsc.edu" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi David,<br>
<br>
<big> </big><font face="Calibri, sans-serif" size="2"><big><font
size="2"><big>E</big></font>xternal execution assume the <font
size="2">data for output port is string and process <font
size="2">it accordingly. So I don't think <font
size="2">it <font size="2">can correctly</font> send
binary data from its output port. <br>
<br>
<font size="2"> <font size="2">One way work<font
size="2"> around is to redi<font size="2">rect
the </font></font></font></font></font></font></font></big></font><font
face="Calibri, sans-serif" size="2"><big><font size="2"><font
size="2"><font size="2"><font size="2"><font size="2"><font
size="2"><font size="2"><font size="2"><font
face="Calibri, sans-serif" size="2"><big><font
size="2"><font size="2"><font size="2">binary
</font></font></font></big></font>output
into a <font size="2">file and the next '</font></font></font></font></font></font></font></font></font></big></font><font
face="Calibri, sans-serif" size="2"><big><font size="2"><font
size="2"><font size="2"><font size="2"><font size="2"><font
size="2"><font size="2"><font size="2"><font
size="2"><font face="Calibri, sans-serif"
size="2"><big><font size="2"><big>E</big></font>xternal
execution</big></font>' actor will
read <font size="2">dat<font size="2">a
from the file. If it f<font size="2">its
your need<font size="2">s, I can
send a demo workflow for it.</font></font></font></font></font></font></font></font></font></font></font></font></font></big></font><big><br>
</big>
<pre class="moz-signature" cols="72">Best wishes
Sincerely yours
Jianwu Wang, Ph.D.
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:jianwu@sdsc.edu">jianwu@sdsc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://users.sdsc.edu/%7Ejianwu/">http://users.sdsc.edu/~jianwu/</a>
Assistant Project Scientist
Scientific Workflow Automation Technologies (SWAT) Laboratory
San Diego Supercomputer Center
University of California, San Diego
San Diego, CA, U.S.A. </pre>
On 4/18/13 11:02 AM, Brown, David M JR wrote:<br>
</div>
<blockquote
cite="mid:1F23C619F22C0F46B438FA1D4332FB719B9B808354@EMAIL06.pnl.gov"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri, sans-serif" size="2">
<div>To whom it may concern,</div>
<div> </div>
<div>I’ve got a set of binary tools that use standard unix
style pipes to communicate and process data. So to write
this up in Kepler I chose to use the external execution
component and run each command separately connecting one
components standard output to the other components standard
input. However, the communication isn’t in text its binary.
I’m having issues where the first part of the process
doesn’t recognize the header sent to the program as valid.</div>
<div> </div>
<div>Are there any issues with sending binary data from
external execution components output port?</div>
<div> </div>
<div>Thanks,</div>
<div>- David Brown</div>
<div> </div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
</font> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kepler-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kepler-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Christopher Brooks, PMP University of California
Academic Program Manager & Software Engineer US Mail: 337 Cory Hall
CHESS/iCyPhy/Ptolemy/TerraSwarm Berkeley, CA 94720-1774
<a class="moz-txt-link-abbreviated" href="mailto:cxh@eecs.berkeley.edu">cxh@eecs.berkeley.edu</a>, 707.332.0670 (Office: 545Q Cory)
</pre>
</body>
</html>