Hi,

I am trying to develop my own plugin, referring existing plugin codes as
examples.
May I have information how-to-use the APIs to acheive issues described
below?

Targeting at Taverna version 2.1beta or later, I would like to create:

1. A plugin without input, allows output streaming, has output ports of
depth 1, each port outputs the same length of list.

What happens when an activity of the later workflow recieves two (or more)
of such "synchronized" depth-1-outputs,
is it possible to recieve the same index of each output?

In the BiomartActivity,
...
                    if (attribute.getAttributes() != null) {
                        outputPort = edits.createActivityOutputPort(name, 2,
STREAM_RESULTS?1:2);
                    } else {
                        outputPort = edits.createActivityOutputPort(name, 1,
STREAM_RESULTS?0:1);
                    }
...
seems like creating output ports for streaming, but not sure what the
arguments exactly mean.
What should I do to create output ports -- do I need to do something both
for streaming and non-streaming depending on some context?

I have tried a simple test code imitating the BiomartActivity code as below
but it loops forever, and every recieveResult call seems like generating
these errors:

ERROR 2009-10-06 12:40:51,387
(net.sf.taverna.t2.workflowmodel.processor.dispatch.AbstractErrorHandlerLayer:166)
- Could not forget [...@48d334]
ERROR 2009-10-06 12:40:51,396
(net.sf.taverna.t2.workflowmodel.processor.dispatch.AbstractErrorHandlerLayer:166)
- Could not forget [...@48d334]

codes are:

    public void executeAsynch(final Map<String, T2Reference> data,
            final AsynchronousActivityCallback callback) {
        callback.requestRun(new Runnable() {

          public void run() {
            final ReferenceService referenceService =
callback.getContext().getReferenceService();

              int index = 0;
              do {
                // run
                if ( index != 0 ) {
                  // initialization
                }

                Map<String, T2Reference> outputData = new HashMap<String,
T2Reference>();

                if ( index == 3 ) {
                  // terminate after iterating three times
                  callback.receiveResult(outputData, new
int[0]);
                } else {
                  // get outputs
                  callback.receiveResult(outputData,
                      new int[] { (int) index });
                  index++;
                }
              } while ( index <= 3 );
        }



Would you please give me some clue how to use methods In "public interface
AsynchronousActivityCallback",
  public abstract void requestRun(Runnable runnable)
  public abstract void receiveResult(Map map, int ai[]);
  public abstract void receiveCompletion(int ai[]);



2. A plugin very similar to the BeanshellActivity,
but need to know the end-of-the-iteration of inputs (or workflow).
How can I notice such a condition -- which methods to use?


3. After developing these plugins, I would like to make my repository
public.
When I added my repository location manually to the Taverna's plugins.xml it
worked fine,
but it does not appear in the Taverna GUI's "Find New Plugins" menu.
What sort of file should I add to my repository for Taverna to detect my
plugin, including update detections?

Thank you very much in advance,

-Yoshinobu
-- 
Yoshinobu Kano (Given/Family)
[email protected]
Project Research Associate, the University of Tokyo / U-Compare Project Lead
http://www-tsujii.is.s.u-tokyo.ac.jp/ http://u-compare.org/kano/
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/
Developers Guide: http://www.mygrid.org.uk/tools/developer-information

Reply via email to