You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2013/12/26 18:31:40 UTC
svn commit: r1553518 [15/15] - in /airavata/sandbox: orchestrator-service/
orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/
orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/
o...
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,236 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.airavata.common.utils.StringUtil;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+public class NodeExecutionData {
+ private WorkflowInstanceNode workflowInstanceNode;
+ private List<InputData> inputData;
+ private List<OutputData> outputData;
+ private String input;
+ private String output;
+ private NodeExecutionStatus status;
+ private WorkflowNodeType.WorkflowNode type;
+ private String experimentId;
+ private String workflowExecutionId;
+ private String nodeId;
+
+ public NodeExecutionData() {
+ }
+
+ /**
+ * deprecated Use <code>NodeExecutionData(String experimentId, String workflowExecutionId, String nodeId)</code> instead
+ * @param workflowInstanceNode
+ */
+ public NodeExecutionData(WorkflowInstanceNode workflowInstanceNode) {
+ this(workflowInstanceNode.getWorkflowInstance().getExperimentId(),workflowInstanceNode.getWorkflowInstance().getWorkflowExecutionId(),workflowInstanceNode.getNodeId());
+ setWorkflowInstanceNode(workflowInstanceNode);
+ }
+
+ public NodeExecutionData(String experimentId, String workflowExecutionId, String nodeId) {
+ this.experimentId=experimentId;
+ this.workflowExecutionId=workflowExecutionId;
+ this.nodeId=nodeId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getId()
+ */
+ public String getId(){
+ return nodeId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getExperimentId()
+ */
+ public String getExperimentId(){
+ return experimentId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getWorkflowExecutionId()
+ */
+ public String getWorkflowExecutionId(){
+ return workflowExecutionId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getWorkflowInstanceNode()
+ */
+ public WorkflowInstanceNode getWorkflowInstanceNode() {
+ return workflowInstanceNode;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setWorkflowInstanceNode(org.apache.airavata.registry.api.workflow.WorkflowInstanceNode)
+ */
+ public void setWorkflowInstanceNode(WorkflowInstanceNode workflowInstanceNode) {
+ this.workflowInstanceNode = workflowInstanceNode;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getStatus()
+ */
+ public NodeExecutionStatus getStatus() {
+ return status;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setStatus(org.apache.airavata.registry.api.workflow.NodeExecutionStatus)
+ */
+ public void setStatus(NodeExecutionStatus status) {
+ this.status = status;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setStatus(org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State, java.util.Date)
+ */
+ public void setStatus(WorkflowExecutionStatus.State status, Date date) {
+ setStatus(new NodeExecutionStatus(this.workflowInstanceNode, status, date));
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getInputData()
+ */
+ public List<InputData> getInputData() {
+ if (inputData==null){
+ inputData=new ArrayList<InputData>();
+ List<NameValue> data = getIOParameterData(getInput());
+ for (NameValue nameValue : data) {
+ inputData.add(new InputData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
+ }
+ }
+ return inputData;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getOutputData()
+ */
+ public List<OutputData> getOutputData() {
+ if (outputData==null){
+ outputData=new ArrayList<OutputData>();
+ List<NameValue> data = getIOParameterData(getOutput());
+ for (NameValue nameValue : data) {
+ outputData.add(new OutputData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
+ }
+ }
+ return outputData;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setInputData(java.util.List)
+ */
+ public void setInputData(List<InputData> inputData) {
+ this.inputData = inputData;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setOutputData(java.util.List)
+ */
+ public void setOutputData(List<OutputData> outputData) {
+ this.outputData = outputData;
+ }
+
+ public String getInput() {
+ return input;
+ }
+
+ public void setInput(String input) {
+ this.input = input;
+ }
+
+ public String getOutput() {
+ return output;
+ }
+
+ public void setOutput(String output) {
+ this.output = output;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getType()
+ */
+ public WorkflowNodeType.WorkflowNode getType() {
+ return type;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setType(org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode)
+ */
+ public void setType(WorkflowNodeType.WorkflowNode type) {
+ this.type = type;
+ }
+
+ public State getState() {
+ return status.getExecutionStatus();
+ }
+
+ public Date getStatusUpdateTime() {
+ return status.getStatusUpdateTime();
+ }
+
+
+ private static class NameValue{
+ String name;
+ String value;
+ public NameValue(String name, String value) {
+ this.name=name;
+ this.value=value;
+ }
+ }
+
+ private static List<NameValue> getIOParameterData(String data){
+ List<NameValue> parameters=new ArrayList<NameValue>();
+ if (data!=null && !data.trim().equals("")) {
+ String[] pairs = StringUtil.getElementsFromString(data);
+ for (String paras : pairs) {
+ String name=paras.trim();
+ String value="";
+ int i = name.indexOf("=");
+ //if the paras has a value as well
+ if (i!=-1){
+ value=name.substring(i+1);
+ name=name.substring(0,i);
+ parameters.add(new NameValue(name,StringUtil.quoteString(value)));
+ }else{
+ parameters.get(parameters.size()-1).value=parameters.get(parameters.size()-1).value+","+StringUtil.quoteString(name);
+ }
+
+ }
+ }
+ return parameters;
+ }
+
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,58 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+public class NodeExecutionError extends ExecutionError {
+ private String experimentId;
+ private String workflowInstanceId;
+ private String nodeId;
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import java.util.Calendar;
+import java.util.Date;
+
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement
+public class NodeExecutionStatus {
+ private State executionStatus;
+ private Date statusUpdateTime = null;
+ private WorkflowInstanceNode workflowInstanceNode;
+
+ public NodeExecutionStatus() {
+ }
+
+ public State getExecutionStatus() {
+ return executionStatus;
+ }
+
+ public void setExecutionStatus(State executionStatus) {
+ this.executionStatus = executionStatus;
+ }
+
+ public Date getStatusUpdateTime() {
+ return statusUpdateTime;
+ }
+
+ public void setStatusUpdateTime(Date statusUpdateTime) {
+ this.statusUpdateTime = statusUpdateTime;
+ }
+
+ public NodeExecutionStatus(WorkflowInstanceNode workflowInstanceNode, State executionStatus) {
+ this(workflowInstanceNode, executionStatus, null);
+ }
+
+ public NodeExecutionStatus(WorkflowInstanceNode workflowInstanceNode, State executionStatus, Date statusUpdateTime) {
+ statusUpdateTime = statusUpdateTime == null ? Calendar.getInstance().getTime() : statusUpdateTime;
+ setWorkflowInstanceNode(workflowInstanceNode);
+ setExecutionStatus(executionStatus);
+ setStatusUpdateTime(statusUpdateTime);
+ }
+
+ public WorkflowInstanceNode getWorkflowInstanceNode() {
+ return workflowInstanceNode;
+ }
+
+ public void setWorkflowInstanceNode(WorkflowInstanceNode workflowInstanceNode) {
+ this.workflowInstanceNode = workflowInstanceNode;
+ }
+
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+public class OutputData extends WorkflowInstanceNodePortData {
+ public OutputData() {
+ super();
+ }
+ public OutputData(WorkflowInstanceNode workflowInstanceNode, String portName, String portValue) {
+ super(workflowInstanceNode, portName, portValue);
+ }
+ public OutputData(WorkflowInstanceNode workflowInstanceNode, String data) {
+ super(workflowInstanceNode, data);
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,69 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkflowExecution {
+ private String experimentId;
+ private String workflowExecutionId;
+ private String templateName;
+
+ public WorkflowExecution() {
+ }
+
+ public WorkflowExecution(String experimentId,String instanceId) {
+ setExperimentId(experimentId);
+ setWorkflowExecutionId(instanceId);
+ }
+
+ public WorkflowExecution(String experimentId, String workflowInstanceId, String templateName) {
+ this.experimentId = experimentId;
+ this.workflowExecutionId = workflowInstanceId;
+ this.templateName = templateName;
+ }
+
+ public String getWorkflowExecutionId() {
+ return workflowExecutionId;
+ }
+
+ public void setWorkflowExecutionId(String workflowExecutionId) {
+ this.workflowExecutionId = workflowExecutionId;
+ }
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getTemplateName() {
+ return templateName;
+ }
+
+ public void setTemplateName(String templateName) {
+ this.templateName = templateName;
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,118 @@
+package org.apache.airavata.registry.api.workflow;/*
+ *
+ * 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.
+ *
+ */
+
+import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
+import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
+import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode;
+
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import java.util.Date;
+import java.util.List;
+
+@WebService
+@XmlSeeAlso(WorkflowExecutionDataImpl.class)
+public interface WorkflowExecutionData {
+ /**
+ * Get workflow execution id
+ * @return
+ */
+ public String getId();
+
+ /**
+ * Retrieve all node data in this workflow execution
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public List<NodeExecutionData> getNodeDataList() throws ExperimentLazyLoadedException;
+
+ /**
+ * Retrieve all node data of the type <code>type</code>
+ * @param type
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public List<NodeExecutionData> getNodeDataList(WorkflowNode type)throws ExperimentLazyLoadedException;
+
+ /**
+ * Retrieve the node data with the given node Id
+ * @param nodeId
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public NodeExecutionData getNodeData(String nodeId) throws ExperimentLazyLoadedException;
+
+ /**
+ * Add node data to the workflow execution
+ * @param nodeData
+ * @throws ExperimentLazyLoadedException
+ */
+ public void addNodeData(NodeExecutionData...nodeData) throws ExperimentLazyLoadedException;
+
+ /**
+ * Get id of the experiment which this workflow execution belongs to
+ * @return
+ */
+ public String getExperimentId();
+
+ /**
+ * Get the workflow template name corresponding to this workflow execution
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public String getTemplateName() throws ExperimentLazyLoadedException;
+
+ /**
+ * Get current state of the execution of this workflow
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public WorkflowExecutionStatus.State getState() throws ExperimentLazyLoadedException;
+
+ /**
+ * Get current state updated time
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public Date getStatusUpdateTime() throws ExperimentLazyLoadedException;
+
+ /**
+ * Retrieve inputs to the workflow execution
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public List<InputData> getWorkflowInputs () throws ExperimentLazyLoadedException;
+
+ /**
+ * Retrieve outputs to the workflow execution
+ * @return
+ * @throws ExperimentLazyLoadedException
+ */
+ public List<OutputData> getWorkflowOutputs ()throws ExperimentLazyLoadedException;
+
+ @Deprecated
+ public WorkflowExecution getWorkflowExecution() throws ExperimentLazyLoadedException;
+ @Deprecated
+ public ExperimentData getExperimentData() throws ExperimentLazyLoadedException;
+ @Deprecated
+ public void setExperimentData(ExperimentDataImpl experimentData) throws ExperimentLazyLoadedException;
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+public class WorkflowExecutionError extends ExecutionError {
+ private String experimentId;
+ private String workflowInstanceId;
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,128 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Calendar;
+import java.util.Date;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement
+public class WorkflowExecutionStatus {
+
+ public WorkflowExecutionStatus() {
+ }
+
+ public WorkflowExecutionStatus(String experimentID, String workflowInstanceID) {
+ workflowInstance.setExperimentId(experimentID);
+ workflowInstance.setWorkflowExecutionId(workflowInstanceID);
+ }
+
+ public enum State {
+ STARTED {
+ public String toString() {
+ return "STARTED";
+ }
+ },
+ RUNNING {
+ public String toString() {
+ return "RUNNING";
+ }
+ },
+ FAILED {
+ public String toString() {
+ return "FAILED";
+ }
+ },
+ PAUSED {
+ public String toString() {
+ return "PAUSED";
+ }
+ },
+ FINISHED {
+ public String toString() {
+ return "FINISHED";
+ }
+ },
+ PENDING {
+ public String toString() {
+ return "PENDING";
+ }
+ },
+ ACTIVE {
+ public String toString() {
+ return "ACTIVE";
+ }
+ },
+ DONE {
+ public String toString() {
+ return "DONE";
+ }
+ },
+ UNKNOWN {
+ public String toString() {
+ return "UNKNOWN";
+ }
+ }
+ }
+
+ private State executionStatus=State.UNKNOWN;
+ private Date statusUpdateTime = null;
+ private WorkflowExecution workflowInstance;
+
+ public State getExecutionStatus() {
+ return executionStatus;
+ }
+
+ public void setExecutionStatus(State executionStatus) {
+ this.executionStatus = executionStatus;
+ }
+
+ public Date getStatusUpdateTime() {
+ return statusUpdateTime;
+ }
+
+ public void setStatusUpdateTime(Date statusUpdateTime) {
+ this.statusUpdateTime = statusUpdateTime;
+ }
+
+ public WorkflowExecutionStatus(WorkflowExecution workflowInstance, State executionStatus) {
+ this(workflowInstance, executionStatus, null);
+ }
+
+ public WorkflowExecutionStatus(WorkflowExecution workflowInstance, State executionStatus, Date statusUpdateTime) {
+ statusUpdateTime = statusUpdateTime == null ? Calendar.getInstance().getTime() : statusUpdateTime;
+ setWorkflowInstance(workflowInstance);
+ setExecutionStatus(executionStatus);
+ setStatusUpdateTime(statusUpdateTime);
+ }
+
+ public WorkflowExecution getWorkflowInstance() {
+ return workflowInstance;
+ }
+
+ public void setWorkflowInstance(WorkflowExecution workflowInstance) {
+ this.workflowInstance = workflowInstance;
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,58 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement
+public class WorkflowIOData {
+ private String value;
+ private String nodeId;
+
+ public WorkflowIOData() {
+ }
+
+ public WorkflowIOData(String nodeId,String value) {
+ setValue(value);
+ setNodeId(nodeId);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement
+public class WorkflowInstanceNode{
+ private WorkflowExecution workflowInstance;
+ private String nodeId;
+ private String originalNodeID;
+ private int executionIndex;
+
+ public WorkflowInstanceNode() {
+ }
+
+ public WorkflowInstanceNode(WorkflowExecution workflowInstance, String nodeId) {
+ setWorkflowInstance(workflowInstance);
+ setNodeId(nodeId);
+ }
+
+ public WorkflowExecution getWorkflowInstance() {
+ return workflowInstance;
+ }
+
+ public void setWorkflowInstance(WorkflowExecution workflowInstance) {
+ this.workflowInstance = workflowInstance;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ public String getOriginalNodeID() {
+ return originalNodeID;
+ }
+
+ public int getExecutionIndex() {
+ return executionIndex;
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,89 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+public class WorkflowInstanceNodePortData {
+ private WorkflowInstanceNode workflowInstanceNode;
+ private String name;
+ private String value;
+
+ public WorkflowInstanceNodePortData() {
+ }
+
+ public WorkflowInstanceNodePortData(WorkflowInstanceNode workflowInstanceNode, String portName, String portValue) {
+ setWorkflowInstanceNode(workflowInstanceNode);
+ setName(portName);
+ setValue(portValue);
+ }
+
+ public WorkflowInstanceNodePortData(WorkflowInstanceNode workflowInstanceNode, String data) {
+ setWorkflowInstanceNode(workflowInstanceNode);
+ setValue(data);
+ }
+
+ public WorkflowInstanceNode getWorkflowInstanceNode() {
+ return workflowInstanceNode;
+ }
+
+ public void setWorkflowInstanceNode(WorkflowInstanceNode workflowInstanceNode) {
+ this.workflowInstanceNode = workflowInstanceNode;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getId(){
+ return getName();
+ }
+
+
+ public String getExperimentId(){
+ return getWorkflowInstanceNode().getWorkflowInstance().getExperimentId();
+ }
+
+ public String getWorkflowInstanceId(){
+ return getWorkflowInstanceNode().getWorkflowInstance().getWorkflowExecutionId();
+ }
+
+ public String getWorkflowInstanceNodeId(){
+ return getWorkflowInstanceNode().getNodeId();
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,83 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkflowNodeGramData {
+ String NodeID;
+ String rsl;
+ String invokedHost;
+ String gramJobID;
+ private String workflowInstanceId;
+
+ public WorkflowNodeGramData() {
+ }
+
+ public WorkflowNodeGramData(String workflowInstanceId, String nodeID, String rsl, String invokedHost, String gramJobID) {
+ NodeID = nodeID;
+ this.rsl = rsl;
+ this.invokedHost = invokedHost;
+ this.gramJobID = gramJobID;
+ this.setWorkflowInstanceId(workflowInstanceId);
+ }
+
+ public void setNodeID(String nodeID) {
+ NodeID = nodeID;
+ }
+
+ public void setRsl(String rsl) {
+ this.rsl = rsl;
+ }
+
+ public void setInvokedHost(String invokedHost) {
+ this.invokedHost = invokedHost;
+ }
+
+ public void setGramJobID(String gramJobID) {
+ this.gramJobID = gramJobID;
+ }
+
+ public String getNodeID() {
+ return NodeID;
+ }
+
+ public String getRsl() {
+ return rsl;
+ }
+
+ public String getInvokedHost() {
+ return invokedHost;
+ }
+
+ public String getGramJobID() {
+ return gramJobID;
+ }
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,114 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement
+public class WorkflowNodeIOData extends WorkflowIOData {
+ private String experimentId;
+ private String workflowName;
+ private String workflowId;
+ private String workflowInstanceId;
+ private WorkflowNodeType nodeType;
+
+
+ /** when you construct this object it set to STARTED state **/
+ private WorkflowExecutionStatus nodeStatus = new
+ WorkflowExecutionStatus(new WorkflowExecution(experimentId,workflowId,workflowName), WorkflowExecutionStatus.State.STARTED);
+
+ public WorkflowNodeIOData() {
+ }
+
+ public WorkflowNodeIOData(String data, String experimentId,String workflowInstanceID, String workflowId,
+ String nodeId,String workflowName) {
+ super(nodeId,data);
+ setExperimentId(experimentId);
+ setWorkflowInstanceId(workflowInstanceID);
+ setWorkflowId(workflowId);
+ setWorkflowName(workflowName);
+ }
+
+ public WorkflowNodeIOData(String data, String experimentId,String workflowInstanceID,
+ String nodeId,String workflowName) {
+ this(data, experimentId, experimentId,workflowInstanceID, nodeId, workflowName);
+ }
+
+ public WorkflowNodeIOData(String experimentId,String workflowInstanceID, String workflowName, String workflowId, WorkflowNodeType nodeType) {
+ this.experimentId = experimentId;
+ this.workflowInstanceId = workflowInstanceID;
+ this.workflowName = workflowName;
+ this.workflowId = workflowId;
+ this.nodeType = nodeType;
+ }
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getWorkflowName() {
+ return workflowName;
+ }
+
+ public void setWorkflowName(String workflowName) {
+ this.workflowName = workflowName;
+ }
+
+ public String getWorkflowId() {
+ return workflowId;
+ }
+
+ public void setWorkflowId(String workflowId) {
+ this.workflowId = workflowId;
+ }
+
+ public String getWorkflowInstanceId() {
+ return workflowInstanceId;
+ }
+
+ public void setWorkflowInstanceId(String workflowInstanceId) {
+ this.workflowInstanceId = workflowInstanceId;
+ }
+
+ public void setNodeType(WorkflowNodeType nodeType) {
+ this.nodeType = nodeType;
+ }
+
+ public WorkflowNodeType getNodeType() {
+ return nodeType;
+ }
+
+ public WorkflowExecutionStatus getNodeStatus() {
+ return nodeStatus;
+ }
+
+ public void setNodeStatus(WorkflowExecutionStatus nodeStatus) {
+ this.nodeStatus = nodeStatus;
+ }
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,84 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement
+public class WorkflowNodeType {
+ public WorkflowNodeType(WorkflowNode nodeType) {
+ this.nodeType = nodeType;
+ }
+
+ public WorkflowNodeType() {
+ }
+
+ public enum WorkflowNode {
+ SERVICENODE {
+ public String toString() {
+ return "SERVICE_NODE";
+ }
+ },
+ CONTROLNODE {
+ public String toString() {
+ return "CONTROL_NODE";
+ }
+ },
+ INPUTNODE {
+ public String toString() {
+ return "INPUT_NODE";
+ }
+ },
+ OUTPUTNODE {
+ public String toString() {
+ return "OUTPUT_NODE";
+ }
+ },
+ UNKNOWN {
+ public String toString() {
+ return "UNKNOWN_NODE";
+ }
+ },
+ }
+
+ private WorkflowNode nodeType;
+
+ public WorkflowNode getNodeType() {
+ return nodeType;
+ }
+
+ public void setNodeType(WorkflowNode nodeType) {
+ this.nodeType = nodeType;
+ }
+
+ public static WorkflowNodeType getType(String type){
+ for(WorkflowNode w:WorkflowNode.values()){
+ if (w.toString().equalsIgnoreCase(type)){
+ return new WorkflowNodeType(w);
+ }
+ }
+ return new WorkflowNodeType(WorkflowNode.UNKNOWN);
+ }
+
+}
Added: airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java?rev=1553518&view=auto
==============================================================================
--- airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java (added)
+++ airavata/sandbox/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java Thu Dec 26 17:31:35 2013
@@ -0,0 +1,90 @@
+/*
+ *
+ * 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.registry.api.workflow;
+
+import java.sql.Timestamp;
+
+public class WorkflowRunTimeData {
+ String experimentID;
+ String workflowInstanceID;
+ String templateID;
+ Timestamp startTime;
+ WorkflowExecutionStatus.State workflowStatus;
+ Timestamp lastUpdateTime;
+
+ public WorkflowRunTimeData(String experimentID, String workflowInstanceID, String templateID,
+ Timestamp startTime, WorkflowExecutionStatus.State workflowStatus, Timestamp lastUpdateTime) {
+ this.experimentID = experimentID;
+ this.workflowInstanceID = workflowInstanceID;
+ this.templateID = templateID;
+ this.startTime = startTime;
+ this.workflowStatus = workflowStatus;
+ this.lastUpdateTime = lastUpdateTime;
+ }
+
+ public String getExperimentID() {
+ return experimentID;
+ }
+
+ public String getWorkflowInstanceID() {
+ return workflowInstanceID;
+ }
+
+ public String getTemplateID() {
+ return templateID;
+ }
+
+ public Timestamp getStartTime() {
+ return startTime;
+ }
+
+ public WorkflowExecutionStatus.State getWorkflowStatus() {
+ return workflowStatus;
+ }
+
+ public Timestamp getLastUpdateTime() {
+ return lastUpdateTime;
+ }
+
+ public void setExperimentID(String experimentID) {
+ this.experimentID = experimentID;
+ }
+
+ public void setWorkflowInstanceID(String workflowInstanceID) {
+ this.workflowInstanceID = workflowInstanceID;
+ }
+
+ public void setTemplateID(String templateID) {
+ this.templateID = templateID;
+ }
+
+ public void setStartTime(Timestamp startTime) {
+ this.startTime = startTime;
+ }
+
+ public void setWorkflowStatus(WorkflowExecutionStatus.State workflowStatus) {
+ this.workflowStatus = workflowStatus;
+ }
+
+ public void setLastUpdateTime(Timestamp lastUpdateTime) {
+ this.lastUpdateTime = lastUpdateTime;
+ }
+}