Hi Markus,

One work around is too invoke the workflow under Windows as a shell command 
within a CYGWIN shell.
Then the 'sh' interpreter, '#!'  and 'chmod +x' could be available as system 
calls used to Taverna.

Another tactic is to use a cross-platform scripting language like 'perl' or 
'python' to do any scripting call instead of 'sh/bash/ksh'.
I've been using Perl on both Linux and Windows for years.
Most of the POSIX functions in Windows versions of Perl are mapped to the 
appropriate Windows systems calls.

The '#!' is not supported on Windows.
Windows uses things like 'BAT' files or PowerShell for native scripting.

You organise your scripting calls with a call like 'scripting_host.exe 
./script_file_path' in a Taverna workflow.
Provided that you use a cross-platform scripting host (Perl/Python) and that 
the interpreter is in your system's search path, in theory you could make WF 
definitions cross-platform.

I've never tried as all my Taverna stuff needs only to run under Linux.

Best Regards,

G.

-----Original Message-----
From: Markus Plangg [mailto:[email protected]]
Sent: 11 February 2014 17:46
To: [email protected]
Subject: [Taverna-users] Portability with external tools

Hi,

I was trying to run, on Windows, a workflow created on Linux. The workflow 
contains an external tools. Unfortunately the workflow stores the shellPrefix 
and linkCommand set in the Taverna Workbench used to create the workflow.

<mechanismXML>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&#xD; 
&lt;localInvocation&gt;&lt;shellPrefix&gt;/bin/sh
-c&lt;/shellPrefix&gt;&lt;linkCommand&gt;/bin/ln -s %%PATH_TO_ORIGINAL%% 
%%TARGET_NAME%%&lt;/linkCommand&gt;&lt;/localInvocation&gt;&#xD;
</mechanismXML>


When running the workflow on Windows, Taverna can't find /bin/sh:

Set of ErrorDocuments to follow.
ErrorDocument 1
Processor 'extractFits' - Port 'STDOUT': java.io.IOException: Cannot run 
program "/bin/sh" (in directory
"[...]\AppData\Local\Temp\usecase4854886647462960002dir"): CreateProcess 
error=2, Das System kann die angegebene Datei nicht finden
de.uni_luebeck.inb.knowarc.usecases.invocation.InvocationException:
java.io.IOException: Cannot run program "/bin/sh" (in directory
"[...]\AppData\Local\Temp\usecase4854886647462960002dir"): CreateProcess 
error=2, Das System kann die angegebene Datei nicht finden
de.uni_luebeck.inb.knowarc.usecases.invocation.local.LocalUseCaseInvocation.submit_generate_job_inner(LocalUseCaseInvocation.java:362)

de.uni_luebeck.inb.knowarc.usecases.invocation.UseCaseInvocation.submit_generate_job(UseCaseInvocation.java:260)

net.sf.taverna.t2.activities.externaltool.ExternalToolActivity$1.run(ExternalToolActivity.java:255)

java.lang.Thread.run(unknown file)


Is there a way to make the workflows more portable, e.g. in cases where the 
Windows and Linux commands are equivalent and no special shell commands are 
used?

Cheers,
Markus

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com 
______________________________________________________________________
This E-Mail is sent in confidence for the addressee only. Unauthorised 
recipients must preserve this confidentiality and should please advise the 
sender immediately by telephone (+1 (617) 600- 4300) and return the original 
E-Mail to the sender without taking a copy. Cyprotex has taken all reasonable 
precautions to ensure that no viruses are transmitted from Cyprotex to any 
third party. Cyprotex accepts no responsibility for any loss or damage 
resulting directly or indirectly from the use of this E-Mail or the contents.

This E-Mail is sent in confidence for the addressee only.  Unauthorised 
recipients must preserve this confidentiality and should please advise the 
sender immediately by telephone (+44 (0)1625 505100) and return the original 
E-Mail to the sender without taking a copy. Cyprotex has taken all reasonable 
precautions to ensure that no viruses are transmitted from Cyprotex to any 
third party.  Cyprotex accepts no responsibility for any loss or damage 
resulting directly or indirectly from the use of this E-Mail or the contents.

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/

Reply via email to