From bdb74422d8cc0246235756d9e90d1e0b2961a897 Mon Sep 17 00:00:00 2001 From: Shamser Ahmed Date: Thu, 11 Jan 2024 17:03:40 +0000 Subject: [PATCH] wip Signed-off-by: Shamser Ahmed --- common/thorhelper/thorcommon.hpp | 4 + ecl/eclagent/eclagent.cpp | 6 +- ecl/eclagent/eclagent.ipp | 4 +- ecl/hql/hqlfold.cpp | 2 +- plugins/fileservices/fileservices.cpp | 2 +- roxie/ccd/ccdactivities.cpp | 1 + roxie/ccd/ccdcontext.cpp | 10 +- rtl/include/eclhelper.hpp | 360 +++++++++++++++++++++++++- thorlcr/graph/thgraph.hpp | 1 + thorlcr/thorcodectx/thcodectx.hpp | 1 + tools/wutool/wutool.cpp | 1 + 11 files changed, 379 insertions(+), 13 deletions(-) diff --git a/common/thorhelper/thorcommon.hpp b/common/thorhelper/thorcommon.hpp index aad74478a3e..74eb4c1481c 100644 --- a/common/thorhelper/thorcommon.hpp +++ b/common/thorhelper/thorcommon.hpp @@ -493,6 +493,10 @@ class THORHELPER_API IndirectCodeContext : implements ICodeContext { return ctx->getWuid(); } + virtual unsigned getWorkflowId() const + { + return ctx->getWorkflowId(); + } virtual void getExternalResultRaw(unsigned & tlen, void * & tgt, const char * wuid, const char * stepname, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) { ctx->getExternalResultRaw(tlen, tgt, wuid, stepname, sequence, xmlTransformer, csvTransformer); diff --git a/ecl/eclagent/eclagent.cpp b/ecl/eclagent/eclagent.cpp index 0a11ff63e9f..43ece4063a4 100644 --- a/ecl/eclagent/eclagent.cpp +++ b/ecl/eclagent/eclagent.cpp @@ -1925,7 +1925,7 @@ void EclAgent::doProcess() } { MTIME_SECTION(queryActiveTimer(), "Process"); - Owned process = loadProcess(); + Owned process = new EclProcessExtra(loadProcess()); QueryTerminationCleanup threadCleanup(false); if (checkVersion && (process->getActivityVersion() != eclccCodeVersion)) @@ -2267,10 +2267,6 @@ void EclAgent::runProcess(IEclProcess *process) LOG(MCrunlock, unknownJob, "Released persist read locks"); } -unsigned EclAgent::getWorkflowId() -{ - throwUnexpected(); -} //---------------------------------------------------------------- diff --git a/ecl/eclagent/eclagent.ipp b/ecl/eclagent/eclagent.ipp index 3aafca17a3e..43db3579f42 100644 --- a/ecl/eclagent/eclagent.ipp +++ b/ecl/eclagent/eclagent.ipp @@ -68,7 +68,7 @@ public: { return ctx->isResult(name, sequence); } - virtual unsigned getWorkflowId() + virtual unsigned getWorkflowId() const override { return ctx->getWorkflowId(); } @@ -631,7 +631,6 @@ public: virtual const char *loadResource(unsigned id); virtual ICodeContext *queryCodeContext(); virtual bool isResult(const char * name, unsigned sequence); - virtual unsigned getWorkflowId(); virtual IConstWorkUnit *queryWorkUnit() const override; // no link virtual IWorkUnit *updateWorkUnit() const; // links virtual void reloadWorkUnit(); @@ -645,6 +644,7 @@ public: virtual unsigned __int64 getFileOffset(const char *logicalPart) { UNIMPLEMENTED; return 0; } virtual char *getOutputDir() { UNIMPLEMENTED; } virtual char *getWuid(); + virtual unsigned getWorkflowId() const override { throwUnexpected(); } virtual const char *queryWuid(); virtual IDistributedFileTransaction *querySuperFileTransaction(); virtual unsigned getPriority() const { return 0; } diff --git a/ecl/hql/hqlfold.cpp b/ecl/hql/hqlfold.cpp index d2a21745ec8..36489b53100 100644 --- a/ecl/hql/hqlfold.cpp +++ b/ecl/hql/hqlfold.cpp @@ -1471,7 +1471,7 @@ class DummyContext: implements ICodeContext virtual char *getPlatform() { throwUnexpected(); } // caller frees return string. virtual unsigned getPriority() const { throwUnexpected(); } virtual char *getWuid() { throwUnexpected(); } // caller frees return string. - + virtual unsigned getWorkflowId() const { throwUnexpected(); } // Exception handling virtual void addWuException(const char*, unsigned int, unsigned int, const char*) { throwUnexpected(); } //n.b. this might be better named: it should only be used for adding user-generated exceptions (via the logging plug-in) --- there's a call in IAgentContext which takes a source argument too diff --git a/plugins/fileservices/fileservices.cpp b/plugins/fileservices/fileservices.cpp index d52da12b82b..5e9c131fbc4 100644 --- a/plugins/fileservices/fileservices.cpp +++ b/plugins/fileservices/fileservices.cpp @@ -636,7 +636,7 @@ static void blockUntilComplete(const char * label, IClientFileSpray &server, ICo aborting = wu->aborting(); StringBuffer wuScope, ElapsedLabel, RemainingLabel; StringBuffer labelbuf(label); - wuScope.appendf("dfu:%s:%s", labelbuf.toLowerCase().str(), dfuwu.getID()); + wuScope.appendf("w%u:dfu:%s:%s", ctx->getWorkflowId(), labelbuf.toLowerCase().str(), dfuwu.getID()); ElapsedLabel.append(wuScope).append(" (Elapsed) "); RemainingLabel.append(wuScope).append(" (Remaining) "); //MORE: I think this are intended to replace the timing information, but will currently combine diff --git a/roxie/ccd/ccdactivities.cpp b/roxie/ccd/ccdactivities.cpp index 961b728609e..7788c0ca158 100644 --- a/roxie/ccd/ccdactivities.cpp +++ b/roxie/ccd/ccdactivities.cpp @@ -567,6 +567,7 @@ class CRoxieAgentActivity : implements CInterfaceOf, implem // Not yet thought about these.... virtual char *getWuid() { throwUnexpected(); } // caller frees return string. + virtual unsigned getWorkflowId() const override { throwUnexpected(); } virtual void getExternalResultRaw(unsigned & tlen, void * & tgt, const char * wuid, const char * stepname, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) { throwUnexpected(); } // shouldn't really be here, but it broke thor. virtual void executeGraph(const char * graphName, bool realThor, size32_t parentExtractSize, const void * parentExtract) { throwUnexpected(); } virtual unsigned __int64 getDatasetHash(const char * name, unsigned __int64 hash) { throwUnexpected(); return 0; } diff --git a/roxie/ccd/ccdcontext.cpp b/roxie/ccd/ccdcontext.cpp index b83ac4c321a..3f60d5677f9 100644 --- a/roxie/ccd/ccdcontext.cpp +++ b/roxie/ccd/ccdcontext.cpp @@ -1796,6 +1796,7 @@ class CRoxieContextBase : implements IRoxieAgentContext, implements ICodeContext virtual void printResults(IXmlWriter *output, const char *name, unsigned sequence) { throwUnexpected(); } virtual char *getWuid() { throwUnexpected(); } + virtual unsigned getWorkflowId() const override { throwUnexpected(); } virtual void getExternalResultRaw(unsigned & tlen, void * & tgt, const char * wuid, const char * stepname, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) { throwUnexpected(); } virtual char * getExpandLogicalName(const char * logicalName) { throwUnexpected(); } @@ -2876,7 +2877,7 @@ class CRoxieServerContext : public CRoxieContextBase, implements IRoxieServerCon MTIME_SECTION(myTimer, "Process"); QueryTerminationCleanup threadCleanup(true); EclProcessFactory pf = (EclProcessFactory) factory->queryDll()->getEntry("createProcess"); - Owned p = pf(); + Owned p = new EclProcessExtra(pf()); try { if (debugContext) @@ -3692,7 +3693,10 @@ class CRoxieServerContext : public CRoxieContextBase, implements IRoxieServerCon CriticalBlock b(contextCrit); return useContext(sequence).hasProp(name); } - + virtual unsigned getWorkflowId() const override + { + throwUnexpected(); + } virtual char *getClusterName() { if (workUnit) @@ -4029,7 +4033,7 @@ class CSoapRoxieServerContext : public CRoxieServerContext virtual void process() { EclProcessFactory pf = (EclProcessFactory) factory->queryDll()->getEntry("createProcess"); - Owned p = pf(); + Owned p = new EclProcessExtra(pf()); if (workflow) workflow->perform(this, p); else diff --git a/rtl/include/eclhelper.hpp b/rtl/include/eclhelper.hpp index aaee4136d36..912f27b8d1e 100644 --- a/rtl/include/eclhelper.hpp +++ b/rtl/include/eclhelper.hpp @@ -45,6 +45,7 @@ typedef unsigned short UChar; #endif #endif #include "rtlconst.hpp" +#include "jiface.hpp" //Should be incremented whenever the virtuals in the context or a helper are changed, so //that a work unit can't be rerun. Try as hard as possible to retain compatibility. @@ -727,6 +728,7 @@ interface ICodeContext : public IResourceContext virtual char *getPlatform() = 0; // caller frees return string. virtual unsigned getPriority() const = 0; virtual char *getWuid() = 0; // caller frees return string. + virtual unsigned getWorkflowId() const = 0; // Exception handling @@ -2954,7 +2956,7 @@ struct IGlobalCodeContext virtual void fail(int, const char *) = 0; virtual bool isResult(const char * name, unsigned sequence) = 0; - virtual unsigned getWorkflowId() = 0; + virtual unsigned getWorkflowId() const = 0; virtual void doNotify(char const * name, char const * text) = 0; virtual int queryLastFailCode() = 0; @@ -2981,6 +2983,362 @@ struct IEclProcess : public IInterface }; +// Wraps existing IEclProcess so that when perform is called, +// ICodeContext->getWorkflowId() may be used by the process to query +// the workflow id +struct EclProcessExtra : implements IEclProcess, public CInterface +{ + class CodeContext : implements ICodeContext + { + ICodeContext * ctx; + unsigned wfid; + public: + CodeContext(ICodeContext * _ctx, unsigned _wfid) : ctx(_ctx), wfid(_wfid) {} + virtual ~CodeContext(){}; + virtual const char *loadResource(unsigned id) + { + return ctx->loadResource(id); + } + virtual void setResultBool(const char *name, unsigned sequence, bool value) + { + ctx->setResultBool(name, sequence, value); + } + virtual void setResultData(const char *name, unsigned sequence, int len, const void * data) + { + ctx->setResultData(name, sequence, len, data); + } + virtual void setResultDecimal(const char * stepname, unsigned sequence, int len, int precision, bool isSigned, const void *val) + { + ctx->setResultDecimal(stepname, sequence, len, precision, isSigned, val); + } + virtual void setResultInt(const char *name, unsigned sequence, __int64 value, unsigned size) + { + ctx->setResultInt(name, sequence, value, size); + } + virtual void setResultRaw(const char *name, unsigned sequence, int len, const void * data) + { + ctx->setResultRaw(name, sequence, len, data); + } + virtual void setResultReal(const char * stepname, unsigned sequence, double value) + { + ctx->setResultReal(stepname, sequence, value); + } + virtual void setResultSet(const char *name, unsigned sequence, bool isAll, size32_t len, const void * data, ISetToXmlTransformer * transformer) + { + ctx->setResultSet(name, sequence, isAll, len, data, transformer); + } + virtual void setResultString(const char *name, unsigned sequence, int len, const char * str) + { + ctx->setResultString(name, sequence, len, str); + } + virtual void setResultUInt(const char *name, unsigned sequence, unsigned __int64 value, unsigned size) + { + ctx->setResultUInt(name, sequence, value, size); + } + virtual void setResultUnicode(const char *name, unsigned sequence, int len, UChar const * str) + { + ctx->setResultUnicode(name, sequence, len, str); + } + virtual void setResultVarString(const char * name, unsigned sequence, const char * value) + { + ctx->setResultVarString(name, sequence, value); + } + virtual void setResultVarUnicode(const char * name, unsigned sequence, UChar const * value) + { + ctx->setResultVarUnicode(name, sequence, value); + } + virtual bool getResultBool(const char * name, unsigned sequence) + { + return ctx->getResultBool(name, sequence); + } + virtual void getResultData(unsigned & tlen, void * & tgt, const char * name, unsigned sequence) + { + ctx->getResultData(tlen, tgt, name, sequence); + } + virtual void getResultDecimal(unsigned tlen, int precision, bool isSigned, void * tgt, const char * stepname, unsigned sequence) + { + ctx->getResultDecimal(tlen, precision, isSigned, tgt, stepname, sequence); + } + virtual void getResultRaw(unsigned & tlen, void * & tgt, const char * name, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) + { + ctx->getResultRaw(tlen, tgt, name, sequence, xmlTransformer, csvTransformer); + } + virtual void getResultSet(bool & isAll, size32_t & tlen, void * & tgt, const char * name, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) + { + ctx->getResultSet(isAll, tlen, tgt, name, sequence, xmlTransformer, csvTransformer); + } + virtual __int64 getResultInt(const char * name, unsigned sequence) + { + return ctx->getResultInt(name, sequence); + } + virtual double getResultReal(const char * name, unsigned sequence) + { + return ctx->getResultReal(name, sequence); + } + virtual void getResultString(unsigned & tlen, char * & tgt, const char * name, unsigned sequence) + { + ctx->getResultString(tlen, tgt, name, sequence); + } + virtual void getResultStringF(unsigned tlen, char * tgt, const char * name, unsigned sequence) + { + ctx->getResultStringF(tlen, tgt, name, sequence); + } + virtual void getResultUnicode(unsigned & tlen, UChar * & tgt, const char * name, unsigned sequence) + { + ctx->getResultUnicode(tlen, tgt, name, sequence); + } + virtual char *getResultVarString(const char * name, unsigned sequence) + { + return ctx->getResultVarString(name, sequence); + } + virtual UChar *getResultVarUnicode(const char * name, unsigned sequence) + { + return ctx->getResultVarUnicode(name, sequence); + } + virtual unsigned getResultHash(const char * name, unsigned sequence) + { + return ctx->getResultHash(name, sequence); + } + virtual unsigned getExternalResultHash(const char * wuid, const char * name, unsigned sequence) + { + return ctx->getExternalResultHash(wuid, name, sequence); + } + virtual char *getWuid() + { + return ctx->getWuid(); + } + virtual unsigned getWorkflowId() const override + { + return wfid; + } + virtual void getExternalResultRaw(unsigned & tlen, void * & tgt, const char * wuid, const char * stepname, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) + { + ctx->getExternalResultRaw(tlen, tgt, wuid, stepname, sequence, xmlTransformer, csvTransformer); + } + virtual void executeGraph(const char * graphName, bool realThor, size32_t parentExtractSize, const void * parentExtract) + { + ctx->executeGraph(graphName, realThor, parentExtractSize, parentExtract); + } + virtual char * getExpandLogicalName(const char * logicalName) + { + return ctx->getExpandLogicalName(logicalName); + } + virtual void addWuException(const char * text, unsigned code, unsigned severity, const char *source) + { + ctx->addWuException(text, code, severity, source); + } + virtual void addWuAssertFailure(unsigned code, const char * text, const char * filename, unsigned lineno, unsigned column, bool isAbort) + { + ctx->addWuAssertFailure(code, text, filename, lineno, column, isAbort); + } + virtual IUserDescriptor *queryUserDescriptor() + { + return ctx->queryUserDescriptor(); + } + virtual IThorChildGraph * resolveChildQuery(__int64 activityId, IHThorArg * colocal) + { + return ctx->resolveChildQuery(activityId, colocal); + } + virtual unsigned __int64 getDatasetHash(const char * name, unsigned __int64 hash) + { + return ctx->getDatasetHash(name, hash); + } + virtual unsigned getNodes() + { + return ctx->getNodes(); + } + virtual unsigned getNodeNum() + { + return ctx->getNodeNum(); + } + virtual char *getFilePart(const char *logicalPart, bool create) + { + return ctx->getFilePart(logicalPart, create); + } + virtual unsigned __int64 getFileOffset(const char *logicalPart) + { + return ctx->getFileOffset(logicalPart); + } + virtual IDistributedFileTransaction *querySuperFileTransaction() + { + return ctx->querySuperFileTransaction(); + } + virtual char *getEnv(const char *name, const char *defaultValue) const + { + return ctx->getEnv(name, defaultValue); + } + virtual char *getJobName() + { + return ctx->getJobName(); + } + virtual char *getJobOwner() + { + return ctx->getJobOwner(); + } + virtual char *getClusterName() + { + return ctx->getClusterName(); + } + virtual char *getGroupName() + { + return ctx->getGroupName(); + } + virtual char * queryIndexMetaData(char const * lfn, char const * xpath) + { + return ctx->queryIndexMetaData(lfn, xpath); + } + virtual unsigned getPriority() const + { + return ctx->getPriority(); + } + virtual char *getPlatform() + { + return ctx->getPlatform(); + } + virtual char *getOS() + { + return ctx->getOS(); + } + virtual IEclGraphResults * resolveLocalQuery(__int64 activityId) + { + return ctx->resolveLocalQuery(activityId); + } + virtual char *getEnv(const char *name, const char *defaultValue) + { + return ctx->getEnv(name, defaultValue); + } + virtual unsigned logString(const char *text) const + { + return ctx->logString(text); + } + virtual const IContextLogger &queryContextLogger() const + { + return ctx->queryContextLogger(); + } + virtual IDebuggableContext *queryDebugContext() const + { + return ctx->queryDebugContext(); + } + virtual IEngineRowAllocator * getRowAllocator(IOutputMetaData * meta, unsigned activityId) const + { + return ctx->getRowAllocator(meta, activityId); + } + virtual IEngineRowAllocator * getRowAllocatorEx(IOutputMetaData * meta, unsigned activityId, unsigned heapFlags) const + { + return ctx->getRowAllocatorEx(meta, activityId, heapFlags); + } + virtual const char *cloneVString(const char *str) const + { + return ctx->cloneVString(str); + } + virtual const char *cloneVString(size32_t len, const char *str) const + { + return ctx->cloneVString(len, str); + } + virtual void getResultRowset(size32_t & tcount, const byte * * & tgt, const char * name, unsigned sequence, IEngineRowAllocator * _rowAllocator, bool isGrouped, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) override + { + ctx->getResultRowset(tcount, tgt, name, sequence, _rowAllocator, isGrouped, xmlTransformer, csvTransformer); + } + virtual void getResultDictionary(size32_t & tcount, const byte * * & tgt, IEngineRowAllocator * _rowAllocator, const char * name, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer, IHThorHashLookupInfo * hasher) override + { + ctx->getResultDictionary(tcount, tgt, _rowAllocator, name, sequence, xmlTransformer, csvTransformer, hasher); + } + virtual void getRowXML(size32_t & lenResult, char * & result, IOutputMetaData & info, const void * row, unsigned flags) + { + ctx->getRowXML(lenResult, result, info, row, flags); + } + virtual void getRowJSON(size32_t & lenResult, char * & result, IOutputMetaData & info, const void * row, unsigned flags) + { + ctx->getRowJSON(lenResult, result, info, row, flags); + } + virtual const void * fromXml(IEngineRowAllocator * _rowAllocator, size32_t len, const char * utf8, IXmlToRowTransformer * xmlTransformer, bool stripWhitespace) + { + return ctx->fromXml(_rowAllocator, len, utf8, xmlTransformer, stripWhitespace); + } + virtual const void * fromJson(IEngineRowAllocator * _rowAllocator, size32_t len, const char * utf8, IXmlToRowTransformer * xmlTransformer, bool stripWhitespace) + { + return ctx->fromJson(_rowAllocator, len, utf8, xmlTransformer, stripWhitespace); + } + virtual IEngineContext *queryEngineContext() + { + return ctx->queryEngineContext(); + } + virtual char *getDaliServers() + { + return ctx->getDaliServers(); + } + virtual IWorkUnit *updateWorkUnit() const + { + return ctx->updateWorkUnit(); + } + virtual ISectionTimer * registerTimer(unsigned activityId, const char * name) + { + return ctx->registerTimer(activityId, name); + } + virtual unsigned getGraphLoopCounter() const override + { + return ctx->getGraphLoopCounter(); + } + virtual void addWuExceptionEx(const char * text, unsigned code, unsigned severity, unsigned audience, const char *source) override + { + ctx->addWuExceptionEx(text, code, severity, audience, source); + } + virtual unsigned getElapsedMs() const override + { + return ctx->getElapsedMs(); + } + }; + struct GlobalCodeContextExtra : implements IGlobalCodeContext + { + GlobalCodeContextExtra(IGlobalCodeContext * _gctx, unsigned _wfid) : gctx(_gctx) + { + codeContext = new CodeContext(gctx->queryCodeContext(), _wfid); + } + virtual ~GlobalCodeContextExtra() + { + delete codeContext; + } + virtual ICodeContext * queryCodeContext() + { + return codeContext; + } + virtual void fail(int, const char *) { gctx->fail(0, NULL); } + + virtual bool isResult(const char * name, unsigned sequence) { return gctx->isResult(name, sequence); } + virtual unsigned getWorkflowId() const override { return gctx->getWorkflowId(); } + virtual void doNotify(char const * name, char const * text) { gctx->doNotify(name, text); } + + virtual int queryLastFailCode() { return gctx->queryLastFailCode(); } + virtual void getLastFailMessage(size32_t & outLen, char * & outStr, const char * tag) { gctx->getLastFailMessage(outLen, outStr, tag); } + virtual bool fileExists(const char * filename) { return gctx->fileExists(filename); } + virtual void deleteFile(const char * logicalName) { gctx->deleteFile(logicalName); } + + virtual void selectCluster(const char * cluster) { gctx->selectCluster(cluster); } + virtual void restoreCluster() { gctx->restoreCluster(); } + + virtual void setWorkflowCondition(bool value) { gctx->setWorkflowCondition(value); } + virtual void returnPersistVersion(const char * logicalName, unsigned eclCRC, unsigned __int64 allCRC, bool isFile) { gctx->returnPersistVersion(logicalName, eclCRC, allCRC, isFile); } + virtual void setResultDataset(const char * name, unsigned sequence, size32_t len, const void *val, unsigned numRows, bool extend) { gctx->setResultDataset(name, sequence, len, val, numRows, extend); } + virtual void getEventName(size32_t & outLen, char * & outStr) { gctx->getEventName(outLen, outStr); } + virtual void getEventExtra(size32_t & outLen, char * & outStr, const char * tag) { gctx->getEventExtra(outLen, outStr, tag); } + virtual void doNotify(char const * name, char const * text, const char * target) { gctx->doNotify(name, text, target); } + private: + IGlobalCodeContext * gctx; + CodeContext * codeContext; + }; +private: + Owned eclProcess; +public: + IMPLEMENT_IINTERFACE; + EclProcessExtra(IEclProcess *_eclProcess) : eclProcess(_eclProcess) {} + virtual int perform(IGlobalCodeContext * _gctx, unsigned wfid) + { + GlobalCodeContextExtra gctx(_gctx, wfid); + return eclProcess->perform(&gctx, wfid); + } + virtual unsigned getActivityVersion() const { return eclProcess->getActivityVersion(); } +}; + //------------------------------------------------------------------------------------------------ inline bool isLocalFpos(unsigned __int64 rp) { return (rp & I64C(0x8000000000000000)) != 0; } diff --git a/thorlcr/graph/thgraph.hpp b/thorlcr/graph/thgraph.hpp index 011419e96bc..ab5a28fc326 100644 --- a/thorlcr/graph/thgraph.hpp +++ b/thorlcr/graph/thgraph.hpp @@ -347,6 +347,7 @@ class CActivityCodeContext : implements ICodeContextExt virtual const char *cloneVString(const char *str) const { return ctx->cloneVString(str); } virtual const char *cloneVString(size32_t len, const char *str) const { return ctx->cloneVString(len, str); } virtual char *getWuid() { return ctx->getWuid(); } + virtual unsigned getWorkflowId() const { return ctx->getWorkflowId(); } virtual void getExternalResultRaw(unsigned & tlen, void * & tgt, const char * wuid, const char * stepname, unsigned sequence, IXmlToRowTransformer * xmlTransformer, ICsvToRowTransformer * csvTransformer) { ctx->getExternalResultRaw(tlen, tgt, wuid, stepname, sequence, xmlTransformer, csvTransformer); } virtual void executeGraph(const char * graphName, bool realThor, size32_t parentExtractSize, const void * parentExtract) { ctx->executeGraph(graphName, realThor, parentExtractSize, parentExtract); } virtual char * getExpandLogicalName(const char * logicalName) { return ctx->getExpandLogicalName(logicalName); } diff --git a/thorlcr/thorcodectx/thcodectx.hpp b/thorlcr/thorcodectx/thcodectx.hpp index b368b2f1c5f..352dbbf7d1b 100644 --- a/thorlcr/thorcodectx/thcodectx.hpp +++ b/thorlcr/thorcodectx/thcodectx.hpp @@ -52,6 +52,7 @@ class thcodectx_decl CThorCodeContextBase : public CSimpleInterfaceOf