You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by pa...@apache.org on 2011/09/01 18:58:48 UTC

svn commit: r1164166 - in /incubator/airavata/trunk/modules/gfac-core: ./ src/main/java/META-INF/ src/main/java/org/apache/airavata/core/gfac/context/ src/main/java/org/apache/airavata/core/gfac/context/impl/ src/main/java/org/apache/airavata/core/gfac...

Author: patanachai
Date: Thu Sep  1 16:58:48 2011
New Revision: 1164166

URL: http://svn.apache.org/viewvc?rev=1164166&view=rev
Log:
Add the workflow tracking notification service

Added:
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/LoggingNotification.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/WorkflowTrackingNotification.java
Modified:
    incubator/airavata/trunk/modules/gfac-core/pom.xml
    incubator/airavata/trunk/modules/gfac-core/src/main/java/META-INF/
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/DummyNotification.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/StandardOutNotification.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/SSHProvider.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java

Modified: incubator/airavata/trunk/modules/gfac-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/pom.xml?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/pom.xml (original)
+++ incubator/airavata/trunk/modules/gfac-core/pom.xml Thu Sep  1 16:58:48 2011
@@ -105,23 +105,11 @@
 		</dependency>
 
 		<!-- Workflow Tracking -->
-		<dependency>
-			<groupId>workflow-tracking</groupId>
-			<artifactId>workflow_tracking</artifactId>
-			<version>2.7.1</version>
-			<type>jar</type>
-		</dependency>
-		<dependency>
-			<groupId>workflow-tracking</groupId>
-			<artifactId>workflow_tracking_types</artifactId>
-			<version>2.6</version>
-			<type>jar</type>
-		</dependency>
-		<dependency>
-			<groupId>workflow-context-header</groupId>
-			<artifactId>workflow-context-header</artifactId>
-			<version>1.0</version>
-		</dependency>
+        <dependency>
+            <groupId>airavata</groupId>
+            <artifactId>airavata-workflowtracking</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>                
 
 		<!-- Xregistry jars -->
 		<dependency>

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/ExecutionContext.java Thu Sep  1 16:58:48 2011
@@ -23,14 +23,9 @@ package org.apache.airavata.core.gfac.co
 
 import org.apache.airavata.core.gfac.api.Registry;
 import org.apache.airavata.core.gfac.notification.NotificationService;
-import org.ogce.namespaces.x2010.x08.x30.workflowContextHeader.WorkflowContextHeaderDocument.WorkflowContextHeader;
 
 public interface ExecutionContext {
 
-    WorkflowContextHeader getWorkflowHeader();
-
-    void setWorkflowHeader(WorkflowContextHeader header);
-
     NotificationService getNotificationService();
 
     void setNotificationService(NotificationService service);    

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/impl/ExecutionContextImpl.java Thu Sep  1 16:58:48 2011
@@ -24,22 +24,12 @@ package org.apache.airavata.core.gfac.co
 import org.apache.airavata.core.gfac.api.Registry;
 import org.apache.airavata.core.gfac.context.ExecutionContext;
 import org.apache.airavata.core.gfac.notification.NotificationService;
-import org.ogce.namespaces.x2010.x08.x30.workflowContextHeader.WorkflowContextHeaderDocument.WorkflowContextHeader;
 
 public class ExecutionContextImpl implements ExecutionContext {
 
-    private WorkflowContextHeader workflowContextHeader;
     private NotificationService notificationService;
     private Registry registryService;
 
-    public WorkflowContextHeader getWorkflowHeader() {
-        return workflowContextHeader;
-    }
-
-    public void setWorkflowHeader(WorkflowContextHeader header) {
-        this.workflowContextHeader = header;
-    }
-
     public NotificationService getNotificationService() {
         return this.notificationService;
     }

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/NotificationService.java Thu Sep  1 16:58:48 2011
@@ -29,8 +29,8 @@ public interface NotificationService {
     /*
      * 
      */
-    void startSchedule(Object notifer, InvocationContext context, Scheduler scheduler);
-    void finishSchedule(Object notifer, InvocationContext context, Scheduler scheduler, Provider provider);
+    void startSchedule(Object notifier, InvocationContext context, Scheduler scheduler);
+    void finishSchedule(Object notifier, InvocationContext context, Scheduler scheduler, Provider provider);
     
     /*
      * 
@@ -41,17 +41,17 @@ public interface NotificationService {
     /*
      * 
      */
-    void startExecution(Object notifer, InvocationContext context);
+    void startExecution(Object notifier, InvocationContext context);
     void applicationInfo(Object notifier, InvocationContext context, String... data);
-    void finishExecution(Object notifer, InvocationContext context);
-    void statusChanged(Object notifer, InvocationContext context, String... data);
-    void executionFail(Object notifer, InvocationContext context, Exception e, String... data);    
+    void finishExecution(Object notifier, InvocationContext context);
+    void statusChanged(Object notifier, InvocationContext context, String... data);
+    void executionFail(Object notifier, InvocationContext context, Exception e, String... data);    
 
     /*
      * Interface for developer to use
      */
-    void debug(Object notifer, InvocationContext context, String... data);
-    void info(Object notifer, InvocationContext context, String... data);
-    void warning(Object notifer, InvocationContext context, String... data);
-    void exception(Object notifer, InvocationContext context, String... data);        
+    void debug(Object notifier, InvocationContext context, String... data);
+    void info(Object notifier, InvocationContext context, String... data);
+    void warning(Object notifier, InvocationContext context, String... data);
+    void exception(Object notifier, InvocationContext context, String... data);        
 }

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/DummyNotification.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/DummyNotification.java?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/DummyNotification.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/DummyNotification.java Thu Sep  1 16:58:48 2011
@@ -1,3 +1,24 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
 package org.apache.airavata.core.gfac.notification.impl;
 
 import org.apache.airavata.core.gfac.context.InvocationContext;
@@ -7,10 +28,10 @@ import org.apache.airavata.core.gfac.sch
 
 public class DummyNotification implements NotificationService {
 
-    public void startSchedule(Object notifer, InvocationContext context, Scheduler scheduler) {
+    public void startSchedule(Object notifier, InvocationContext context, Scheduler scheduler) {
     }
 
-    public void finishSchedule(Object notifer, InvocationContext context, Scheduler scheduler, Provider provider) {
+    public void finishSchedule(Object notifier, InvocationContext context, Scheduler scheduler, Provider provider) {
     }
 
     public void input(Object notifier, InvocationContext context, String... data) {
@@ -19,31 +40,31 @@ public class DummyNotification implement
     public void output(Object notifier, InvocationContext context, String... data) {
     }
 
-    public void startExecution(Object notifer, InvocationContext context) {
+    public void startExecution(Object notifier, InvocationContext context) {
     }
 
     public void applicationInfo(Object notifier, InvocationContext context, String... data) {
     }
 
-    public void finishExecution(Object notifer, InvocationContext context) {
+    public void finishExecution(Object notifier, InvocationContext context) {
     }
 
-    public void statusChanged(Object notifer, InvocationContext context, String... data) {
+    public void statusChanged(Object notifier, InvocationContext context, String... data) {
     }
 
-    public void executionFail(Object notifer, InvocationContext context, Exception e, String... data) {
+    public void executionFail(Object notifier, InvocationContext context, Exception e, String... data) {
     }
 
-    public void debug(Object notifer, InvocationContext context, String... data) {
+    public void debug(Object notifier, InvocationContext context, String... data) {
     }
 
-    public void info(Object notifer, InvocationContext context, String... data) {
+    public void info(Object notifier, InvocationContext context, String... data) {
     }
 
-    public void warning(Object notifer, InvocationContext context, String... data) {
+    public void warning(Object notifier, InvocationContext context, String... data) {
     }
 
-    public void exception(Object notifer, InvocationContext context, String... data) {
+    public void exception(Object notifier, InvocationContext context, String... data) {
     }
 
 }

Added: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/LoggingNotification.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/LoggingNotification.java?rev=1164166&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/LoggingNotification.java (added)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/LoggingNotification.java Thu Sep  1 16:58:48 2011
@@ -0,0 +1,95 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.core.gfac.notification.impl;
+
+import org.apache.airavata.core.gfac.context.InvocationContext;
+import org.apache.airavata.core.gfac.notification.NotificationService;
+import org.apache.airavata.core.gfac.provider.Provider;
+import org.apache.airavata.core.gfac.scheduler.Scheduler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LoggingNotification implements NotificationService {
+    
+    protected final Logger log = LoggerFactory.getLogger(LoggingNotification.class);
+
+    public void startSchedule(Object notifier, InvocationContext context, Scheduler scheduler) {
+        printOut(notifier, context, null);
+    }
+
+    public void finishSchedule(Object notifier, InvocationContext context, Scheduler scheduler, Provider provider) {
+        printOut(notifier, context, null);
+    }
+
+    public void input(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    public void output(Object notifier, InvocationContext context, String... data) {
+    }
+
+    public void startExecution(Object notifier, InvocationContext context) {
+        printOut(notifier, context, null);
+    }
+
+    public void applicationInfo(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    public void finishExecution(Object notifier, InvocationContext context) {
+        printOut(notifier, context, null);
+    }
+
+    public void statusChanged(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    public void executionFail(Object notifier, InvocationContext context, Exception e, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    public void debug(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    public void info(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    public void warning(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    public void exception(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    private void printOut(Object notifier, InvocationContext context, String... data) {
+        log.info("Notifier: " + notifier.getClass().toString());
+        if (data != null) {
+            log.info("-----DATA-----");
+            for (int i = 0; i < data.length; i++) {
+                log.info(data[i]);
+            }
+            log.info("-----END DATA-----");
+        }
+    }
+}

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/StandardOutNotification.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/StandardOutNotification.java?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/StandardOutNotification.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/StandardOutNotification.java Thu Sep  1 16:58:48 2011
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
 package org.apache.airavata.core.gfac.notification.impl;
 
 import org.apache.airavata.core.gfac.context.InvocationContext;
@@ -7,43 +27,66 @@ import org.apache.airavata.core.gfac.sch
 
 public class StandardOutNotification implements NotificationService {
 
-    public void startSchedule(Object notifer, InvocationContext context, Scheduler scheduler) {
+    public void startSchedule(Object notifier, InvocationContext context, Scheduler scheduler) {
+        printOut(notifier, context, null);
     }
 
-    public void finishSchedule(Object notifer, InvocationContext context, Scheduler scheduler, Provider provider) {
+    public void finishSchedule(Object notifier, InvocationContext context, Scheduler scheduler, Provider provider) {
+        printOut(notifier, context, null);
     }
 
     public void input(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
     }
 
     public void output(Object notifier, InvocationContext context, String... data) {
     }
 
-    public void startExecution(Object notifer, InvocationContext context) {
+    public void startExecution(Object notifier, InvocationContext context) {
+        printOut(notifier, context, null);
     }
 
     public void applicationInfo(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
     }
 
-    public void finishExecution(Object notifer, InvocationContext context) {
+    public void finishExecution(Object notifier, InvocationContext context) {
+        printOut(notifier, context, null);
     }
 
-    public void statusChanged(Object notifer, InvocationContext context, String... data) {
+    public void statusChanged(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
     }
 
-    public void executionFail(Object notifer, InvocationContext context, Exception e, String... data) {
+    public void executionFail(Object notifier, InvocationContext context, Exception e, String... data) {
+        printOut(notifier, context, data);
     }
 
-    public void debug(Object notifer, InvocationContext context, String... data) {
+    public void debug(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
     }
 
-    public void info(Object notifer, InvocationContext context, String... data) {
+    public void info(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
     }
 
-    public void warning(Object notifer, InvocationContext context, String... data) {
+    public void warning(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
     }
 
-    public void exception(Object notifer, InvocationContext context, String... data) {
+    public void exception(Object notifier, InvocationContext context, String... data) {
+        printOut(notifier, context, data);
+    }
+
+    private void printOut(Object notifier, InvocationContext context, String... data) {
+        System.out.println("Notifier: " + notifier.getClass().toString());
+        if (data != null) {
+            System.out.println("-----DATA-----");
+            for (int i = 0; i < data.length; i++) {
+                System.out.println(data[i]);
+            }
+            System.out.println("-----END DATA-----");
+        }
     }
 
 }

Added: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/WorkflowTrackingNotification.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/WorkflowTrackingNotification.java?rev=1164166&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/WorkflowTrackingNotification.java (added)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/notification/impl/WorkflowTrackingNotification.java Thu Sep  1 16:58:48 2011
@@ -0,0 +1,126 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.core.gfac.notification.impl;
+
+import java.net.URI;
+import java.util.Properties;
+
+import org.apache.airavata.core.gfac.context.InvocationContext;
+import org.apache.airavata.core.gfac.notification.NotificationService;
+import org.apache.airavata.core.gfac.provider.Provider;
+import org.apache.airavata.core.gfac.scheduler.Scheduler;
+import org.apache.airavata.workflow.tracking.Notifier;
+import org.apache.airavata.workflow.tracking.NotifierFactory;
+import org.apache.airavata.workflow.tracking.common.DurationObj;
+import org.apache.airavata.workflow.tracking.common.InvocationEntity;
+import org.apache.airavata.workflow.tracking.common.WorkflowTrackingContext;
+
+public class WorkflowTrackingNotification implements NotificationService {
+    
+    private Notifier notifier;
+
+    private String topic;
+
+    private URI workflowID;
+
+    private WorkflowTrackingContext context;
+    
+    private InvocationEntity initiator;
+
+    private InvocationEntity receiver;
+    
+    private DurationObj duration;
+
+    private org.apache.airavata.workflow.tracking.common.InvocationContext invocationContext;
+                
+    public WorkflowTrackingNotification(String brokerURL, String topic) {
+        this.topic = topic;
+        this.workflowID = URI.create(this.topic);
+        Properties props = new Properties();
+
+        this.notifier = NotifierFactory.createNotifier();
+        URI initiatorWorkflowID = null;
+        URI initiatorServiceID = URI.create(topic);
+        String initiatorWorkflowNodeID = null;
+        Integer initiatorWorkflowTimeStep = null;
+        this.context = this.notifier.createTrackingContext(props, brokerURL, initiatorWorkflowID,
+                initiatorServiceID, initiatorWorkflowNodeID, initiatorWorkflowTimeStep);
+        this.context.setTopic(topic);
+        this.initiator = this.notifier.createEntity(initiatorWorkflowID, initiatorServiceID, initiatorWorkflowNodeID,
+                initiatorWorkflowTimeStep);
+
+        URI receiverWorkflowID = this.workflowID;
+        URI receiverServiceID = this.workflowID;
+        String receiverWorkflowNodeID = null;
+        Integer receiverWorkflowTimeStep = null;
+        this.receiver = this.notifier.createEntity(receiverWorkflowID, receiverServiceID, receiverWorkflowNodeID,
+                receiverWorkflowTimeStep);
+                
+        //send start workflow
+        this.invocationContext = this.notifier.workflowInvoked(this.context, this.initiator, null);
+    }
+
+    public void startSchedule(Object notifier, InvocationContext context, Scheduler scheduler) {
+    }
+
+    public void finishSchedule(Object notifier, InvocationContext context, Scheduler scheduler, Provider provider) {
+    }
+
+    public void input(Object notifier, InvocationContext context, String... data) {
+    }
+
+    public void output(Object notifier, InvocationContext context, String... data) {
+    }
+
+    public void startExecution(Object notifier, InvocationContext context) {
+        this.duration = this.notifier.computationStarted();
+    }
+
+    public void applicationInfo(Object notifier, InvocationContext context, String... data) {
+    }
+
+    public void finishExecution(Object notifier, InvocationContext context) {
+        this.duration = this.notifier.computationFinished(this.context, this.duration);
+    }
+
+    public void statusChanged(Object notifier, InvocationContext context, String... data) {
+        this.notifier.info(this.context, data);
+    }
+
+    public void executionFail(Object notifier, InvocationContext context, Exception e, String... data) {
+        this.notifier.sendingFault(this.context, this.invocationContext, data);
+    }
+
+    public void debug(Object notifier, InvocationContext context, String... data) {
+    }
+
+    public void info(Object notifier, InvocationContext context, String... data) {
+        this.notifier.info(this.context, data);
+    }
+
+    public void warning(Object notifier, InvocationContext context, String... data) {
+    }
+
+    public void exception(Object notifier, InvocationContext context, String... data) {
+    }
+
+}

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/SSHProvider.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/SSHProvider.java?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/SSHProvider.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/SSHProvider.java Thu Sep  1 16:58:48 2011
@@ -47,8 +47,6 @@ import org.apache.airavata.core.gfac.uti
 import org.apache.airavata.core.gfac.utils.GfacUtils;
 import org.apache.airavata.core.gfac.utils.OutputUtils;
 
-import edu.indiana.extreme.lead.workflow_tracking.common.DurationObj;
-
 public class SSHProvider extends AbstractProvider {
 
     private static final String SPACE = " ";

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java?rev=1164166&r1=1164165&r2=1164166&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java Thu Sep  1 16:58:48 2011
@@ -33,8 +33,6 @@ import org.apache.airavata.core.gfac.typ
 import org.apache.airavata.core.gfac.type.host.GlobusHost;
 import org.apache.airavata.core.gfac.utils.GFacConstants;
 import org.globus.gram.GramAttributes;
-import org.ogce.namespaces.x2010.x08.x30.workflowContextHeader.WorkflowContextHeaderDocument.WorkflowContextHeader;
-import org.ogce.namespaces.x2010.x08.x30.workflowResourceMapping.ResourceMappingDocument.ResourceMapping;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,11 +44,10 @@ public class GramRSLGenerator {
     };
 
     public static GramAttributes configureRemoteJob(InvocationContext context) throws GfacException {
-    	GlobusHost host = (GlobusHost)context.getGfacContext().getHost();
-    	GramApplicationDeployment app = (GramApplicationDeployment)context.getGfacContext().getApp();
+        GlobusHost host = (GlobusHost) context.getGfacContext().getHost();
+        GramApplicationDeployment app = (GramApplicationDeployment) context.getGfacContext().getApp();
         ServiceDescription service = context.getGfacContext().getService();
-    	
-    	
+
         GramAttributes jobAttr = new GramAttributes();
         jobAttr.setExecutable(app.getExecutable());
         jobAttr.setDirectory(app.getWorkingDir());
@@ -58,27 +55,19 @@ public class GramRSLGenerator {
         jobAttr.setStderr(app.getStdErr());
 
         /*
-         * The env here contains the env of the host and the application. i.e the env specified in the host description and application description documents
+         * The env here contains the env of the host and the application. i.e
+         * the env specified in the host description and application description
+         * documents
          */
         Map<String, String> nv = app.getEnv();
         for (String key : nv.keySet()) {
             jobAttr.addEnvVariable(key, nv.get(key));
         }
 
-        jobAttr.addEnvVariable(GFacConstants.INPUT_DATA_DIR_VAR_NAME, app.getInputDir());        
+        jobAttr.addEnvVariable(GFacConstants.INPUT_DATA_DIR_VAR_NAME, app.getInputDir());
         jobAttr.addEnvVariable(GFacConstants.INPUT_DATA_DIR_VAR_NAME, app.getOutputDir());
-        
-        WorkflowContextHeader contextHeader = context.getExecutionContext().getWorkflowHeader();
-        ResourceMapping resourceMapping = null;
-        if (contextHeader != null) {
-            resourceMapping = contextHeader.getResourceMappings().getResourceMappingArray(0);
-        }
-        
-        if (resourceMapping != null && resourceMapping.getMaxWallTime() > 0) {
-            log.info("Header Setting Max Wall Time" + resourceMapping.getMaxWallTime());
-            jobAttr.setMaxWallTime(resourceMapping.getMaxWallTime());
 
-        } else if (app.getWallTime() > 0) {
+        if (app.getWallTime() > 0) {
             log.info("Setting max wall clock time to " + app.getWallTime());
 
             if (app.getWallTime() > 30 && app.getQueueName() != null && app.getQueueName().equals("debug")) {
@@ -94,47 +83,35 @@ public class GramRSLGenerator {
         if (app.getStdIn() != null) {
             jobAttr.setStdin(app.getStdIn());
         } else {
-        	// input parameter
+            // input parameter
             ArrayList<String> tmp = new ArrayList<String>();
             for (Iterator<String> iterator = context.getMessageContext("input").getParameterNames(); iterator.hasNext();) {
                 String key = iterator.next();
                 jobAttr.addArgument(context.getMessageContext("input").getStringParameterValue(key));
-            }        	
+            }
         }
 
-        if (resourceMapping != null && resourceMapping.getNodeCount() > 0) {
-            log.info("Setting number of procs to " + resourceMapping.getNodeCount());
-            jobAttr.set("hostCount", String.valueOf(resourceMapping.getNodeCount()));
-        } else if (app.getNodeCount() > 1) {
+        if (app.getNodeCount() > 1) {
             jobAttr.set("hostCount", String.valueOf(app.getNodeCount()));
         }
-        if (resourceMapping != null && resourceMapping.getCpuCount() > 0) {
-            log.info("Setting host count to " + resourceMapping.getCpuCount());
-            jobAttr.setNumProcs(resourceMapping.getCpuCount());
-
-        } else if (app.getCpuCount() > 1) {
+        if (app.getCpuCount() > 1) {
             log.info("Setting number of procs to " + app.getCpuCount());
             jobAttr.setNumProcs(app.getCpuCount());
         }
-
-        if (app.getProjectName() != null){
+        if (app.getProjectName() != null) {
             log.info("Setting project to " + app.getProjectName());
             jobAttr.setProject(app.getProjectName());
         }
-
-        if (resourceMapping != null && resourceMapping.getQueueName() != null) {
-            jobAttr.setQueue(resourceMapping.getQueueName());
-        } else if (app.getQueueName() != null) {
+        if (app.getQueueName() != null) {
             log.info("Setting job queue to " + app.getQueueName());
             jobAttr.setQueue(app.getQueueName());
         }
-        
-        
+
         String jobType = JobType.SINGLE.toString();
         if (app.getJobType() != null) {
             jobType = app.getJobType().toString();
         }
-        
+
         if (jobType.equalsIgnoreCase(JobType.SINGLE.toString())) {
             log.info("Setting job type to single");
             jobAttr.setJobType(GramAttributes.JOBTYPE_SINGLE);
@@ -146,9 +123,9 @@ public class GramRSLGenerator {
             jobAttr.setJobType(GramAttributes.JOBTYPE_MULTIPLE);
         } else if (jobType.equalsIgnoreCase(JobType.CONDOR.toString())) {
             jobAttr.setJobType(GramAttributes.JOBTYPE_CONDOR);
-        }       
+        }
 
-        //TODO rsl parameter & urgency/SPRUCE
+        // TODO rsl parameter & urgency/SPRUCE
 
         return jobAttr;
     }