Browse Source

Merge pull request #10123 from ghalliday/issue17697

HPCC-17697 Ensure scopes are generated in the new canonical form

Reviewed By: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
f01c537784
1 changed files with 10 additions and 2 deletions
  1. 10 2
      ecl/hqlcpp/hqlhtcpp.cpp

+ 10 - 2
ecl/hqlcpp/hqlhtcpp.cpp

@@ -2432,11 +2432,19 @@ void ActivityInstance::getScope(StringBuffer & scope) const
         containerActivity->getScope(scope);
         scope.append(":");
     }
-    else if (translator.activeGraph)
-        scope.append(translator.activeGraph->name).append(":");
+    else
+    {
+        scope.append(WorkflowScopePrefix).append(translator.curWfid).append(":");
+        if (translator.activeGraph)
+            scope.append(translator.activeGraph->name).append(":");
+    }
 
     if (subgraph)
+    {
+        if (subgraph->graphId)
+            scope.append(ChildGraphScopePrefix).append(subgraph->graphId).append(":");
         scope.append(SubGraphScopePrefix).append(subgraph->id).append(":");
+    }
     scope.append(ActivityScopePrefix).append(activityId);
 }