Pārlūkot izejas kodu

HPCC-12237 Add information about the current wfid to the graph

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 10 gadi atpakaļ
vecāks
revīzija
e54831e82d
3 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 1 0
      ecl/hqlcpp/hqlcpp.cpp
  2. 1 0
      ecl/hqlcpp/hqlcpp.ipp
  3. 4 0
      ecl/hqlcpp/hqlhtcpp.cpp

+ 1 - 0
ecl/hqlcpp/hqlcpp.cpp

@@ -1412,6 +1412,7 @@ HqlCppTranslator::HqlCppTranslator(IErrorReceiver * _errors, const char * _soNam
     nextUid = 0;
     nextTypeId = 0;
     nextFieldId = 0;
+    curWfid = 0;
     code = (HqlCppInstance*)_code;
     xmlUsesContents = false;
 }

+ 1 - 0
ecl/hqlcpp/hqlcpp.ipp

@@ -1945,6 +1945,7 @@ protected:
     unsigned            nextUid;
     unsigned            nextTypeId;
     unsigned            nextFieldId;
+    unsigned            curWfid;
     HqlExprArray        internalFunctions;
     HqlExprArray        internalFunctionExternals;
     UniqueSequenceCounter spillSequence;

+ 4 - 0
ecl/hqlcpp/hqlhtcpp.cpp

@@ -9206,6 +9206,8 @@ void HqlCppTranslator::beginGraph(const char * _graphName)
 
     if (insideLibrary())
         activeGraph->xgmml->setPropBool("@library", true);
+    if (curWfid)
+        activeGraph->xgmml->setPropInt("@wfid", curWfid);
 }
 
 
@@ -17661,6 +17663,7 @@ void HqlCppTranslator::buildWorkflow(WorkflowArray & workflow)
                 OwnedHqlExpr expr = createActionList(action.queryExprs());
 
                 IHqlExpression * persistAttr = expr->queryAttribute(_workflowPersist_Atom);
+                curWfid = wfid;
                 if (persistAttr)
                 {
                     if (!options.freezePersists)
@@ -17673,6 +17676,7 @@ void HqlCppTranslator::buildWorkflow(WorkflowArray & workflow)
                 }
                 else
                     buildWorkflowItem(switchctx, switchStmt, wfid, expr);
+                curWfid = 0;
             }
         }
     }