Hi Michael,

I am not super knowledgeable about this, but the plugin does it like this:

        BiomobyActivityConfigurationBean bean =
getActivity().getConfiguration();
        Map<String,String> secondaries = bean.getSecondaries();
        ParametersTable table = getActivity().getParameterTable();
        int rows = table.getModel().getRowCount();
        for (int i = 0; i < rows; i++) {
                String key = (String)table.getModel().getValueAt(i,0);
                String value = table.getModel().getValueAt(i,1).toString();
                secondaries.put(key, value);
        }
        
        Edit<?> dummyEdit =
EditsRegistry.getEdits().getConfigureActivityEdit(getActivity(), bean);
        Dataflow dataflow = FileManager.getInstance().getCurrentDataflow();
        try {
                EditManager.getInstance().doDataflowEdit(dataflow,
dummyEdit);
        } catch (IllegalStateException e) {
                                
        } catch (EditException e) {
                }
I guess if you have access to the activity, you can get the config bean and
manipulate the secondaries that way. Again, I am not super knowledgeable
about this, but this could do the trick for you.

Eddie



-----Original Message-----
From: Michael Gerlich [mailto:[email protected]] 
Sent: May-20-09 5:04 AM
To: List for general discussion and hacking of the Taverna project
Subject: [Taverna-hackers] Taverna + BioMoby services

Hi,

I'd like to know if/how it is possible to programmatically change the 
parameters of a Biomoby service.
Within Taverna, one can click the "configure service" button which then 
lists all the secondary input parameters a Biomoby service has. How can 
I lookup and change these values from within external code (e.g. a 
commandline-app or a webapp), using a Dataflow object representing a 
workflow that contains a Biomoby service.
Do I have to use the Edits interface to configure Biomoby service instances?

Regards,
Michael

-- 

Michael Gerlich
Group Bioinformatics & Mass Spectrometry
Leibniz Institute of Plant Biochemistry
06120 Halle, Germany


----------------------------------------------------------------------------
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
taverna-hackers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/taverna-hackers
Developers Guide: http://www.mygrid.org.uk/usermanual1.7/dev_guide.html
FAQ: http://www.mygrid.org.uk/wiki/Mygrid/TavernaFaq


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
taverna-hackers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/taverna-hackers
Developers Guide: http://www.mygrid.org.uk/usermanual1.7/dev_guide.html
FAQ: http://www.mygrid.org.uk/wiki/Mygrid/TavernaFaq

Reply via email to