I suspect the problem is that you are invoking on the command line a model that has input ports (your port parameters have both an input port and a parameter).

Turning on backward type inference might work.

Another alternative, if the command is available in Kepler (it is in Ptolemy II), is to right click on the background of the model, select Customize->Ports, and set the type of the port explicitly, for example to string.

A better approach, if your parameter is specifying a file, would be to use a FilePortParameter instead of a PortParameter. This has the type fixed, but also offers browsing the file system to set the file name.

Edward

On 12/5/13 4:42 AM, GARY WERNSING wrote:
I am trying to pass a parameter to a workflow via the command line. Chapter two of the 
user manual suggests it is straight forward and that adding '-x 4 -y "foo"' to 
the command line would set both x and y. I am starting to think there is something 
unspoken about actually using this technique.

I have a workflow that executes properly when I run it from the Kepler GUI but 
fails when run from the command line. My command line is:

/Applications/Kepler-2.4/Kepler.app/Contents/Resources/Java/kepler.sh -runkar 
-ScriptLocation "/Users/wernsing/rest.py" 
/Users/wernsing/KeplerData/workflows/MyWorkflows/RESTviaPython.kar

At some point later I get

...
     [null] Command failed.
     [null] ptolemy.actor.TypeConflictException: Types resolved to unacceptable 
type . .RESTviaPython due to the following objects:
     [null]   (variable .RESTviaPython.ScriptLocation: unknown)
...

My workflow has three Port Parameters one of which is named "ScriptLocation". 
When I run the workflow from the Kepler GUI I get the expected result (a file appears on 
my desktop) so I have some confidence that the workflow is correct. I am baffled as to 
how to get the command line invocation to set the Port Parameters.

Any advice and/or magic incantations would be greatly appreciated.

--Gary
_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

Reply via email to