As of release SWAT 19.15.1, we have added official support for custom session properties.
To do this, a custom Consultingwerk.OERA.Context.IContextDatasetFactory service will need to be implemented as below:
Sample: TestContextDatasetFactory USING Progress.Lang.*. USING Consultingwerk.OERA.Context.IContextDatasetFactory FROM PROPATH. BLOCK-LEVEL ON ERROR UNDO, THROW. CLASS Test.TestContextDatasetFactory IMPLEMENTS IContextDatasetFactory: { Test/dsTestContext.i } /*------------------------------------------------------------------------------ Purpose: Factory method for the context dataset Notes: Returns the handle for the Context Dataset Initializes the Client Progress Version Number @return The handle of the context dataset instance ------------------------------------------------------------------------------*/ METHOD PUBLIC HANDLE CreateContextDataset (): IF NOT SESSION:REMOTE THEN DO: CREATE eSessionContext . ASSIGN eSessionContext.ClientProVersion = PROVERSION eSessionContext.ClientType = SESSION:CLIENT-TYPE . CREATE eSwatSessionContext . CREATE eTestSessionContext . END. RETURN DATASET dsTestContext:HANDLE . END METHOD. END CLASS. | dsTestContext &SCOPED-DEFINE ACCESS {&ACCESS} &SCOPED-DEFINE REFERENCE-ONLY {&REFERENCE-ONLY} &SCOPED-DEFINE SUFFIX {&SUFFIX} &GLOBAL-DEFINE DATASET-NAME dsTestContext { Consultingwerk/OERA/Context/eContextProperties.i &NO-BEFORE=YES } { Consultingwerk/OERA/Context/eSessionContext.i &NO-BEFORE=YES } { Akioma/Swat/OERA/Context/eSwatSessionContext.i &NO-BEFORE=YES } { Test/eTestSessionContext.i &NO-BEFORE=YES } DEFINE {&ACCESS} DATASET dsTestContext{&SUFFIX} {&REFERENCE-ONLY} FOR eContextProperties{&SUFFIX}, eSessionContext{&SUFFIX}, eSwatSessionContext{&SUFFIX}, eTestSessionContext{&SUFFIX} . eTestSessionContext DEFINE {&ACCESS} TEMP-TABLE eTestSessionContext{&SUFFIX} NO-UNDO {&REFERENCE-ONLY} &IF DEFINED (NO-BEFORE) EQ 0 &THEN BEFORE-TABLE eTestSessionContextBefore{&SUFFIX} &ENDIF FIELD TestProperty1 AS CHARACTER FIELD TestProperty2 AS CHARACTER . |