How about say.. 40 characters? Anything more would look weird on the diagram..

This regular expression instance can help you filter away weird characters:
https://github.com/apache/incubator-taverna-language/blob/master/taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/common/Named.java#L36
https://taverna.incubator.apache.org/javadoc/taverna-language/org/apache/taverna/scufl2/api/common/Named.html#INVALID_NAME


You should be able to use it as say

import org.apache.taverna.scufl2.api.common.Named;
portName = Named.INVALID_NAME.matcher(cwlName).replaceAll("_");


(Perhaps such a utility method could be added to taverna-language)


You can then use processor.getInputPorts().addWithUIniqueName() which
will rename the port to have a suffix number (2 or higher) if needed
to avoid duplicates. (the final name is returned)

https://taverna.incubator.apache.org/javadoc/taverna-language/org/apache/taverna/scufl2/api/common/NamedSet.html

On 26 June 2016 at 15:34, Thilina Manamgoda <[email protected]> wrote:
> Hi,
>
>
> Any suggestions on how can i make a good port names in Taverna workbench.
> Because if the port name in CWL tool is too long it's going to be a
> problem.
>
> 1.What is the suitable number of characters that port name can have.
>
> 2. Removing space is one approach can anyone suggest more ?
>
>
> regards,
> Thlina.



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons
http://orcid.org/0000-0001-9842-9718

Reply via email to