On Tue, May 18, 2010 at 14:01, Wil Koetsier <[email protected]> wrote:
> I need a beanshell service that takes three input parameters. Two of
> those should be optional, meaning that the user does not have to
> bother with supplying any value when running the workflow. I have been
> looking around in the Taverna manual and mailing list, but I haven't
> found a solution yet.
If you create a beanshell script with input ports which you don't
connect in the rest of the workflow, the beanshell will threat these
variables as being 'void' - ie. unassigned.
You can test for these within the beanshell script like this:
if (base != void) {
..
}
For an example, see the "Get web page from URL" local worker, and
right click to edit the script - this script has an optional input
'base'.
The exception you mentioned probably relates to running a workflow
without providing data for the workflow input ports. If you don't
provide all data for the workflow run dialogue, an error document is
inserted on the missing ports. There is currently no way to have
optional workflow input ports,
as then parts of the workflow would not run.
(This means that if you include a nested workflow, but don't connect
all of its input ports, it will never finish - but perhaps we should
do the error-document-solution there as well? I'll add this to our bug
tracker.)
--
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
------------------------------------------------------------------------------
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/