Fixed AIRAVATA-1619. and removed WorkflowUtil class.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/71db390f Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/71db390f Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/71db390f Branch: refs/heads/master Commit: 71db390f49bd4a129ee08e6ae20e87edce0c7115 Parents: 366ada0 Author: shamrath <[email protected]> Authored: Wed Mar 4 14:15:25 2015 -0500 Committer: shamrath <[email protected]> Committed: Wed Mar 4 14:15:25 2015 -0500 ---------------------------------------------------------------------- .../simple/workflow/engine/WorkflowUtil.java | 63 -------------------- .../engine/parser/AiravataWorkflowParser.java | 2 +- 2 files changed, 1 insertion(+), 64 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/71db390f/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowUtil.java ---------------------------------------------------------------------- diff --git a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowUtil.java b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowUtil.java deleted file mode 100644 index a2b69ae..0000000 --- a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowUtil.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * 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.simple.workflow.engine; - -import com.google.common.eventbus.EventBus; -import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType; -import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType; -import org.apache.airavata.model.messaging.event.TaskIdentifier; -import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent; -import org.apache.airavata.model.workspace.experiment.TaskDetails; -import org.apache.airavata.model.workspace.experiment.TaskState; -import org.apache.airavata.persistance.registry.jpa.model.TaskDetail; - -public class WorkflowUtil { - - public static InputDataObjectType copyValues(InputDataObjectType fromInputObj, InputDataObjectType toInputObj){ - if (toInputObj == null) { - // TODO : throw an error - } - toInputObj.setValue(fromInputObj.getValue()); - if (fromInputObj.getApplicationArgument() != null - && !fromInputObj.getApplicationArgument().trim().equals("")) { - toInputObj.setApplicationArgument(fromInputObj.getApplicationArgument()); - } - if (toInputObj.getType() == null) { - toInputObj.setType(fromInputObj.getType()); - } - return fromInputObj; - } - - public static InputDataObjectType copyValues(OutputDataObjectType outputData, InputDataObjectType inputData) { - inputData.setValue(outputData.getValue()); - return inputData; - } - - - public static OutputDataObjectType copyValues(InputDataObjectType inputObject, OutputDataObjectType outputObject) { - if (outputObject == null) { - outputObject = new OutputDataObjectType(); - } - outputObject.setValue(inputObject.getValue()); - return outputObject; - } -} http://git-wip-us.apache.org/repos/asf/airavata/blob/71db390f/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/parser/AiravataWorkflowParser.java ---------------------------------------------------------------------- diff --git a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/parser/AiravataWorkflowParser.java b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/parser/AiravataWorkflowParser.java index 673fbdc..a430879 100644 --- a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/parser/AiravataWorkflowParser.java +++ b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/parser/AiravataWorkflowParser.java @@ -101,7 +101,7 @@ public class AiravataWorkflowParser implements WorkflowParser { } for (Node gNode : gNodes) { wfInputNode = new WorkflowInputNodeImpl(gNode.getID(), gNode.getName()); - wfInputNode.setInputObject(inputDataMap.get(wfInputNode.getName())); + wfInputNode.setInputObject(inputDataMap.get(wfInputNode.getId())); if (wfInputNode.getInputObject() == null) { // TODO: throw an error and exit. }
