taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stian Soiland-Reyes <st...@apache.org>
Subject Re: Taverna-cwl tool description
Date Wed, 01 Jun 2016 12:52:35 GMT
Hi, sorry for late reply.


On 28 May 2016 at 20:05, Thilina Manamgoda <maanafunedu@gmail.com> wrote:
> Hi ,
>
> addInput(IN_FIRST_INPUT, 0, true, null, String.class);
>
> when addInput method is called i should pass the class which is, the inputs
> are going to be rendered. In the tutorial it's String.class .But if it
> expect an Integer should it be Integer.class ? .

No, as mentioned last week, the base types can all generally be
"String" Taverna-wise, as there should not be a need to convert them
to say Integer, if the next step is to insert the value **as a
string** to the CWL  command line as an argument or as file content.


This would be different once we want to support the JSON pointers or
scripts, as then they should be the correct type within the JSON
environment.  I am not sure we would have converters for all the
native types in CWL, these are the ones we have:

https://github.com/apache/incubator-taverna-engine/tree/master/taverna-reference-types/src/main/java/org/apache/taverna/reference/impl/external/object


> In CWL type it has "File" type beside primitive types. So what class should
> I pass for these inputs .?

I think just a neutral byte[].

> Also for "null" is a CWL type , which class should i pass for this input
> type ?

Uhu...we don't have optional values in Taverna, they could be done as
some kind of error document. So perhaps ignore those for now, or if
"null" is the only type, say byte[].

Ref: https://github.com/common-workflow-language/common-workflow-language/issues/221



> Also when it is an  array of Integers  of depth 1, what is the argument for
> rendering class ? Integer[] .class or byte[].class ?

No, it would be Integer.class (or String.class), and then depth 1 (and
granular depth 1) to indicate a list of Integers.





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

Mime
View raw message