ow2-proactive / scheduling

Multi-platform Scheduling and Workflows Engine
http://www.activeeon.com/workflows-scheduling
GNU Affero General Public License v3.0
62 stars 55 forks source link

Variable propagation support for JSR 223 Bash Engine #1984

Closed activeeon-bot closed 9 years ago

activeeon-bot commented 9 years ago

Original issue created by Mauricio Jost on 16, Jan 2015 at 10:13 AM - SCHEDULING-2220


Currently it is possible to read the variables map from bash scripts, but it is not possible to set new ones.

activeeon-bot commented 9 years ago

Original comment posted by Youri Bonnaffe on 16, Jan 2015 at 10:21 AM


It is a limitation from the fact this engine forks a process and the only we can get is the exit code. A possible workaround would be to write to a file and use post script to read it back and then write the variables

activeeon-bot commented 9 years ago

Original comment posted by Mauricio Jost on 16, Jan 2015 at 11:31 AM


Here there is an example of a job that uses a workaround. The idea is to use a post script to read a file created in bash task, a file containing all variables to be propagated.

{noformat} <?xml version="1.0" encoding="UTF-8"?> <job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:proactive:jobdescriptor:3.2" xsi:schemaLocation="urn:proactive:jobdescriptor:3.2 http://www.activeeon.com/public_content/schemas/proactive/jobdescriptor/3.2/schedulerjob.xsd" name="Untitled Job" priority="normal" cancelJobOnError="false">

{noformat}