<html>
<head>
<style>
body {
  font-family: Verdana, sans-serif;
  font-size: 0.8em;
  color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
hr {
  width: 100%;
  height: 1px;
  background: #ccc;
  border: 0;
}
.footer {
  font-size: 0.8em;
  font-style: italic;
}
</style>
</head>
<body>
<span class="header"></span>
Issue #6481 has been updated by Owsiak Michal.

<ul>
  <li><strong>File</strong> <a href="https://projects.ecoinformatics.org/ecoinfo/attachments/download/478/Sleep_no_display.kar">Sleep_no_display.kar</a> added</li>
  <li><strong>File</strong> <a href="https://projects.ecoinformatics.org/ecoinfo/attachments/download/479/Sleep_display.kar">Sleep_display.kar</a> added</li>
</ul>

<p>In principal, I agree. Display actors typically don't need to produce any output.</p>


        <p>However, this might be a "synchronization issue".</p>


        <p>Our workflows are quite complex and we have numerous conditions that determine when workflow stops. Before it stops, we have to be sure that all outputs were correctly produced - so we can check whether everything is OK. And this might be an issue when there is no output port in display like actor - e.g. "Display" actor.</p>


        <p>Let me show a simple case (attached file: Sleep_no_display.kar)</p>


        <p>If you execute this workflow, it will stop before output is produced. This is not good as we don't know what was the condition before workflow stopped.</p>


        <p>In case of the Multiple Tab Display actor, we can avoid this issue as we can "synchronize" the execution. Take a look here: Sleep_display.kar</p>


        <p>In second case, we can enforce that Multiple Tab Display actor is executed before we proceed to Stop actor.</p>


        <p>That's why we have decided to introduce "output" port into MTD actor. Now, with Kepler 2.4, we have issue with our workflows as they don't run correctly in non-gui mode.</p>


        <p>I hope it is now more clear what is the purpose of the output port in the MTD.</p>
<hr />
<h1><a href="https://projects.ecoinformatics.org/ecoinfo/issues/6481#change-21589">Bug #6481: strange issue with MultipleTabDisplay actor and with Display like actors in general (missing output port in non-gui mode)</a></h1>

<ul>
<li>Author: Owsiak Michal</li>
<li>Status: New</li>
<li>Priority: Normal</li>
<li>Assignee: </li>
<li>Category: </li>
<li>Target version: </li>
  <li>Bugzilla-Id: </li>
</ul>

<p>Hi there,</p>


        <p>I will paste here description that already went to Jianwu via e-mail, but I think it describes the issue in details:</p>


        <p>Some time ago we have published our patches to MultipleTabDisplay actor so it is consistent with new way of redirecting output.</p>


        <p>The issue here is, that we have problem with running Kepler workflows in non-gui mode.</p>


        <p>The issue lays in missing "output" port inside Multiple Tab Display actor.</p>


        <p>The problem is that in GUI mode, everything works just fine (see the screen shoot).</p>


        <p>In non-gui mode, we are getting an exception (see the attachment - exception.txt).</p>


        <p>Command line used for starting workflow is:</p>


        <p>./kepler.sh -runwf -nogui -nocache ~/Desktop/testMTD.xml</p>


        <p>Problematic workflow was reduced, and now, we have smallest case that triggers exception.</p>


        <p>The workflow is inside: testMTD.xml.</p>


        <p>The problem occurs in case Multiple Tab Display actor is inside Composite actor. If the MTD is placed on main workflow, everything is just fine.</p>


        <p>If we start testMTD workflow in GUI mode - everything is OK.<br />If we start it following way:</p>


        <p>./kepler.sh -runwf -nogui -nocache testMTD.xml</p>


        <p>We are getting exception.</p>


        <p>I have done some initial debugging, and it looks like issue lies in reading output port from the actor. It is not reported in the code.</p>


        <p>Entity.java class has method: getPort. In this method, if I take a look at the code, I can see that variable "_portList" doesn't contain "output" port.</p>


        <p>This is what I can see while running Kepler in Eclipse (non-gui mode of Kepler)</p>


        <p>[<br /> ptolemy.actor.TypedIOPort
  {.testMTD.CompositeActor.MultipleTabDisplay.input},<br /> ptolemy.actor.TypedIOPort
  {.testMTD.CompositeActor.MultipleTabDisplay.trigger}<br />]</p>


        <p>This is the code, that should return "output" port.</p>


        <pre><code>public Port getPort(String name) {<br />        try {<br />            _workspace.getReadAccess();<br />            return (Port) _portList.get(name);<br />        } finally {<br />            _workspace.doneReading();<br />        }<br />    }</code></pre>


        <p>"_portList" doesn't contain output port, even though, this port is visible in GUI mode, and - in fact - works fine (take a look at screen shot).</p>


        <p>The question here is. Where should we look for the bug? Do you have any suggestions?</p>


<hr />
<span class="footer"><p>You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here: <a class="external" href="https://projects.ecoinformatics.org/ecoinfo/my/account">https://projects.ecoinformatics.org/ecoinfo/my/account</a></p></span>
</body>
</html>