From: <bsc...@us...> - 2009-08-13 10:36:59
|
Revision: 5164 http://unicore.svn.sourceforge.net/unicore/?rev=5164&view=rev Author: bschuller Date: 2009-08-13 10:36:51 +0000 (Thu, 13 Aug 2009) Log Message: ----------- update xnjs version; handle null key in process vars Modified Paths: -------------- workflow/trunk/workflowservice/pom.xml workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/util/InsertVariablesFilter.java workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/xnjs/NullGrounder.java Modified: workflow/trunk/workflowservice/pom.xml =================================================================== --- workflow/trunk/workflowservice/pom.xml 2009-08-13 10:33:38 UTC (rev 5163) +++ workflow/trunk/workflowservice/pom.xml 2009-08-13 10:36:51 UTC (rev 5164) @@ -65,6 +65,11 @@ <artifactId>common</artifactId> <version>2.0.1</version> </dependency> + <dependency> + <groupId>de.fzj.unicore</groupId> + <artifactId>xnjs-module-core</artifactId> + <version>1.2.2</version> + </dependency> </dependencies> <repositories> Modified: workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/util/InsertVariablesFilter.java =================================================================== --- workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/util/InsertVariablesFilter.java 2009-08-13 10:33:38 UTC (rev 5163) +++ workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/util/InsertVariablesFilter.java 2009-08-13 10:36:51 UTC (rev 5164) @@ -74,8 +74,9 @@ for(Output t: ju.getOutputs()){ if(t.getSource().contains("${")){ for(Object o: context.keySet()){ - String s="${"+o.toString()+"}"; - String p="\\$\\{"+o.toString()+"\\}"; + String key=String.valueOf(o); + String s="${"+key+"}"; + String p="\\$\\{"+key+"\\}"; if(t.getSource().contains(s)){ t.setSource(t.getSource().replaceAll(p,String.valueOf(context.get(o)))); } @@ -83,8 +84,9 @@ } if(t.getTarget().contains("${")){ for(Object o: context.keySet()){ - String s="${"+o.toString()+"}"; - String p="\\$\\{"+o.toString()+"\\}"; + String key=String.valueOf(o); + String s="${"+key+"}"; + String p="\\$\\{"+key+"\\}"; if(t.getTarget().contains(s)){ t.setTarget(t.getTarget().replaceAll(p,String.valueOf(context.get(o)))); } @@ -95,8 +97,9 @@ for(Input t: ju.getInputs()){ if(t.getSource().contains("${")){ for(Object o: context.keySet()){ - String s="${"+o.toString()+"}"; - String p="\\$\\{"+o.toString()+"\\}"; + String key=String.valueOf(o); + String s="${"+key+"}"; + String p="\\$\\{"+key+"\\}"; if(t.getSource().contains(s)){ t.setSource(t.getSource().replaceAll(p,String.valueOf(context.get(o)))); } @@ -104,8 +107,9 @@ } if(t.getTarget().contains("${")){ for(Object o: context.keySet()){ - String s="${"+o.toString()+"}"; - String p="\\$\\{"+o.toString()+"\\}"; + String key=String.valueOf(o); + String s="${"+key+"}"; + String p="\\$\\{"+key+"\\}"; if(t.getTarget().contains(s)){ t.setTarget(t.getTarget().replaceAll(p,String.valueOf(context.get(o)))); } @@ -126,8 +130,9 @@ String jobName=ju.getJsdl().getJobDefinition().getJobDescription().getJobIdentification().getJobName(); if(jobName.contains("${")){ for(Object o: context.keySet()){ - String s="${"+o.toString()+"}"; - String p="\\$\\{"+o.toString()+"\\}"; + String key=String.valueOf(o); + String s="${"+key+"}"; + String p="\\$\\{"+key+"\\}"; if(jobName.contains(s)){ jobName=jobName.replaceAll(p,String.valueOf(context.get(o))); } @@ -160,8 +165,9 @@ String value=env.getStringValue(); if(value.contains("${")){ for(Object o: context.keySet()){ - String s="${"+o.toString()+"}"; - String p="\\$\\{"+o.toString()+"\\}"; + String key=String.valueOf(o); + String s="${"+key+"}"; + String p="\\$\\{"+key+"\\}"; if(value.contains(s)){ value=value.replaceAll(p,String.valueOf(context.get(o))); } Modified: workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/xnjs/NullGrounder.java =================================================================== --- workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/xnjs/NullGrounder.java 2009-08-13 10:33:38 UTC (rev 5163) +++ workflow/trunk/workflowservice/src/main/java/eu/unicore/workflow/pe/xnjs/NullGrounder.java 2009-08-13 10:36:51 UTC (rev 5164) @@ -12,9 +12,18 @@ import de.fzj.unicore.xnjs.ems.ExecutionContext; import de.fzj.unicore.xnjs.ems.ExecutionException; import de.fzj.unicore.xnjs.jsdl.IGrounder; +import eu.unicore.jsdl.extensions.ExecutionEnvironmentDocument.ExecutionEnvironment; public class NullGrounder implements IGrounder { + public ExecutionEnvironment getExecutionEnvironment(String name) { + return null; + } + + public ExecutionEnvironment[] getExecutionEnvironments() { + return null; + } + public String getExecuteTemplate() { return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |