Michael Gerlich wrote:
> Hi all,
>
> I'd like to know if there is a function in the T2 API to stop parsing a
> worflow after a certain amount of time. I have workflows here which use
> ChemSpider services and currently, the whole ChemSpider website seems to
> be unreachable, including their WSDL files.
> So I thought it might be possible to stop parsing a workflow file after
> some threshold time (lower than the default (?) of 5 minutes)?
>
> I currently use this little piece of code:
>
> private ApplicationContext context;
> private TavernaBaseProfile profile;
> private WorkflowParser parser;
> ....
> this.context = new RavenAwareClassPathXmlApplicationContext("context.xml");
> this.profile = new TavernaBaseProfile(context);
> this.parser = this.profile.getWorkflowParser();
> ....
> Dataflow workflow = parser.createDataflow(workflowURL);
> ...
>
I can't see any explicit methods for this in the API. The problem is
that it is calling WSDLActivity.configure which tries to parse the WSDL.
It is the multiple (sequential from the look of the code) timeouts on
the fetching of the WSDL that is causing the overall delay.
I think the easiest way would be to put the parser.createDataflow in a
thread and then have a timer that after 5 minutes kills off the
createDataflow thread if it is still running.
> Any ideas?
>
> Kind Regards,
> Michael
Alan
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
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