You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2012/05/02 07:01:19 UTC

svn commit: r1332922 - in /oodt/trunk/workflow/src: main/java/org/apache/oodt/cas/workflow/lifecycle/WorkflowLifecyclesReader.java test/org/apache/oodt/cas/workflow/lifecycle/TestWorkflowLifecycleManager.java

Author: mattmann
Date: Wed May  2 05:01:18 2012
New Revision: 1332922

URL: http://svn.apache.org/viewvc?rev=1332922&view=rev
Log:
- fix and unit test to ensure category is read as part of OODT-421

Modified:
    oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/lifecycle/WorkflowLifecyclesReader.java
    oodt/trunk/workflow/src/test/org/apache/oodt/cas/workflow/lifecycle/TestWorkflowLifecycleManager.java

Modified: oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/lifecycle/WorkflowLifecyclesReader.java
URL: http://svn.apache.org/viewvc/oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/lifecycle/WorkflowLifecyclesReader.java?rev=1332922&r1=1332921&r2=1332922&view=diff
==============================================================================
--- oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/lifecycle/WorkflowLifecyclesReader.java (original)
+++ oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/lifecycle/WorkflowLifecyclesReader.java Wed May  2 05:01:18 2012
@@ -111,7 +111,7 @@ public final class WorkflowLifecyclesRea
             for (int i = 0; i < stagesNodes.getLength(); i++) {
                 Element stageElem = (Element) stagesNodes.item(i);
                 WorkflowLifecycleStage stage = new WorkflowLifecycleStage();
-                stage.setName(STAGE_TAG_NAME_ATTR);
+                stage.setName(stageElem.getAttribute(STAGE_TAG_NAME_ATTR));
                 stage.setOrder(i+1);
                 stage.setStates(readStates(stageElem, stage));
                 lifecycle.addStage(stage);

Modified: oodt/trunk/workflow/src/test/org/apache/oodt/cas/workflow/lifecycle/TestWorkflowLifecycleManager.java
URL: http://svn.apache.org/viewvc/oodt/trunk/workflow/src/test/org/apache/oodt/cas/workflow/lifecycle/TestWorkflowLifecycleManager.java?rev=1332922&r1=1332921&r2=1332922&view=diff
==============================================================================
--- oodt/trunk/workflow/src/test/org/apache/oodt/cas/workflow/lifecycle/TestWorkflowLifecycleManager.java (original)
+++ oodt/trunk/workflow/src/test/org/apache/oodt/cas/workflow/lifecycle/TestWorkflowLifecycleManager.java Wed May  2 05:01:18 2012
@@ -49,6 +49,7 @@ public class TestWorkflowLifecycleManage
     WorkflowLifecycleStage category = this.lifecycle.getDefaultLifecycle()
         .getCategoryByName("Null");
     assertNotNull(category);
+    assertEquals("Null", category.getName());
     for (WorkflowState state : (List<WorkflowState>) category.getStates()) {
       if (state.getName().equals("Null")) {
         gotNull = true;