[kepler-users] Monitor Value and Display

Edward A. Lee eal at eecs.berkeley.edu
Mon Nov 26 15:17:46 PST 2007



Oddly, StringCompare works fine for me. See the attached model.
Perhaps it's because you were comparing against "" rather than against
an empty string?  In the StringCompare actor, the parameters are
in string mode (indicated in the parameter editor dialog by a blue
background), which means you don't enter the enclosing quotes.
It also means you can reference other parameter values using the
$name notation.

Edward


At 02:33 PM 11/16/2007, Kenneth Evans wrote:
>>> If you send me a MoML file with your class definition, I'll take a look
>at the problems you cite. 
>
>An example is enclosed.  It uses SSH to Execute.  Note that the Display
>doesn't have the right number of columns, and I could not figure out a way
>to set the title or otherwise use parameters (as described in more detail
>below).
>
>But it does only show Displays that have something to display.  I have been
>working (i.e. doing trial and error) with modifications of this example and
>it sure is more pleasant.
>
>        -Ken
>
>-----Original Message-----
>From: kepler-users-bounces at ecoinformatics.org
>[mailto:kepler-users-bounces at ecoinformatics.org] On Behalf Of Kenneth Evans
>Sent: Monday, November 12, 2007 4:10 PM
>To: Kepler Mailing List
>Subject: Re: [kepler-users] Monitor Value and Display
>
>Edward,
>
>Thanks, I think it works much better with those changes.
>
>I wanted the Display to appear only if the contents are not blank.  What you
>did is a necessary condition for that to be possible.  I can in fact do this
>using an Expression involving input.length() and a BooleanSwitch.  I had
>some problems, though.
>
>1. In Kepler I could not use a StringCompare with the second string equal to
>"" in place of the Expression.  It returned False even when a Monitor said
>the value was "" and an Expression using input.length() said the length was
>0.  (Why I ended up using input.length() in an Expression).  I don't
>understand that.
>
>2. I tried to make a ConditionalDisplay class with the switch logic and a
>Display inside the class (since I had several of these and it makes the
>diagram much cleaner).  It works but seems to ignore the default parameters
>of 10 rows by 80 columns that I specified in the class and uses what are
>probably the default parameters for the Display.
>
>3. I could not define parameters in the class to pass things like the title
>to the Display.  It ignores them in the same way.  What I would like to do
>is have a parameter in the class that is named rowsDisplayed and use that as
>the value of the rowsDisplayed parameter of the Display inside the class.  I
>did not find syntax to do this.  At this point I would guess you probably
>can't use an expression for the Display parameters like you can in a
>Constant, for example.  (Or else I don't understand ;-)
> 
>Thanks,
>
>        -Ken
>
>-----Original Message-----
>From: Edward A. Lee [mailto:eal at eecs.berkeley.edu] 
>Sent: Saturday, November 10, 2007 2:55 AM
>To: Kenneth Evans
>Cc: Kepler Mailing List
>Subject: Re: [kepler-users] Monitor Value and Display
>
>
>Hi Ken.
>
>I'm checking in the following improvements:
>
>  Display: Modified to open the window only on receipt of the first token.
>  MonitorValue: Modified to clear the display in initialize
>
>Thanks for the suggestions.
>
>Edward
>
>At 11:09 AM 11/8/2007, Kenneth Evans wrote:
>>Hi,
>>
>>I have minor problems with Monitor Value and Display that I havent been
>>able to work around.  Perhaps someone with more experience can help.
>>
>>1. If you use Monitor Display, say as the result of a long calculation, it
>>retains the same value when you run the workflow again.  Is there a way to
>>clear it at the start of a run?
>>
>>2. If you use Display for, say an actor like SSH to Execute, that has
>>outputs that typically have nothing in them (stderr and error in this case)
>>then a Display attached to them comes up every time and can be a nuisance.
>>Is there a way to make the Display (or an alternative) come up only when
>the
>>output is not empty.  You can't use a Monitor Value in this case as there
>>may be more than one line on those occasions where the output is not empty.
>>
>>Thanks,
>>
>>        -Ken
>>
>>
>>_______________________________________________
>>Kepler-users mailing list
>>Kepler-users at ecoinformatics.org
>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
>
>------------ 
>Edward A. Lee
>Chair of EECS and Robert S. Pepper Distinguished Professor
>231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
>phone: 510-642-0253, fax: 510-642-2845
>eal at eecs.Berkeley.EDU,
>http://www.eecs.berkeley.edu/Faculty/Homepages/lee.html 
>
>
>_______________________________________________
>Kepler-users mailing list
>Kepler-users at ecoinformatics.org
>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
>
>
>_______________________________________________
>Kepler-users mailing list
>Kepler-users at ecoinformatics.org
>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users

------------ 
Edward A. Lee
Chair of EECS and Robert S. Pepper Distinguished Professor
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://www.eecs.berkeley.edu/Faculty/Homepages/lee.html  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stringCompare.xml
Type: application/xml
Size: 3762 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20071126/d922bc43/attachment.xml>


More information about the Kepler-users mailing list