param passing

jg253 [2002-03-20 02:28:02]
param passing
Filename
proc/nrl/NRLProcessData.java
proc/nrl/NRLProcessor.java
diff --git a/proc/nrl/NRLProcessData.java b/proc/nrl/NRLProcessData.java
index 27c13ea..554efee 100644
--- a/proc/nrl/NRLProcessData.java
+++ b/proc/nrl/NRLProcessData.java
@@ -11,6 +11,9 @@ import java.io.Serializable;
  */
 public class NRLProcessData implements Serializable {

+    /** The parameter that gets passed */
+    public Object param = null;
+
   /** workflow identifier */
   public String workflowName = null;

diff --git a/proc/nrl/NRLProcessor.java b/proc/nrl/NRLProcessor.java
index 7364c8e..91942bb 100644
--- a/proc/nrl/NRLProcessor.java
+++ b/proc/nrl/NRLProcessor.java
@@ -60,6 +60,8 @@ public class NRLProcessor extends Processor {

   // BEGIN: Inherited from psl.survivor.proc.Processor /////////////////////////

+    private static Object _latestParam;
+
   /** Initialise and setup processor */
   public NRLProcessor(String name, int tcpPort, String rmiName,
                       String wfDefPath, Log l) {
@@ -83,8 +85,13 @@ public class NRLProcessor extends Processor {

     _log.executeTaskLocal(theTask);

+
     // TODO need to fix the instanceId to be unique per task, not workflow
     final NRLProcessData processData = (NRLProcessData) theTask.data2();
+
+    // TODO Modify nrl's code to not use RMI, and get rid of this
+    _latestParam = processData.param;
+
     final Object instanceId = processData.instanceId;
     try {
       // copied from WFLoader
@@ -117,6 +124,9 @@ public class NRLProcessor extends Processor {
     TaskDefinition td = _workflowData.getTaskDefinition(resultData.nextTaskName);
     Version result = theTask.split2(td, resultData);
     // System.out.println(" - - - - - - - - - - - PSL! executeTaskLocal returning version> " + result);
+
+    resultData.param = _latestParam;
+
     return result;
   }

@@ -376,5 +386,14 @@ public class NRLProcessor extends Processor {
       super(rmiPort, wfDefPath + "|" + _processorName);
     }
   }
+
+    public static void setObject(Object o) {
+	_latestParam = o;
+    }
+
+    public static Object getObject() {
+	return _latestParam;
+    }

 }
+