Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85B5810015 for ; Thu, 15 Aug 2013 21:45:27 +0000 (UTC) Received: (qmail 27516 invoked by uid 500); 15 Aug 2013 21:45:26 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 27438 invoked by uid 500); 15 Aug 2013 21:45:14 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 27431 invoked by uid 99); 15 Aug 2013 21:45:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 21:45:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 21:45:10 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1C8532388A02; Thu, 15 Aug 2013 21:44:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1514509 - in /airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/impl/ distribution/xbaya-gui/src/main/assembly/ xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/ Date: Thu, 15 Aug 2013 21:44:48 -0000 To: commits@airavata.apache.org From: samindaw@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130815214449.1C8532388A02@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: samindaw Date: Thu Aug 15 21:44:48 2013 New Revision: 1514509 URL: http://svn.apache.org/r1514509 Log: https://issues.apache.org/jira/browse/AIRAVATA-820 - fixing foreach issue Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java?rev=1514509&r1=1514508&r2=1514509&view=diff ============================================================================== --- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java (original) +++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java Thu Aug 15 21:44:48 2013 @@ -47,9 +47,6 @@ import org.apache.airavata.registry.api. import org.apache.airavata.registry.api.workflow.WorkflowExecutionError; import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus; import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State; -import org.apache.airavata.workflow.model.component.ComponentException; -import org.apache.airavata.workflow.model.component.ws.WSComponentPort; -import org.apache.airavata.workflow.model.graph.GraphException; import org.apache.airavata.workflow.model.wf.Workflow; import org.apache.airavata.workflow.model.wf.WorkflowInput; import org.apache.airavata.ws.monitor.EventData; @@ -185,26 +182,32 @@ public class ExecutionManagerImpl implem } private String runExperimentGeneral(Workflow workflowObj, List inputs, ExperimentAdvanceOptions options, EventDataListener listener) throws AiravataAPIInvocationException { try { - String workflowString = XMLUtil.xmlElementToString(workflowObj.toXML()); - List ports = getWSComponentPortInputs(workflowObj); - for (WorkflowInput input : inputs) { - WSComponentPort port = getWSComponentPort(input.getName(), - ports); - if (port != null) { - port.setValue(input.getValue()); - } - } List inputValues = new ArrayList(); - for (WSComponentPort port : ports) { + for (WorkflowInput input : inputs) { NameValue nameValue = new NameValue(); - nameValue.setName(port.getName()); - if (port.getValue() == null) { - nameValue.setValue(port.getDefaultValue()); - } else { - nameValue.setValue(port.getValue().toString()); - } + nameValue.setName(input.getName()); + nameValue.setValue(String.valueOf(input.getValue()==null?input.getDefaultValue():input.getValue())); inputValues.add(nameValue); } + String workflowString = XMLUtil.xmlElementToString(workflowObj.toXML()); +// List ports = getWSComponentPortInputs(workflowObj); +// for (WorkflowInput input : inputs) { +// WSComponentPort port = getWSComponentPort(input.getName(), +// ports); +// if (port != null) { +// port.setValue(input.getValue()); +// } +// } +// for (WSComponentPort port : ports) { +// NameValue nameValue = new NameValue(); +// nameValue.setName(port.getName()); +// if (port.getValue() == null) { +// nameValue.setValue(port.getDefaultValue()); +// } else { +// nameValue.setValue(port.getValue().toString()); +// } +// inputValues.add(nameValue); +// } String experimentID=options.getCustomExperimentId(); String workflowTemplateName = workflowObj.getName(); if (experimentID == null || experimentID.isEmpty()) { @@ -226,10 +229,10 @@ public class ExecutionManagerImpl implem } launchWorkflow(experimentID, workflowString, inputVals, builder); return experimentID; - } catch (GraphException e) { - throw new AiravataAPIInvocationException(e); - } catch (ComponentException e) { - throw new AiravataAPIInvocationException(e); +// } catch (GraphException e) { +// throw new AiravataAPIInvocationException(e); +// } catch (ComponentException e) { +// throw new AiravataAPIInvocationException(e); } catch (Exception e) { throw new AiravataAPIInvocationException("Error working with Airavata Registry: " + e.getLocalizedMessage(), e); } @@ -250,22 +253,22 @@ public class ExecutionManagerImpl implem return workflowObj; } - private List getWSComponentPortInputs(Workflow workflow) - throws GraphException, ComponentException { - workflow.createScript(); - List inputs = workflow.getInputs(); - return inputs; - } - - private WSComponentPort getWSComponentPort(String name, - List ports) { - for (WSComponentPort port : ports) { - if (port.getName().equals(name)) { - return port; - } - } - return null; - } +// private List getWSComponentPortInputs(Workflow workflow) +// throws GraphException, ComponentException { +// workflow.createScript(); +// List inputs = workflow.getInputs(); +// return inputs; +// } +// +// private WSComponentPort getWSComponentPort(String name, +// List ports) { +// for (WSComponentPort port : ports) { +// if (port.getName().equals(name)) { +// return port; +// } +// } +// return null; +// } private void launchWorkflow(String experimentId, String workflowGraph, NameValue[] inputs, WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException { Modified: airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml?rev=1514509&r1=1514508&r2=1514509&view=diff ============================================================================== --- airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml (original) +++ airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml Thu Aug 15 21:44:48 2013 @@ -105,7 +105,7 @@ gpel:gpel_client xpp5:xpp5 xpp3:xpp3_xpath - xsul:xsul:jar + org.ogce:xsul:jar xsul5-ogce:xsul5-2007-02-27:jar xutil:xutil jython:jython Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java?rev=1514509&r1=1514508&r2=1514509&view=diff ============================================================================== --- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java (original) +++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java Thu Aug 15 21:44:48 2013 @@ -199,7 +199,7 @@ public class WorkflowInterpreter { ArrayList readyNodes = this.getReadyNodesDynamically(); ArrayList threadList = new ArrayList(); if (getRemainNodesDynamically() == 0) { - notifyViaInteractor(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED, WorkflowExecutionState.PAUSED); + notifyViaInteractor(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED, WorkflowExecutionState.STOPPED); } // ok we have paused sleep if (this.getWorkflow().getExecutionState() == WorkflowExecutionState.PAUSED) {