Hi Eddie,
thanks for your advice and sorry for the late response.
I made it till the try-catch block from your code. My problem is (so I
guess...) that I use the Taverna2 p0.1b1 code from Tom Oinn, in which
neither EditsRegistry nor EditsManager exists, but it has Edit and Edits
interfaces.
From the p0.1b1 manual, an Edits instance with the
getConfigureActivityEdit() function can be retrieved via the
WorkflowEditKit. So far so good, I'm still missing the function of
doDataflowEdit(), which is the one that matters ;-)
I'll have a look into the Javadoc of T2, maybe I'll find something there.
Alternatively, I could try to check out the whole T2 svn, guess this
should also work...
Kind regards,
Michael
Edward Kawas wrote:
> 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
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
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