Repository: cloudslang/cloud-slang
Issue: wrong path created by slang actions 

the path created by slang action is not correct and also doe not represent the language syntax and how does the user expect to.

comment: i already have the fix 


Changed files:
cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/SystemsTestsParent.java
cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/StepData.java
cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/JoinAggregatorListener.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionSteps.java
cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/events/LanguageEventDataTest.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AbstractSteps.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableSteps.java
cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/BranchAggregatorListener.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/navigations/Navigations.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/env/ExecutionPath.java
cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/AbstractAggregatorListener.java
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/scorecompiler/ExecutionPlanBuilder.java
cloudslang-cli/src/main/java/io/cloudslang/lang/cli/services/SyncTriggerEventListener.java
cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/LoopFlowsTest.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/events/LanguageEventData.java
cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/TaskStepsTest.java
cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/TaskSteps.java
cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/AsyncLoopStepsTest.java
cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/RunDataAggregatorListener.java
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AsyncLoopSteps.java
cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/flows/NavigationTest.java

diff --git a/cloudslang-cli/src/main/java/io/cloudslang/lang/cli/services/SyncTriggerEventListener.java b/cloudslang-cli/src/main/java/io/cloudslang/lang/cli/services/SyncTriggerEventListener.java
index 53e65db71..2658e94d7 100644
--- a/cloudslang-cli/src/main/java/io/cloudslang/lang/cli/services/SyncTriggerEventListener.java
+++ b/cloudslang-cli/src/main/java/io/cloudslang/lang/cli/services/SyncTriggerEventListener.java
@@ -73,9 +73,10 @@ public class SyncTriggerEventListener implements ScoreEventListener{
                 errorMessage.set(SLANG_STEP_ERROR_MSG + data.get(LanguageEventData.EXCEPTION));
                 break;
             case ScoreLangConstants.EVENT_INPUT_END:
-                String taskName = (String)data.get(LanguageEventData.levelName.TASK_NAME.name());
-                if(StringUtils.isNotEmpty(taskName)){
-                    String path = (String) data.get(LanguageEventData.PATH);
+                LanguageEventData eventData = (LanguageEventData) data;
+                if(eventData.getStepType() == LanguageEventData.StepType.TASK){
+                    String taskName = eventData.getStepName();
+                    String path = eventData.getPath();
                     int matches = StringUtils.countMatches(path, ExecutionPath.PATH_SEPARATOR);
                     String prefix = StringUtils.repeat(TASK_PATH_PREFIX, matches);
                     printWithColor(Ansi.Color.YELLOW, prefix + taskName);
@@ -121,7 +122,7 @@ public class SyncTriggerEventListener implements ScoreEventListener{
 
     private void printFinishEvent(Map<String, Serializable> data) {
         String flowResult = (String)data.get(LanguageEventData.RESULT);
-        String flowName = (String)data.get(LanguageEventData.levelName.EXECUTABLE_NAME.toString());
+        String flowName = (String)data.get(LanguageEventData.STEP_NAME);
         printWithColor(Ansi.Color.CYAN,"Flow : " + flowName + " finished with result : " + flowResult);
     }
 
diff --git a/cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/scorecompiler/ExecutionPlanBuilder.java b/cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/scorecompiler/ExecutionPlanBuilder.java
index d2ddd2c28..aa5859033 100644
--- a/cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/scorecompiler/ExecutionPlanBuilder.java
+++ b/cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/scorecompiler/ExecutionPlanBuilder.java
@@ -1,28 +1,32 @@
 /*******************************************************************************
-* (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Apache License v2.0 which accompany this distribution.
-*
-* The Apache License is available at
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-*******************************************************************************/
+ * (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License v2.0 which accompany this distribution.
+ *
+ * The Apache License is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *******************************************************************************/
 
 package io.cloudslang.lang.compiler.scorecompiler;
 
 import ch.lambdaj.Lambda;
+import io.cloudslang.lang.compiler.modeller.model.Flow;
+import io.cloudslang.lang.compiler.modeller.model.Operation;
 import io.cloudslang.lang.compiler.modeller.model.Task;
 import io.cloudslang.lang.entities.ResultNavigation;
 import io.cloudslang.lang.entities.bindings.Result;
-import io.cloudslang.lang.compiler.modeller.model.Flow;
-import io.cloudslang.lang.compiler.modeller.model.Operation;
-import org.apache.commons.collections4.CollectionUtils;
 import io.cloudslang.score.api.ExecutionPlan;
 import io.cloudslang.score.api.ExecutionStep;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import static ch.lambdaj.Lambda.having;
 import static ch.lambdaj.Lambda.on;
@@ -106,23 +110,14 @@ public class ExecutionPlanBuilder {
         if (isAsync) {
             Long joinStepID = currentId + NUMBER_OF_ASYNC_LOOP_EXECUTION_STEPS + 1;
             taskExecutionSteps.add(
-                    stepFactory.createAddBranchesStep(
-                            currentId++,
-                            joinStepID,
-                            currentId,
-                            task.getPreTaskActionData(),
-                            compiledFlow.getId(),
-                            taskName
+                    stepFactory.createAddBranchesStep(currentId++, joinStepID, currentId,
+                            task.getPreTaskActionData(), compiledFlow.getId(), taskName
                     )
             );
         }
         taskExecutionSteps.add(
-                stepFactory.createBeginTaskStep(
-                        currentId++,
-                        task.getInputs(),
-                        task.getPreTaskActionData(),
-                        task.getRefId(),
-                        taskName)
+                stepFactory.createBeginTaskStep(currentId++, task.getInputs(),
+                        task.getPreTaskActionData(), task.getRefId(), taskName)
         );
 
         //End Task
@@ -131,39 +126,28 @@ public class ExecutionPlanBuilder {
             String nextStepName = entry.getValue();
             if (taskReferences.get(nextStepName) == null) {
                 Task nextTaskToCompile = Lambda.selectFirst(tasks, having(on(Task.class).getName(), equalTo(nextStepName)));
-                if(nextTaskToCompile == null){
+                if (nextTaskToCompile == null) {
                     throw new RuntimeException("Failed to compile task: " + taskName + ". The task/result name: " + entry.getValue() + " of navigation: " + entry.getKey() + " -> " + entry.getValue() + " is missing");
                 }
                 taskExecutionSteps.addAll(buildTaskExecutionSteps(nextTaskToCompile, taskReferences, tasks, compiledFlow));
             }
-			long nextStepId = taskReferences.get(nextStepName);
-			String presetResult = (FLOW_END_STEP_ID == nextStepId) ? nextStepName : null;
-			navigationValues.put(entry.getKey(), new ResultNavigation(nextStepId, presetResult));
+            long nextStepId = taskReferences.get(nextStepName);
+            String presetResult = (FLOW_END_STEP_ID == nextStepId) ? nextStepName : null;
+            navigationValues.put(entry.getKey(), new ResultNavigation(nextStepId, presetResult));
         }
         if (isAsync) {
             taskExecutionSteps.add(
-                    stepFactory.createFinishTaskStep(
-                            currentId++,
-                            task.getPostTaskActionData(),
-                            new HashMap<String, ResultNavigation>(),
-                            taskName,
-                            true)
+                    stepFactory.createFinishTaskStep(currentId++, task.getPostTaskActionData(),
+                            new HashMap<String, ResultNavigation>(), taskName, true)
             );
             taskExecutionSteps.add(
-                    stepFactory.createJoinBranchesStep(
-                            currentId,
-                            task.getPostTaskActionData(),
-                            navigationValues,
-                            taskName)
+                    stepFactory.createJoinBranchesStep(currentId, task.getPostTaskActionData(),
+                            navigationValues, taskName)
             );
         } else {
             taskExecutionSteps.add(
-                    stepFactory.createFinishTaskStep(
-                            currentId,
-                            task.getPostTaskActionData(),
-                            navigationValues,
-                            taskName,
-                            false)
+                    stepFactory.createFinishTaskStep(currentId, task.getPostTaskActionData(),
+                            navigationValues, taskName, false)
             );
         }
         return taskExecutionSteps;
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/env/ExecutionPath.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/env/ExecutionPath.java
index f2be9b704..787d59069 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/env/ExecutionPath.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/env/ExecutionPath.java
@@ -1,70 +1,61 @@
 /*******************************************************************************
-* (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Apache License v2.0 which accompany this distribution.
-*
-* The Apache License is available at
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-*******************************************************************************/
+ * (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License v2.0 which accompany this distribution.
+ *
+ * The Apache License is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *******************************************************************************/
 package io.cloudslang.lang.runtime.env;
 
+import org.apache.commons.lang3.StringUtils;
+
 import java.io.Serializable;
 import java.util.ArrayDeque;
 import java.util.Deque;
-import java.util.Iterator;
+
+import static org.apache.commons.lang3.StringUtils.join;
 
 /**
  * @author moradi
  * @since 06/11/2014
- * @version $Id$
  */
 public class ExecutionPath implements Serializable {
 
-	public static final String PATH_SEPARATOR = "/";
-	private static final long serialVersionUID = 5536588094244112461L;
+    public static final String PATH_SEPARATOR = ".";
 
-	private Deque<Integer> parentPositions;
-	private int position;
+    private Deque<Integer> parentPositions;
+    private int position;
 
-	public ExecutionPath() {
-		parentPositions = new ArrayDeque<>();
-	}
-
-	public int forward() {
-		return position++;
-	}
+    public ExecutionPath() {
+        parentPositions = new ArrayDeque<>();
+    }
 
-	public int down() {
-		parentPositions.push(position);
-		position = 0;
-		return position;
-	}
+    public void forward() {
+        position++;
+    }
 
-	public int up() {
-		position = parentPositions.pop();
-		return position;
-	}
+    public void down() {
+        parentPositions.push(position);
+        position = 0;
+    }
 
-	public int getDepth() {
-		return parentPositions.size();
-	}
+    public void up() {
+        position = parentPositions.pop();
+    }
 
-	public String getCurrentPath() {
+    public String getCurrentPath() {
         return getCurrentPath(position);
-	}
+    }
 
-    public String getCurrentPathPeekForward() {
-        return getCurrentPath(position + 1);
+    public String getParentPath() {
+        return join(parentPositions.descendingIterator(), PATH_SEPARATOR);
     }
 
     private String getCurrentPath(int position) {
-        StringBuilder result = new StringBuilder();
-        for(Iterator<Integer> iterator = parentPositions.descendingIterator(); iterator.hasNext();) {
-            result.append(iterator.next()).append(PATH_SEPARATOR);
-        }
-        result.append(position);
-        return result.toString();
+        String parents = getParentPath();
+        return StringUtils.isEmpty(parents) ? position + "" : parents + PATH_SEPARATOR + position;
     }
 
 }
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/events/LanguageEventData.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/events/LanguageEventData.java
index 0a2ede4a0..2e3259526 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/events/LanguageEventData.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/events/LanguageEventData.java
@@ -1,12 +1,12 @@
 /*******************************************************************************
-* (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Apache License v2.0 which accompany this distribution.
-*
-* The Apache License is available at
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-*******************************************************************************/
+ * (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License v2.0 which accompany this distribution.
+ *
+ * The Apache License is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *******************************************************************************/
 package io.cloudslang.lang.runtime.events;
 
 import java.io.Serializable;
@@ -17,95 +17,114 @@ import java.util.Map;
 
 /**
  * @author moradi
- * @since 03/11/2014
  * @version $Id$
+ * @since 03/11/2014
  */
 public class LanguageEventData extends HashMap<String, Serializable> {
 
-	public static final String TYPE = "TYPE";
-	public static final String DESCRIPTION = "DESCRIPTION";
-	public static final String TIMESTAMP = "TIMESTAMP";
-	public static final String EXECUTIONID = "EXECUTIONID";
-	public static final String PATH = "PATH";
-	public static final String EXCEPTION = "EXCEPTION";
-	public static final String OUTPUTS = "OUTPUTS";
+    public static final String TYPE = "TYPE";
+    public static final String DESCRIPTION = "DESCRIPTION";
+    public static final String TIMESTAMP = "TIMESTAMP";
+    public static final String EXECUTION_ID = "EXECUTION_ID";
+    public static final String PATH = "PATH";
+    public static final String EXCEPTION = "EXCEPTION";
+    public static final String OUTPUTS = "OUTPUTS";
     public static final String RESULT = "RESULT";
-	public static final String CALL_ARGUMENTS = "CALL_ARGUMENTS";
-	public static final String BOUND_INPUTS = "BOUND_INPUTS";
+    public static final String CALL_ARGUMENTS = "CALL_ARGUMENTS";
+    public static final String BOUND_INPUTS = "BOUND_INPUTS";
     public static final String BOUND_ASYNC_LOOP_EXPRESSION = "BOUND_ASYNC_LOOP_EXPRESSION";
-	public static final String RETURN_VALUES = "RETURN_VALUES";
+    public static final String RETURN_VALUES = "RETURN_VALUES";
     public static final String NEXT_STEP_POSITION = "nextPosition";
-	public static final String ENCRYPTED_VALUE = "*****";
-	private static final long serialVersionUID = 2885051907156304718L;
+    public static final String ENCRYPTED_VALUE = "*****";
+    public static final String STEP_TYPE = "STEP_TYPE";
+    public static final String STEP_NAME = "STEP_NAME";
+
+    public enum StepType {
+        TASK,
+        EXECUTABLE,
+        ACTION,
+        NAVIGATION
+    }
 
-	public enum levelName {
-		TASK_NAME,
-		EXECUTABLE_NAME
-	}
+    public String getStepName() {
+        return (String) get(STEP_NAME);
+    }
 
-	public String getEventType() {
-		return (String)get(TYPE);
-	}
+    public void setStepName(String stepName){
+        put(STEP_NAME, stepName);
+    }
 
-	public void setEventType(String eventType) {
-		put(TYPE, eventType);
-	}
+    public StepType getStepType() {
+        return (StepType) get(STEP_TYPE);
+    }
 
-	public String getDescription() {
-		return (String)get(DESCRIPTION);
-	}
+    public void setStepType(StepType stepType){
+        put(STEP_TYPE, stepType);
+    }
 
-	public void setDescription(String description) {
-		put(DESCRIPTION, description);
-	}
+    public String getEventType() {
+        return (String) get(TYPE);
+    }
 
-	public Date getTimeStamp() {
-		return (Date)get(TIMESTAMP);
-	}
+    public void setEventType(String eventType) {
+        put(TYPE, eventType);
+    }
 
-	public void setTimeStamp(Date timeStamp) {
-		put(TIMESTAMP, timeStamp);
-	}
+    public String getDescription() {
+        return (String) get(DESCRIPTION);
+    }
 
-	public Long getExecutionId() {
-		return (Long)get(EXECUTIONID);
-	}
+    public void setDescription(String description) {
+        put(DESCRIPTION, description);
+    }
 
-	public void setExecutionId(Long executionId) {
-		put(EXECUTIONID, executionId);
-	}
+    public Date getTimeStamp() {
+        return (Date) get(TIMESTAMP);
+    }
 
-	public String getPath() {
-		return (String)get(PATH);
-	}
+    public void setTimeStamp(Date timeStamp) {
+        put(TIMESTAMP, timeStamp);
+    }
 
-	public void setPath(String path) {
-		put(PATH, path);
-	}
+    public Long getExecutionId() {
+        return (Long) get(EXECUTION_ID);
+    }
 
-	public Exception getException() {
-		return (Exception)get(EXCEPTION);
-	}
+    public void setExecutionId(Long executionId) {
+        put(EXECUTION_ID, executionId);
+    }
 
-	public void setException(Exception ex) {
-		put(EXCEPTION, ex);
-	}
+    public String getPath() {
+        return (String) get(PATH);
+    }
 
-	public Map<String, Serializable> getInputs() {
-		return (Map<String, Serializable>)get(BOUND_INPUTS);
-	}
+    public void setPath(String path) {
+        put(PATH, path);
+    }
 
-	public void setInputs(Map<String, Serializable> inputs) {
-		put(BOUND_INPUTS, (Serializable)inputs);
-	}
+    public Exception getException() {
+        return (Exception) get(EXCEPTION);
+    }
 
-	public Map<String, Serializable> getOutputs() {
-		return (Map<String, Serializable>)get(OUTPUTS);
-	}
+    public void setException(Exception ex) {
+        put(EXCEPTION, ex);
+    }
 
-	public void setOutputs(Map<String, Serializable> outputs) {
-		put(OUTPUTS, (Serializable)outputs);
-	}
+    public Map<String, Serializable> getInputs() {
+        return (Map<String, Serializable>) get(BOUND_INPUTS);
+    }
+
+    public void setInputs(Map<String, Serializable> inputs) {
+        put(BOUND_INPUTS, (Serializable) inputs);
+    }
+
+    public Map<String, Serializable> getOutputs() {
+        return (Map<String, Serializable>) get(OUTPUTS);
+    }
+
+    public void setOutputs(Map<String, Serializable> outputs) {
+        put(OUTPUTS, (Serializable) outputs);
+    }
 
     public List<Serializable> getAsyncLoopBoundExpression() {
         return (List<Serializable>) get(BOUND_ASYNC_LOOP_EXPRESSION);
@@ -114,5 +133,4 @@ public class LanguageEventData extends HashMap<String, Serializable> {
     public void setAsyncLoopBoundExpression(List<Serializable> asyncLoopBoundExpression) {
         put(BOUND_ASYNC_LOOP_EXPRESSION, (Serializable) asyncLoopBoundExpression);
     }
-
 }
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/navigations/Navigations.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/navigations/Navigations.java
index 3c06e98c1..d69cc3945 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/navigations/Navigations.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/navigations/Navigations.java
@@ -39,7 +39,8 @@ public class Navigations {
 
         // If we have an error key stored, we fire an error event and return null as the next position
 		if(executionRuntimeServices.hasStepErrorKey()) {
-			AbstractSteps.fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.SLANG_EXECUTION_EXCEPTION, "Error detected during step",
+			AbstractSteps.fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.SLANG_EXECUTION_EXCEPTION,
+                    "Error detected during step", LanguageEventData.StepType.NAVIGATION, null,
                     Pair.of(LanguageEventData.EXCEPTION, executionRuntimeServices.getStepErrorKey()));
 			throw new RuntimeException(executionRuntimeServices.getStepErrorKey());
 		}
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AbstractSteps.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AbstractSteps.java
index 78190b1c5..84fdb1238 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AbstractSteps.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AbstractSteps.java
@@ -25,9 +25,13 @@ import java.util.Map.Entry;
 
 public abstract class AbstractSteps {
 
-    public void sendBindingInputsEvent(List<Input> inputs, final Map<String, Serializable> context, RunEnvironment runEnv,
-                                       ExecutionRuntimeServices executionRuntimeServices, String desc, String nodeName,
-                                       LanguageEventData.levelName levelName) {
+    public void sendBindingInputsEvent(List<Input> inputs,
+                                       final Map<String, Serializable> context,
+                                       RunEnvironment runEnv,
+                                       ExecutionRuntimeServices executionRuntimeServices,
+                                       String desc,
+                                       LanguageEventData.StepType stepType,
+                                       String stepName) {
         Map<String, Serializable> inputsForEvent = new HashMap<>();
         for (Input input : inputs) {
             String inputName = input.getName();
@@ -38,8 +42,8 @@ public abstract class AbstractSteps {
                 inputsForEvent.put(inputName, inputValue);
             }
         }
-        fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_INPUT_END, desc, Pair.of(LanguageEventData.BOUND_INPUTS,
-                (Serializable) inputsForEvent), Pair.of(levelName.name(), nodeName));
+        fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_INPUT_END, desc, stepType, stepName,
+                Pair.of(LanguageEventData.BOUND_INPUTS, (Serializable) inputsForEvent));
     }
 
     @SafeVarargs
@@ -47,14 +51,11 @@ public abstract class AbstractSteps {
                                  RunEnvironment runEnvironment,
                                  String type,
                                  String description,
+                                 LanguageEventData.StepType stepType,
+                                 String stepName,
                                  Map.Entry<String, ? extends Serializable>... fields) {
-        fireEvent(
-                runtimeServices,
-                type,
-                description,
-                runEnvironment.getExecutionPath().getCurrentPath(),
-                fields
-        );
+        fireEvent(runtimeServices, type, description,
+                runEnvironment.getExecutionPath().getCurrentPath(), stepType, stepName, fields);
     }
 
     @SafeVarargs
@@ -62,8 +63,12 @@ public abstract class AbstractSteps {
                                  String type,
                                  String description,
                                  String path,
+                                 LanguageEventData.StepType stepType,
+                                 String stepName,
                                  Map.Entry<String, ? extends Serializable>... fields) {
         LanguageEventData eventData = new LanguageEventData();
+        eventData.setStepType(stepType);
+        eventData.setStepName(stepName);
         eventData.setEventType(type);
         eventData.setDescription(description);
         eventData.setTimeStamp(new Date());
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionSteps.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionSteps.java
index 0bf4df3d2..cdad7ad78 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionSteps.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionSteps.java
@@ -68,7 +68,9 @@ public class ActionSteps extends AbstractSteps {
         Map<String, Serializable> returnValue = new HashMap<>();
         Map<String, Serializable> callArguments = runEnv.removeCallArguments();
         Map<String, SerializableSessionObject> serializableSessionData = runEnv.getSerializableDataMap();
-        fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_ACTION_START, "Preparing to run action " + actionType, Pair.of(LanguageEventData.CALL_ARGUMENTS, (Serializable) callArguments));
+        fireEvent(executionRuntimeServices, ScoreLangConstants.EVENT_ACTION_START, "Preparing to run action " + actionType,
+                runEnv.getExecutionPath().getParentPath(), LanguageEventData.StepType.ACTION, null,
+                Pair.of(LanguageEventData.CALL_ARGUMENTS, (Serializable) callArguments));
         try {
             switch (actionType) {
                 case JAVA:
@@ -81,7 +83,9 @@ public class ActionSteps extends AbstractSteps {
                     break;
             }
         } catch (RuntimeException ex) {
-            fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_ACTION_ERROR, ex.getMessage(), Pair.of(LanguageEventData.EXCEPTION, ex.getMessage()));
+            fireEvent(executionRuntimeServices, ScoreLangConstants.EVENT_ACTION_ERROR, ex.getMessage(),
+                    runEnv.getExecutionPath().getParentPath(), LanguageEventData.StepType.ACTION, null,
+                    Pair.of(LanguageEventData.EXCEPTION, ex.getMessage()));
             logger.error(ex);
             throw(ex);
         }
@@ -90,7 +94,9 @@ public class ActionSteps extends AbstractSteps {
 
         ReturnValues returnValues = new ReturnValues(returnValue, null);
         runEnv.putReturnValues(returnValues);
-        fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_ACTION_END, "Action performed", Pair.of(LanguageEventData.RETURN_VALUES, (Serializable)returnValue));
+        fireEvent(executionRuntimeServices, ScoreLangConstants.EVENT_ACTION_END, "Action performed",
+                runEnv.getExecutionPath().getParentPath(), LanguageEventData.StepType.ACTION, null,
+                Pair.of(LanguageEventData.RETURN_VALUES, (Serializable)returnValue));
 
         runEnv.putNextStepPosition(nextStepId);
     }
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AsyncLoopSteps.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AsyncLoopSteps.java
index de9499b79..c93a8782c 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AsyncLoopSteps.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/AsyncLoopSteps.java
@@ -16,7 +16,6 @@ import io.cloudslang.lang.entities.ScoreLangConstants;
 import io.cloudslang.lang.entities.bindings.Output;
 import io.cloudslang.lang.runtime.RuntimeConstants;
 import io.cloudslang.lang.runtime.bindings.AsyncLoopBinding;
-import io.cloudslang.lang.runtime.bindings.LoopsBinding;
 import io.cloudslang.lang.runtime.bindings.OutputsBinding;
 import io.cloudslang.lang.runtime.env.*;
 import io.cloudslang.lang.runtime.events.LanguageEventData;
@@ -48,9 +47,6 @@ public class AsyncLoopSteps extends AbstractSteps {
     @Autowired
     private AsyncLoopBinding asyncLoopBinding;
 
-    @Autowired
-    private LoopsBinding loopsBinding;
-
     @Autowired
     private OutputsBinding outputsBinding;
 
@@ -70,22 +66,21 @@ public class AsyncLoopSteps extends AbstractSteps {
 
             List<Serializable> splitData = asyncLoopBinding.bindAsyncLoopList(asyncLoopStatement, flowContext, nodeName);
 
-            fireEvent(
-                    executionRuntimeServices,
-                    ScoreLangConstants.EVENT_ASYNC_LOOP_EXPRESSION_END,
-                    "async loop expression bound",
-                    runEnv.getExecutionPath().getCurrentPathPeekForward(),
-                    Pair.of(LanguageEventData.BOUND_ASYNC_LOOP_EXPRESSION, (Serializable) splitData),
-                    Pair.of(LanguageEventData.levelName.TASK_NAME.name(), nodeName));
+            fireEvent(executionRuntimeServices, ScoreLangConstants.EVENT_ASYNC_LOOP_EXPRESSION_END,
+                    "async loop expression bound", runEnv.getExecutionPath().getCurrentPath(),
+                    LanguageEventData.StepType.TASK, nodeName,
+                    Pair.of(LanguageEventData.BOUND_ASYNC_LOOP_EXPRESSION, (Serializable) splitData));
 
             runEnv.putNextStepPosition(nextStepId);
+            runEnv.getExecutionPath().down();
 
             for (Serializable splitItem : splitData) {
                 RunEnvironment branchRuntimeEnvironment = (RunEnvironment) SerializationUtils.clone(runEnv);
                 Context branchContext = (Context) SerializationUtils.clone(flowContext);
                 branchContext.putVariable(asyncLoopStatement.getVarName(), splitItem);
 
-                updateCallArgumentsAndPushContextToStack(branchRuntimeEnvironment, branchContext, new HashMap<String, Serializable>());
+                updateCallArgumentsAndPushContextToStack(branchRuntimeEnvironment,
+                        branchContext, new HashMap<String, Serializable>());
 
                 createBranch(
                         branchRuntimeEnvironment,
@@ -95,20 +90,15 @@ public class AsyncLoopSteps extends AbstractSteps {
                         nextStepId,
                         branchBeginStep);
 
-                fireEvent(
-                        executionRuntimeServices,
-                        ScoreLangConstants.EVENT_BRANCH_START,
-                        "async loop branch created",
-                        runEnv.getExecutionPath().getCurrentPathPeekForward(),
-                        Pair.of(ScoreLangConstants.REF_ID, refId),
-                        Pair.of(RuntimeConstants.SPLIT_ITEM_KEY, splitItem),
-                        Pair.of(LanguageEventData.levelName.TASK_NAME.name(), nodeName));
+                fireEvent(executionRuntimeServices, ScoreLangConstants.EVENT_BRANCH_START,
+                        "async loop branch created", runEnv.getExecutionPath().getCurrentPath(),
+                        LanguageEventData.StepType.TASK, nodeName, Pair.of(ScoreLangConstants.REF_ID, refId),
+                        Pair.of(RuntimeConstants.SPLIT_ITEM_KEY, splitItem));
+
+                runEnv.getExecutionPath().forward();
             }
 
             updateCallArgumentsAndPushContextToStack(runEnv, flowContext, new HashMap<String, Serializable>());
-
-            // forward after the branches are created because begin task method also calls forward
-            runEnv.getExecutionPath().forward();
         } catch (RuntimeException e) {
             logger.error("There was an error running the add branches execution step of: \\'" + nodeName + "\\'. Error is: " + e.getMessage());
             throw new RuntimeException("Error running: " + nodeName + ": " + e.getMessage(), e);
@@ -122,6 +112,7 @@ public class AsyncLoopSteps extends AbstractSteps {
                              @Param(ScoreLangConstants.TASK_NAVIGATION_KEY) Map<String, ResultNavigation> taskNavigationValues,
                              @Param(ScoreLangConstants.NODE_NAME_KEY) String nodeName) {
         try {
+            runEnv.getExecutionPath().up();
             List<Map<String, Serializable>> branchesContext = Lists.newArrayList();
             Context flowContext = runEnv.getStack().popContext();
             Map<String, Serializable> contextBeforeSplit = flowContext.getImmutableViewOfVariables();
@@ -146,6 +137,7 @@ public class AsyncLoopSteps extends AbstractSteps {
             handleNavigationAndReturnValues(runEnv, executionRuntimeServices, taskNavigationValues, nodeName, publishValues, asyncLoopResult);
 
             runEnv.getStack().pushContext(flowContext);
+            runEnv.getExecutionPath().forward();
         } catch (RuntimeException e) {
             logger.error("There was an error running the end task execution step of: \\'" + nodeName + "\\'. Error is: " + e.getMessage());
             throw new RuntimeException("Error running: \\'" + nodeName + "\\': " + e.getMessage(), e);
@@ -172,15 +164,11 @@ public class AsyncLoopSteps extends AbstractSteps {
         HashMap<String, Serializable> outputs = new HashMap<>(publishValues);
         ReturnValues returnValues = new ReturnValues(outputs, presetResult != null ? presetResult : asyncLoopResult);
 
-        fireEvent(
-                executionRuntimeServices,
-                runEnv,
-                ScoreLangConstants.EVENT_ASYNC_LOOP_OUTPUT_END,
-                "Async loop output binding finished",
+        fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_ASYNC_LOOP_OUTPUT_END,
+                "Async loop output binding finished", LanguageEventData.StepType.TASK, nodeName,
                 Pair.of(LanguageEventData.OUTPUTS, (Serializable) publishValues),
                 Pair.of(LanguageEventData.RESULT, returnValues.getResult()),
-                Pair.of(LanguageEventData.NEXT_STEP_POSITION, nextStepPosition),
-                Pair.of(LanguageEventData.levelName.TASK_NAME.name(), nodeName));
+                Pair.of(LanguageEventData.NEXT_STEP_POSITION, nextStepPosition));
 
         runEnv.putReturnValues(returnValues);
         runEnv.putNextStepPosition(nextStepPosition);
@@ -213,10 +201,9 @@ public class AsyncLoopSteps extends AbstractSteps {
                 executionRuntimeServices,
                 runEnv,
                 ScoreLangConstants.EVENT_ASYNC_LOOP_OUTPUT_START,
-                "Async loop output binding started",
+                "Async loop output binding started", LanguageEventData.StepType.TASK, nodeName,
                 Pair.of(ScoreLangConstants.TASK_AGGREGATE_KEY, (Serializable) taskAggregateValues),
-                Pair.of(ScoreLangConstants.TASK_NAVIGATION_KEY, taskNavigationValues),
-                Pair.of(LanguageEventData.levelName.TASK_NAME.name(), nodeName));
+                Pair.of(ScoreLangConstants.TASK_NAVIGATION_KEY, taskNavigationValues));
 
         return outputsBinding.bindOutputs(contextBeforeSplit, aggregateContext, taskAggregateValues);
     }
@@ -239,13 +226,9 @@ public class AsyncLoopSteps extends AbstractSteps {
             ReturnValues executableReturnValues = branchRuntimeEnvironment.removeReturnValues();
             branchesResult.add(executableReturnValues.getResult());
 
-            fireEvent(
-                    executionRuntimeServices,
-                    runEnv,
-                    ScoreLangConstants.EVENT_BRANCH_END,
-                    "async loop branch ended",
-                    Pair.of(RuntimeConstants.BRANCH_RETURN_VALUES_KEY, executableReturnValues),
-                    Pair.of(LanguageEventData.levelName.TASK_NAME.name(), nodeName)
+            fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_BRANCH_END,
+                    "async loop branch ended", LanguageEventData.StepType.TASK, nodeName,
+                    Pair.of(RuntimeConstants.BRANCH_RETURN_VALUES_KEY, executableReturnValues)
             );
         }
     }
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableSteps.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableSteps.java
index de570b2c6..721f8f87e 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableSteps.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableSteps.java
@@ -43,6 +43,8 @@ import static io.cloudslang.score.api.execution.ExecutionParametersConsts.EXECUT
 @Component
 public class ExecutableSteps extends AbstractSteps {
 
+    public static final String ACTION_RETURN_VALUES_KEY = "actionReturnValues";
+
     @Autowired
     private ResultsBinding resultsBinding;
 
@@ -61,7 +63,6 @@ public class ExecutableSteps extends AbstractSteps {
                                 @Param(ScoreLangConstants.NODE_NAME_KEY) String nodeName,
                                 @Param(ScoreLangConstants.NEXT_STEP_ID_KEY) Long nextStepId) {
         try {
-//			runEnv.getExecutionPath().forward(); // Start with 1 for consistency
             Map<String, Serializable> callArguments = runEnv.removeCallArguments();
 
             if (userInputs != null) {
@@ -84,11 +85,11 @@ public class ExecutableSteps extends AbstractSteps {
             updateCallArgumentsAndPushContextToStack(runEnv, new Context(executableContext), actionArguments);
 
             sendBindingInputsEvent(executableInputs, executableContext, runEnv, executionRuntimeServices,
-                    "Post Input binding for operation/flow", nodeName, LanguageEventData.levelName.EXECUTABLE_NAME);
+                    "Post Input binding for operation/flow", LanguageEventData.StepType.EXECUTABLE, nodeName);
 
             // put the next step position for the navigation
             runEnv.putNextStepPosition(nextStepId);
-			runEnv.getExecutionPath().down();
+            runEnv.getExecutionPath().down();
         } catch (RuntimeException e){
             logger.error("There was an error running the start executable execution step of: \\'" + nodeName + "\\'.\\n\\tError is: " + e.getMessage());
             throw new RuntimeException("Error running: \\'" + nodeName + "\\'.\\n\\t " + e.getMessage(), e);
@@ -109,14 +110,15 @@ public class ExecutableSteps extends AbstractSteps {
                                  @Param(EXECUTION_RUNTIME_SERVICES) ExecutionRuntimeServices executionRuntimeServices,
                                  @Param(ScoreLangConstants.NODE_NAME_KEY) String nodeName) {
 		try {
-			runEnv.getExecutionPath().up();
+            runEnv.getExecutionPath().up();
             Context operationContext = runEnv.getStack().popContext();
             Map<String, Serializable> operationVariables = operationContext == null ? null : operationContext.getImmutableViewOfVariables();
             ReturnValues actionReturnValues = runEnv.removeReturnValues();
             fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_OUTPUT_START, "Output binding started",
+                    LanguageEventData.StepType.EXECUTABLE, nodeName,
                     Pair.of(ScoreLangConstants.EXECUTABLE_OUTPUTS_KEY, (Serializable) executableOutputs),
                     Pair.of(ScoreLangConstants.EXECUTABLE_RESULTS_KEY, (Serializable) executableResults),
-                    Pair.of("actionReturnValues", actionReturnValues), Pair.of(LanguageEventData.levelName.EXECUTABLE_NAME.toString(), nodeName));
+                    Pair.of(ACTION_RETURN_VALUES_KEY, actionReturnValues));
 
             // Resolving the result of the operation/flow
             String result = resultsBinding.resolveResult(operationVariables, actionReturnValues.getOutputs(), executableResults, actionReturnValues.getResult());
@@ -128,19 +130,19 @@ public class ExecutableSteps extends AbstractSteps {
             ReturnValues returnValues = new ReturnValues(operationReturnOutputs, result);
             runEnv.putReturnValues(returnValues);
             fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_OUTPUT_END, "Output binding finished",
+                    LanguageEventData.StepType.EXECUTABLE, nodeName,
                     Pair.of(LanguageEventData.OUTPUTS, (Serializable) operationReturnOutputs),
-                    Pair.of(LanguageEventData.RESULT, returnValues.getResult()),
-                    Pair.of(LanguageEventData.levelName.EXECUTABLE_NAME.toString(), nodeName));
+                    Pair.of(LanguageEventData.RESULT, returnValues.getResult()));
 
             // If we have parent flow data on the stack, we pop it and request the score engine to switch to the parent
             // execution plan id once it can, and we set the next position that was stored there for the use of the navigation
             if (!runEnv.getParentFlowStack().isEmpty()) {
                 handleNavigationToParent(runEnv, executionRuntimeServices);
             } else {
-                fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_EXECUTION_FINISHED, "Execution finished running",
+                fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_EXECUTION_FINISHED,
+                        "Execution finished running", LanguageEventData.StepType.EXECUTABLE, nodeName,
                         Pair.of(LanguageEventData.RESULT, returnValues.getResult()),
-                        Pair.of(LanguageEventData.OUTPUTS, (Serializable) operationReturnOutputs),
-                        Pair.of(LanguageEventData.levelName.EXECUTABLE_NAME.toString(), nodeName));
+                        Pair.of(LanguageEventData.OUTPUTS, (Serializable) operationReturnOutputs));
             }
         } catch (RuntimeException e){
             logger.error("There was an error running the finish executable execution step of: \\'" + nodeName + "\\'.\\n\\tError is: " + e.getMessage());
diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/TaskSteps.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/TaskSteps.java
index a67888d04..9d6ab16c3 100644
--- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/TaskSteps.java
+++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/TaskSteps.java
@@ -65,7 +65,6 @@ public class TaskSteps extends AbstractSteps {
                           @Param(ScoreLangConstants.NEXT_STEP_ID_KEY) Long nextStepId,
                           @Param(ScoreLangConstants.REF_ID) String refId) {
         try {
-            runEnv.getExecutionPath().forward();
             runEnv.removeCallArguments();
             runEnv.removeReturnValues();
 
@@ -103,7 +102,7 @@ public class TaskSteps extends AbstractSteps {
             //todo: hook
 
             sendBindingInputsEvent(taskInputs, operationArguments, runEnv, executionRuntimeServices, "Task inputs resolved",
-                    nodeName, LanguageEventData.levelName.TASK_NAME);
+                    LanguageEventData.StepType.TASK, nodeName);
 
             updateCallArgumentsAndPushContextToStack(runEnv, flowContext, operationArguments);
 
@@ -112,7 +111,6 @@ public class TaskSteps extends AbstractSteps {
 
             // set the start step of the given ref as the next step to execute (in the new running execution plan that will be set)
             runEnv.putNextStepPosition(executionRuntimeServices.getSubFlowBeginStep(refId));
-            runEnv.getExecutionPath().down();
         } catch (RuntimeException e) {
             logger.error("There was an error running the begin task execution step of: \\'" + nodeName + "\\'. Error is: " + e.getMessage());
             throw new RuntimeException("Error running: " + nodeName + ": " + e.getMessage(), e);
@@ -133,15 +131,15 @@ public class TaskSteps extends AbstractSteps {
                         @Param(ScoreLangConstants.ASYNC_LOOP_KEY) boolean async_loop) {
 
         try {
-            if (runEnv.getExecutionPath().getDepth() > 0) runEnv.getExecutionPath().up();
             Context flowContext = runEnv.getStack().popContext();
             Map<String, Serializable> flowVariables = flowContext.getImmutableViewOfVariables();
 
             ReturnValues executableReturnValues = runEnv.removeReturnValues();
             fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_OUTPUT_START, "Output binding started",
+                    LanguageEventData.StepType.TASK, nodeName,
                     Pair.of(ScoreLangConstants.TASK_PUBLISH_KEY, (Serializable) taskPublishValues),
                     Pair.of(ScoreLangConstants.TASK_NAVIGATION_KEY, (Serializable) taskNavigationValues),
-                    Pair.of("operationReturnValues", executableReturnValues), Pair.of(LanguageEventData.levelName.TASK_NAME.name(), nodeName));
+                    Pair.of("operationReturnValues", executableReturnValues));
 
             Map<String, Serializable> publishValues = outputsBinding.bindOutputs(flowVariables, executableReturnValues.getOutputs(), taskPublishValues);
 
@@ -154,6 +152,7 @@ public class TaskSteps extends AbstractSteps {
                 if (!shouldBreakLoop(breakOn, executableReturnValues) && loopCondition.hasMore()) {
                     runEnv.putNextStepPosition(previousStepId);
                     runEnv.getStack().pushContext(flowContext);
+                    runEnv.getExecutionPath().forward();
                     return;
                 } else {
                     flowContext.getLangVariables().remove(LoopCondition.LOOP_CONDITION_KEY);
@@ -188,12 +187,13 @@ public class TaskSteps extends AbstractSteps {
             ReturnValues returnValues = new ReturnValues(outputs, presetResult != null ? presetResult : executableResult);
             runEnv.putReturnValues(returnValues);
             fireEvent(executionRuntimeServices, runEnv, ScoreLangConstants.EVENT_OUTPUT_END, "Output binding finished",
+                    LanguageEventData.StepType.TASK, nodeName,
                     Pair.of(LanguageEventData.OUTPUTS, (Serializable) publishValues),
                     Pair.of(LanguageEventData.RESULT, returnValues.getResult()),
-                    Pair.of(LanguageEventData.NEXT_STEP_POSITION, nextPosition),
-                    Pair.of(LanguageEventData.levelName.TASK_NAME.name(), nodeName));
+                    Pair.of(LanguageEventData.NEXT_STEP_POSITION, nextPosition));
 
             runEnv.getStack().pushContext(flowContext);
+            runEnv.getExecutionPath().forward();
         } catch (RuntimeException e) {
             logger.error("There was an error running the end task execution step of: \\'" + nodeName + "\\'. Error is: " + e.getMessage());
             throw new RuntimeException("Error running: \\'" + nodeName + "\\': " + e.getMessage(), e);
diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/events/LanguageEventDataTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/events/LanguageEventDataTest.java
index d99eeba82..864b3451a 100644
--- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/events/LanguageEventDataTest.java
+++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/events/LanguageEventDataTest.java
@@ -15,9 +15,10 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.python.google.common.collect.Lists;
 
 import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -86,7 +87,7 @@ public class LanguageEventDataTest {
 		Long exeId = 123L;
 		eventData.setExecutionId(exeId);
 		assertEquals(exeId, eventData.getExecutionId());
-		assertEquals(exeId, eventData.get(LanguageEventData.EXECUTIONID));
+		assertEquals(exeId, eventData.get(LanguageEventData.EXECUTION_ID));
 	}
 
 	/**
@@ -149,15 +150,17 @@ public class LanguageEventDataTest {
 		assertEquals(outputs, eventData.get(LanguageEventData.OUTPUTS));
 	}
 
+
     /**
      * Test method for {@link LanguageEventData#getAsyncLoopBoundExpression()}.
      */
     @Test
     public void testAsyncLoopBoundExpression() {
-        List<Serializable> asyncLoopBoundExpression = Lists.newArrayList((Serializable) "a", "b", "c");
+        List<Serializable> asyncLoopBoundExpression = new ArrayList<Serializable>(Arrays.asList("a", "b", "c"));
         eventData.setAsyncLoopBoundExpression(asyncLoopBoundExpression);
         assertEquals(asyncLoopBoundExpression, eventData.getAsyncLoopBoundExpression());
         assertEquals(asyncLoopBoundExpression, eventData.get(LanguageEventData.BOUND_ASYNC_LOOP_EXPRESSION));
     }
 
+
 }
diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/AsyncLoopStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/AsyncLoopStepsTest.java
index 672348c5b..0bd744ecc 100644
--- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/AsyncLoopStepsTest.java
+++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/AsyncLoopStepsTest.java
@@ -174,6 +174,7 @@ public class AsyncLoopStepsTest {
     public void testJoinBranchesAggregateContexts() throws Exception {
         // prepare arguments
         RunEnvironment runEnvironment = new RunEnvironment();
+        runEnvironment.getExecutionPath().down();
         Map<String, Serializable> variables = new HashMap<>();
         Context context = new Context(variables);
         runEnvironment.getStack().pushContext(context);
@@ -230,6 +231,7 @@ public class AsyncLoopStepsTest {
     public void testJoinBranchesNavigationAllBranchesSucced() throws Exception {
         // prepare arguments
         RunEnvironment runEnvironment = new RunEnvironment();
+        runEnvironment.getExecutionPath().down();
         Map<String, Serializable> variables = new HashMap<>();
         Context context = new Context(variables);
         runEnvironment.getStack().pushContext(context);
@@ -279,6 +281,7 @@ public class AsyncLoopStepsTest {
     public void testJoinBranchesNavigationOneBranchFails() throws Exception {
         // prepare arguments
         RunEnvironment runEnvironment = new RunEnvironment();
+        runEnvironment.getExecutionPath().down();
         Map<String, Serializable> variables = new HashMap<>();
         Context context = new Context(variables);
         runEnvironment.getStack().pushContext(context);
@@ -334,6 +337,7 @@ public class AsyncLoopStepsTest {
     public void testJoinBranchesEventsAreFired() throws Exception {
         // prepare arguments
         RunEnvironment runEnvironment = new RunEnvironment();
+        runEnvironment.getExecutionPath().down();
         Map<String, Serializable> variables = new HashMap<>();
         Context context = new Context(variables);
         runEnvironment.getStack().pushContext(context);
diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java
index da0228abd..365124ad8 100644
--- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java
+++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java
@@ -112,14 +112,15 @@ public class ExecutableStepsTest {
             }
         }
         Assert.assertNotNull(boundInputEvent);
-        Map<String,Serializable> eventData = (Map<String,Serializable>)boundInputEvent.getData();
+        LanguageEventData eventData = (LanguageEventData)boundInputEvent.getData();
         Assert.assertTrue(eventData.containsKey(LanguageEventData.BOUND_INPUTS));
         Map<String,Serializable> inputsBounded = (Map<String,Serializable>)eventData.get(LanguageEventData.BOUND_INPUTS);
         Assert.assertEquals(5, inputsBounded.get("input1"));
         Assert.assertEquals(LanguageEventData.ENCRYPTED_VALUE,inputsBounded.get("input2"));
 
-        Assert.assertTrue(eventData.containsKey(LanguageEventData.levelName.EXECUTABLE_NAME.name()));
-        Assert.assertEquals("dockerizeStep",eventData.get(LanguageEventData.levelName.EXECUTABLE_NAME.name()));
+        Assert.assertNotNull(eventData.getStepName());
+        Assert.assertEquals(LanguageEventData.StepType.EXECUTABLE, eventData.getStepType());
+        Assert.assertEquals("dockerizeStep", eventData.getStepName());
     }
 
     @Test
@@ -225,7 +226,7 @@ public class ExecutableStepsTest {
             }
         }
         Assert.assertNotNull(startOutputEvent);
-        Map<String,Serializable> eventData = (Map<String,Serializable>)startOutputEvent.getData();
+        LanguageEventData eventData = (LanguageEventData)startOutputEvent.getData();
         Assert.assertTrue(eventData.containsKey(ScoreLangConstants.EXECUTABLE_OUTPUTS_KEY));
         Assert.assertTrue(eventData.containsKey(ScoreLangConstants.EXECUTABLE_RESULTS_KEY));
         List<Output> outputs= (List<Output>)eventData.get(ScoreLangConstants.EXECUTABLE_OUTPUTS_KEY);
@@ -234,17 +235,18 @@ public class ExecutableStepsTest {
         Assert.assertEquals(possibleResults, results);
 
         Assert.assertNotNull(boundOutputEvent);
-        eventData = (Map<String,Serializable>)boundOutputEvent.getData();
+        eventData = (LanguageEventData)boundOutputEvent.getData();
         Assert.assertTrue(eventData.containsKey(LanguageEventData.OUTPUTS));
-        Map<String, String> returnOutputs= (Map<String, String>)eventData.get(LanguageEventData.OUTPUTS);
+        Map<String, Serializable> returnOutputs= eventData.getOutputs();
         String returnResult= (String)eventData.get(LanguageEventData.RESULT);
-        Assert.assertEquals("task1",eventData.get(LanguageEventData.levelName.EXECUTABLE_NAME.name()));
+        Assert.assertEquals("task1",eventData.getStepName());
+        Assert.assertEquals(LanguageEventData.StepType.EXECUTABLE, eventData.getStepType());
         Assert.assertEquals(1, returnOutputs.size());
         Assert.assertEquals("John", returnOutputs.get("name"));
         Assert.assertTrue(returnResult.equals(ScoreLangConstants.SUCCESS_RESULT));
 
         Assert.assertNotNull(executableFinishedEvent);
-        eventData = (Map<String,Serializable>)executableFinishedEvent.getData();
+        eventData = (LanguageEventData)executableFinishedEvent.getData();
         String result = (String)eventData.get(LanguageEventData.RESULT);
         Map<String, String> eventOutputs = (Map<String, String>)eventData.get(LanguageEventData.OUTPUTS);
         Assert.assertEquals(ScoreLangConstants.SUCCESS_RESULT, result);
diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/TaskStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/TaskStepsTest.java
index 7c56aa9db..d4b7822ba 100644
--- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/TaskStepsTest.java
+++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/TaskStepsTest.java
@@ -143,8 +143,9 @@ public class TaskStepsTest {
         ScoreEvent inputEvent = events.iterator().next();
         Assert.assertEquals(ScoreLangConstants.EVENT_INPUT_END,inputEvent.getEventType());
 
-        Map<String,Serializable> eventData = (Map<String,Serializable>)inputEvent.getData();
-        Assert.assertEquals("task1",eventData.get(LanguageEventData.levelName.TASK_NAME.name()));
+        LanguageEventData eventData = (LanguageEventData)inputEvent.getData();
+        Assert.assertEquals("task1",eventData.getStepName());
+        Assert.assertEquals(LanguageEventData.StepType.TASK,eventData.getStepType());
 
         Map<String,Serializable> boundInputs = (Map<String,Serializable>)eventData.get(LanguageEventData.BOUND_INPUTS);
         Assert.assertEquals(5,boundInputs.get("input1"));
@@ -172,14 +173,16 @@ public class TaskStepsTest {
         ScoreEvent outputStart = eventsIter.next();
         Assert.assertEquals(ScoreLangConstants.EVENT_OUTPUT_START,outputStart.getEventType());
 
-        Map<String,Serializable> eventData = (Map<String,Serializable>)outputStart.getData();
-        Assert.assertEquals("task1",eventData.get(LanguageEventData.levelName.TASK_NAME.name()));
+        LanguageEventData eventData = (LanguageEventData)outputStart.getData();
+        Assert.assertEquals("task1",eventData.getStepName());
+        Assert.assertEquals(LanguageEventData.StepType.TASK,eventData.getStepType());
 
         ScoreEvent outputEnd = eventsIter.next();
         Assert.assertEquals(ScoreLangConstants.EVENT_OUTPUT_END,outputEnd.getEventType());
 
-        eventData = (Map<String,Serializable>)outputEnd.getData();
-        Assert.assertEquals("task1",eventData.get(LanguageEventData.levelName.TASK_NAME.name()));
+        eventData = (LanguageEventData)outputEnd.getData();
+        Assert.assertEquals("task1",eventData.getStepName());
+        Assert.assertEquals(LanguageEventData.StepType.TASK,eventData.getStepType());
 
     }
 
diff --git a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/AbstractAggregatorListener.java b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/AbstractAggregatorListener.java
index 6c738ff7f..05f1be1e4 100644
--- a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/AbstractAggregatorListener.java
+++ b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/AbstractAggregatorListener.java
@@ -23,9 +23,6 @@ import java.util.List;
  */
 public abstract class AbstractAggregatorListener implements ScoreEventListener {
 
-    public static final String TASK_NAME = LanguageEventData.levelName.TASK_NAME.name();
-    public static final String EXECUTABLE_NAME = LanguageEventData.levelName.EXECUTABLE_NAME.name();
-
     private final List<LanguageEventData> events = new ArrayList<>();
 
     public List<LanguageEventData> getEvents() {
diff --git a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/BranchAggregatorListener.java b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/BranchAggregatorListener.java
index 69dc61ca9..884f81c51 100644
--- a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/BranchAggregatorListener.java
+++ b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/BranchAggregatorListener.java
@@ -11,7 +11,6 @@ package io.cloudslang.lang.systemtests;
 
 import ch.lambdaj.group.Group;
 import com.google.common.collect.Lists;
-import io.cloudslang.lang.entities.ScoreLangConstants;
 import io.cloudslang.lang.runtime.RuntimeConstants;
 import io.cloudslang.lang.runtime.env.ReturnValues;
 import io.cloudslang.lang.runtime.events.LanguageEventData;
@@ -49,8 +48,7 @@ public class BranchAggregatorListener extends AbstractAggregatorListener {
 
         for (LanguageEventData branchData : data) {
             String path = branchData.getPath();
-            String stepName = branchData.get(TASK_NAME) != null ? (String) branchData.get(TASK_NAME)
-                : (String) branchData.get(EXECUTABLE_NAME);
+            String stepName = branchData.getStepName();
             ReturnValues returnValues = (ReturnValues) branchData.get(RuntimeConstants.BRANCH_RETURN_VALUES_KEY);
             branches.add(
                     new StepData(
@@ -58,7 +56,7 @@ public class BranchAggregatorListener extends AbstractAggregatorListener {
                             stepName,
                             new HashMap<String, Serializable>(),
                             returnValues.getOutputs(),
-                            returnValues.getResult()
+                            null, returnValues.getResult()
                     )
             );
         }
diff --git a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/JoinAggregatorListener.java b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/JoinAggregatorListener.java
index 2c883b0f4..9e7dc5695 100644
--- a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/JoinAggregatorListener.java
+++ b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/JoinAggregatorListener.java
@@ -41,8 +41,7 @@ public class JoinAggregatorListener extends AbstractAggregatorListener {
 
     private StepData buildPublishAggregateData(LanguageEventData data) {
         String path = data.getPath();
-        String stepName = data.get(TASK_NAME) != null ? (String) data.get(TASK_NAME)
-                : (String) data.get(EXECUTABLE_NAME);
+        String stepName = data.getStepName();
         Map<String, Serializable> outputs = data.getOutputs();
         String result = (String) data.get(LanguageEventData.RESULT);
         return new StepData(
@@ -50,7 +49,7 @@ public class JoinAggregatorListener extends AbstractAggregatorListener {
                 stepName,
                 new HashMap<String, Serializable>(),
                 outputs,
-                result
+                null, result
         );
     }
 
diff --git a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/RunDataAggregatorListener.java b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/RunDataAggregatorListener.java
index 4c02de5cc..b79972861 100644
--- a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/RunDataAggregatorListener.java
+++ b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/RunDataAggregatorListener.java
@@ -10,10 +10,13 @@
 
 package io.cloudslang.lang.systemtests;
 
+import ch.lambdaj.Lambda;
 import ch.lambdaj.function.convert.Converter;
 import ch.lambdaj.group.Group;
 import io.cloudslang.lang.entities.ScoreLangConstants;
 import io.cloudslang.lang.runtime.events.LanguageEventData;
+import org.apache.commons.collections4.CollectionUtils;
+import org.hamcrest.Matchers;
 
 import java.io.Serializable;
 import java.util.HashMap;
@@ -21,6 +24,7 @@ import java.util.List;
 import java.util.Map;
 
 import static ch.lambdaj.Lambda.*;
+import static org.hamcrest.Matchers.equalTo;
 
 /*
  * Created by orius123 on 24/12/14.
@@ -42,25 +46,37 @@ public class RunDataAggregatorListener extends AbstractAggregatorListener {
     }
 
     private StepData buildStepData(List<LanguageEventData> data) {
-        Map<String, LanguageEventData> stepEvents = map(data, new Converter<LanguageEventData, String>() {
-            @Override
-            public String convert(LanguageEventData from) {
-                return from.getEventType();
-            }
-        });
+        List<LanguageEventData> taskEvents = selectByStepType(data, LanguageEventData.StepType.TASK);
+        List<LanguageEventData> executableEvents = selectByStepType(data, LanguageEventData.StepType.EXECUTABLE);
+
+        LanguageEventData inputsEvent;
+        LanguageEventData outputsEvent;
+
+        if (CollectionUtils.isNotEmpty(taskEvents)) {
+            inputsEvent = selectByEventType(taskEvents, ScoreLangConstants.EVENT_INPUT_END);
+            outputsEvent = selectByEventType(taskEvents, ScoreLangConstants.EVENT_OUTPUT_END);
+        } else {
+            inputsEvent = selectByEventType(executableEvents, ScoreLangConstants.EVENT_INPUT_END);
+            outputsEvent = selectByEventType(executableEvents, ScoreLangConstants.EVENT_OUTPUT_END);
+        }
+            String path = inputsEvent.getPath();
+            String stepName = inputsEvent.getStepName();
+            Map<String, Serializable> inputs = inputsEvent.getInputs();
+
+            Map<String, Serializable> outputs = outputsEvent == null ? null : outputsEvent.getOutputs();
+            String result = outputsEvent == null ? null : (String) outputsEvent.get(LanguageEventData.RESULT);
 
-        LanguageEventData inputsEvent = stepEvents.get(ScoreLangConstants.EVENT_INPUT_END);
-        LanguageEventData outputsEvent = stepEvents.get(ScoreLangConstants.EVENT_OUTPUT_END);
+            String executableName = executableEvents.get(0).getStepName();
 
-        String path = inputsEvent.getPath();
-        String stepName = inputsEvent.get(TASK_NAME) != null ? (String) inputsEvent.get(TASK_NAME)
-                : (String) inputsEvent.get(EXECUTABLE_NAME);
-        Map<String, Serializable> inputs = inputsEvent.getInputs();
+        return new StepData(path, stepName, inputs, outputs, executableName, result);
+    }
 
-        Map<String, Serializable> outputs = outputsEvent == null ? null : outputsEvent.getOutputs();
-        String result = outputsEvent == null ? null : (String) outputsEvent.get(LanguageEventData.RESULT);
+    private List<LanguageEventData> selectByStepType(List<LanguageEventData> data, LanguageEventData.StepType stepType) {
+        return select(data, having(on(LanguageEventData.class).getStepType(), equalTo(stepType)));
+    }
 
-        return new StepData(path, stepName, inputs, outputs, result);
+    private LanguageEventData selectByEventType(List<LanguageEventData> data, String eventType) {
+        return selectFirst(data, having(on(LanguageEventData.class).getEventType(), equalTo(eventType)));
     }
 
 }
diff --git a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/StepData.java b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/StepData.java
index 8036e3979..f168a5d7b 100644
--- a/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/StepData.java
+++ b/cloudslang-tests/src/main/java/io/cloudslang/lang/systemtests/StepData.java
@@ -19,13 +19,16 @@ public class StepData {
     private final String name;
     private final Map<String, Serializable> inputs;
     private final Map<String, Serializable> outputs;
+    private final String executableName;
     private final String result;
 
-    public StepData(String path, String name, Map<String, Serializable> inputs, Map<String, Serializable> outputs, String result) {
+    public StepData(String path, String name, Map<String, Serializable> inputs,
+                    Map<String, Serializable> outputs, String executableName, String result) {
         this.path = path;
         this.name = name;
         this.inputs = inputs;
         this.outputs = outputs;
+        this.executableName = executableName;
         this.result = result;
     }
 
@@ -45,6 +48,10 @@ public class StepData {
         return outputs;
     }
 
+    public String getExecutableName() {
+        return executableName;
+    }
+
     public String getResult() {
         return result;
     }
diff --git a/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/LoopFlowsTest.java b/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/LoopFlowsTest.java
index e6e762d7d..9b1cde463 100644
--- a/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/LoopFlowsTest.java
+++ b/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/LoopFlowsTest.java
@@ -23,8 +23,10 @@ import java.util.Map;
 import java.util.Set;
 
 import static ch.lambdaj.Lambda.filter;
+import static ch.lambdaj.Lambda.select;
 import static org.hamcrest.Matchers.endsWith;
 import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.startsWith;
 
 public class LoopFlowsTest extends SystemsTestsParent{
 
@@ -196,7 +198,7 @@ public class LoopFlowsTest extends SystemsTestsParent{
     }
 
     private List<String> getTasksOnly(Map<String, StepData> stepsData) {
-        return filter(not(endsWith("0")), stepsData.keySet());
+        return select(stepsData.keySet(), startsWith("0."));
     }
 
     private void verifyPersonMap(Map<String, StepData> stepsData) {
diff --git a/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/SystemsTestsParent.java b/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/SystemsTestsParent.java
index 2f8edcbaf..f632b7583 100644
--- a/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/SystemsTestsParent.java
+++ b/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/SystemsTestsParent.java
@@ -29,10 +29,10 @@ import java.util.Map;
 public abstract class SystemsTestsParent {
 
     protected static final String EXEC_START_PATH = "0";
-    protected static final String FIRST_STEP_PATH = "0/1";
-    protected static final String SECOND_STEP_KEY = "0/2";
-    protected static final String THIRD_STEP_KEY = "0/3";
-    protected static final String FOURTH_STEP_KEY = "0/4";
+    protected static final String FIRST_STEP_PATH = "0.0";
+    protected static final String SECOND_STEP_KEY = "0.1";
+    protected static final String THIRD_STEP_KEY = "0.2";
+    protected static final String FOURTH_STEP_KEY = "0.3";
 
     @Autowired
     protected Slang slang;
diff --git a/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/flows/NavigationTest.java b/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/flows/NavigationTest.java
index 2f757650a..c7013689c 100644
--- a/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/flows/NavigationTest.java
+++ b/cloudslang-tests/src/test/java/io/cloudslang/lang/systemtests/flows/NavigationTest.java
@@ -53,7 +53,6 @@ public class NavigationTest extends SystemsTestsParent {
 
         Map<String, StepData> tasks = triggerWithData(compilationArtifact, userInputs, null).getTasks();
 
-        Assert.assertEquals(5, tasks.size());
         Assert.assertEquals("check_number", tasks.get(FIRST_STEP_PATH).getName());
         Assert.assertEquals("process_even_number", tasks.get(SECOND_STEP_KEY).getName());
     }