Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SCL-2481 Generated (scl-gen) named query caused deserialization error when fetching data

Description:

The strong typed named query classes generated by scl-gen NamedQuery were missing a default constructor (constructor with no parameters). As a result the deserialization of those objects failed when passing a named query from the GUI client to the backend.

The templates used by scl-gen NamedQuery now include the default constructor. Developers will have to regenerate hte named query classes to include the constructor or add a default constructor manually, e.g.:

Code Block
languagec#
    /*------------------------------------------------------------------------------
        Purpose: Constructor for the SearchEmployeeQuery class
        Notes:
    ------------------------------------------------------------------------------*/
    CONSTRUCTOR PUBLIC SearchEmployeeQuery ():
        /* noop */
    END CONSTRUCTOR .

...

SCL-2484 Fixed line break issues in Business Entity Designer log view

Description:

The Log View of the Business Entity Designer recently stopped inserting correct line breaks for all log messages of the generator process.

This has been fixed now.

Improvement

SCL-2415 Use of native Enums instead of Legacy Enums

Description:

We have been requested to verify that all our Enums are using native Enum feature of the ABL.

There are only three Enums in our code based that still inherit from Consultingwerk.Enum (legacy Enums)

Consultingwerk.Framework.Enum.DialogResultEnum
Consultingwerk.OERA.Enum.RowStateEnum
Consultingwerk.WeekDayEnum

These Enums cannot be migrated to Progress.Lang.Enum's due to additional custom methods. Removing those methods would break client applications. None of those enums are used that heavily that I believe they have a significant enough impact on application performance.

All other enums are using the native Enum feature of the ABL!

We have written a unit test to ensure that future additional Enum implementations will not use the legacy Enum as a basis.

SCL-2474 Implemented ability to Mock BufferDataSource via Temp-Tables and XML files

Description:

We have made the BufferDataSource class ( https://documentation.consultingwerkcloud.com/display/SCL/New+API+for+dynamic+DATA-SOURCE+objects ) mockable using our Generic Factory service ( https://documentation.consultingwerkcloud.com/display/SCL/Generic+Factory+Service ).

This allows a developer to test the data access of a regular DataAccess class (for complex query manipulation or BEFORE-ROW-FILL based row-level security implementation) using XML files. This is related to the MockDataAccess feature - however the MockDataAccess class replaces the whole DataAccess class with a generic XML file based implementation allowing the developer to test the Business Entity component without Data Access.

To mock the Data Access it is required to use the BufferDataSource instead of the ABL DATA-SOURCE object handles currently generated by the Business Entity Designer (enhancement SCL-2476 has been logged to implement an alternative Data Access class generation based on BufferDataSource classes). The definition of the BufferDataSource instance may be made as a global variable in the class header. When multiple temp-tables are included in the Data Access class, it may be required to defined multiple variables.

Code Block
languagec#
    DEFINE VARIABLE oDataSource AS IBufferDataSource NO-UNDO .



The method AttachDataSource is used here to retriev an IBufferDataSource instance through the factory. This may be an instance of the original Consultingwerk.OERA.BufferDataSource class or the Consultingwerk.SmartUnit.OERA.MockBufferDataSource.MockBufferDataSource class which supports mocking of database buffers with temp-table buffers for unit tests.

Code Block
languagec#
    METHOD OVERRIDE PROTECTED VOID AttachDataSources ():

        DEFINE VARIABLE oFactory AS IFactory.

        oDataSource = CAST ({Consultingwerk/get-service.i IFactory}:CreateInstance(GET-CLASS (IBufferDataSource),
                                                                                   ArrayHelper:Array (NEW CharacterHolder ("Order"))),
                            IBufferDataSource) .

        Consultingwerk.Util.DatasetHelper:SetTrackingChanges (DATASET dsOrder:HANDLE, FALSE) .

        THIS-OBJECT:AttachDataSource (BUFFER eOrder:HANDLE, oDataSource) .

    END METHOD.



The generic factory must be configured like this through an XML file to support the unit testing:

Code Block
languagexml
<?xml version="1.0"?>
<ttFactoryLoader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ttFactoryLoaderRow>
    <FactoryType>Consultingwerk.OERA.IBufferDataSource</FactoryType>
    <FactoryAlias></FactoryAlias>
    <InstanceType>Consultingwerk.SmartUnit.OERA.MockBufferDataSource.MockBufferDataSource</InstanceType>
  </ttFactoryLoaderRow>
</ttFactoryLoader>



In a production environment (no unit testing), the following entries should be uised in the factory.xml file:

Code Block
languagexml
<?xml version="1.0"?>
<ttFactoryLoader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ttFactoryLoaderRow>
    <FactoryType>Consultingwerk.OERA.IBufferDataSource</FactoryType>
    <FactoryAlias></FactoryAlias>
    <InstanceType>Consultingwerk.OERA.BufferDataSource</InstanceType>
  </ttFactoryLoaderRow>
</ttFactoryLoader>



The factory.xml files can be loaded via the JSON configuration file ( https://documentation.consultingwerkcloud.com/display/SCL/JSON+Configuration+File+Format ).

The MockBufferDataSource instance requires an instance of the Consultingwerk.SmartUnit.OERA.MockBufferDataSource.IMockBufferDataSourceProvider to return the Data-Source buffers from eiter temp-tables or database tables (one or multiple per IBufferDataSource). Through temp-table buffer handles, it's possible to mock the DataAccess using XML files:

Code Block
languagec#
CLASS Test.DataSourceDelegate.OrderMockBufferDataSource
    IMPLEMENTS IMockBufferDataSourceProvider:

    DEFINE TEMP-TABLE ttOrder NO-UNDO LIKE Order .

    DEFINE BUFFER Order FOR ttOrder .

    /**
     * Purpose: Constructor for the BufferDataSource class
     * Notes:
     */
    CONSTRUCTOR PUBLIC OrderMockBufferDataSource ():

        TEMP-TABLE ttOrder:READ-XML ("file", "Test/DataSourceDelegate/ttOrder.xml", "EMPTY", ?, ?) .

    END CONSTRUCTOR .

    METHOD PUBLIC HANDLE InitializeBuffer (poBufferSpec AS IBufferSpec):

        IF poBufferSpec:TableName = "Order" THEN
            RETURN BUFFER Order:HANDLE .
        ELSE
            RETURN ? .

    END METHOD.

END CLASS.



The service implementation from above returns for the Order table an buffer on the equally named temp-table and for all other database tables a database buffer (RETURN ?).

An important consequence of this implementation is, that in hte Data Access class, you are no longer able to access the database buffer statically. A BEFORE-ROW-FILL call back may be implemented like this:

Code Block
languagec#
    METHOD PUBLIC VOID eOrderBeforeRowFillHandler (DATASET-HANDLE phDataset):

        DEFINE VARIABLE hOrder AS HANDLE NO-UNDO.

        ASSIGN hOrder = BUFFER eOrder:DATA-SOURCE:GET-SOURCE-BUFFER (1) .

        IF hOrder::Creditcard = "American Express" THEN
            RETURN NO-APPLY .

    END METHOD.

...

SCL-2475 Fixed typo in Exception raised when Factory is already registered

Description:

We have fixed the title of the exception thrown when a caller tried to registry a Factory that has already been registered previously.

SCL-2477 Scenario based unit tests should support loading custom services.xml

Description:

We've implemented the ability to load custom service.xml files through a .scenario file ( https://documentation.consultingwerkcloud.com/display/SCL/Scenario+based+Unit+Tests+for+Business+Entity+FetchData+%28read%29+operations ). Using the LoadServices property (JSON Array) developers can specify multiple service.xml files defining services (or mock services) used while performing the scenario based unit test.

Those services will be loaded into a separate service container only valid for the execution of the scenario based unit test.

Code Block
languagec#
{
  "SerializedType": "Consultingwerk.SmartUnit.OERA.RetrieveDataScenario.Scenario",
  "EntityName": "Consultingwerk.OeraTests.SCL2477.BinBusinessEntity",
  "EntityTables": "eBin",
  "QueryStrings": [
    "FOR EACH eBin WHERE eBin.Itemnum = 42 "
  ],
  "BatchSize": 100,
  "StopAfter": 5,
  "LoadServices": [
    "Consultingwerk/OeraTests/SCL2477/services1.xml", 
    "Consultingwerk/OeraTests/SCL2477/services2.xml"
  ]
}

...

SCL-2478 Implemented ability to deactivate the export of ModifiedTimeStamp attribute when exporting Repository Objects

Description:

Added a new Parameter ExportModifiedState to the PCTRun procedure Consultingwerk/SmartFramework/Repository/Tools/export-repository-data.p. When that Procedure is set to FALSE, the modified state nodes will not be written to the .smartrepo files.

SCL-2482 RestEntitiesWebHandler was not mapping query string field names

Description:

We have resolved a limitation in the RestEntitiesWebHandler (RESTful access to Business Entities). This limitation was preventing the mapping of temp-table field names to database table field names in the query string.

New Feature

SCL-1975 Business Entity now provides a new internal method to populate the related records of a given temp-table record

Description:

The new protected method FetchRelatedRecords of the Business Entity expects a list of temp-tables and a temp-table buffer as parameters. This method allows to populate the ProDataset in the Business Entity with parent, sibling and child records of the given record.

This is useful when updating a single temp-table record for instance and access to the parent or child records is required.

The method does not update modified, created or deleted records. Unmodified records in the ProDataset will be refreshed by this method.

SCL-2452 Business Entity Tester now allows testing of Named Queries

Description:

The Business Entity Tester now supports the testing of Named Queries. Named queries will be entered in the Business Entity Tester filter dialog as JSON objects:

Code Block
languagec#
{ "NamedQuery": "QuickSearch", "parameter": [{"q": "Cologne}] }


or

Code Block
languagec#
{ "NamedQuery": "QuickSearch", "parameter": {"q": "Cologne"} }


or

Code Block
languagec#
{ "NamedQuery": "OrdersInMonth", "parameter": [{"year:integer": 2009}, {"month:integer": 12] }



We do not support the combination of query strings and named queries - as that is rather uncommon and not required in the CCEBS spec.

SCL-2483 Implemented ability ot override ConfigurationProvider with -param parameters

Description:

The ConfigurationProvider now supports overriding the contents of the .applicationsettings or .restapplicationsettings JSON file/document using the -param startup parameter of the OpenEdge session.

No Format
The -param parameter is expected to contain value in the form of -param @setting1=value1,@setting2=value2 
 The -param parameter may contain other settings as well. Settings not starting with the @ sign will be ignored by the ConfigurationProvider class. So a startup settings of -param @authenticationDb=sports2000 will override the setting from the JSON file

...

SCL-2487 Implemented Dataset-Content Assist in Calculated Field expression editor

Description:

The Calculated Fields expression Editor in the Business Entity Designer does now support developers with a content assist for table and field names of the Business Entity ProDataset.

Story

SCL-1926 Upgraded Swagger RESTful and JSDO services to Swagger Version 3

Description:

We have upgraded our Swagger implementation for the RESTful and the JSO based interface to version 3 of the Open API specification.



defaultHandler=OpenEdge.Web.CompatibilityHandler    handler1=Consultingwerk.OERA.JsdoGenericService.WebHandler.CatalogWebHandler: /Catalog/{EntityName}    handler2=Consultingwerk.OERA.JsdoGenericService.WebHandler.CatalogsWebHandler: /Catalogs/{PackageName}    handler3=Consultingwerk.OERA.JsdoGenericService.WebHandler.CountWebHandler: /Resource/{EntityName}/count    handler4=Consultingwerk.OERA.JsdoGenericService.WebHandler.ResourceSubmitWebHandler: /Resource/{EntityName}/SubmitData    handler5=Consultingwerk.OERA.JsdoGenericService.WebHandler.InvokeMethodWebHandler: /Resource/{EntityName}/{MethodName}    handler6=Consultingwerk.OERA.JsdoGenericService.WebHandler.ResourceWebHandler: /Resource/{EntityName}    handler7=Consultingwerk.OERA.JsdoGenericService.WebHandler.BusinessServicesWebHandler: /BusinessServices/{OutputFormat}/{PackageName}    handler8=Consultingwerk.Web2.WebHandler.SmartMenuWebHandler: /SmartMenu/{MenuStructureId}    handler9=Consultingwerk.Web2.WebHandler.SmartMenuStructureWebHandler: /SmartMenuStructure    handler10=Consultingwerk.Web2.WebHandler.SmartRoutesWebHandler: /SmartRoutes    handler11=Consultingwerk.Web2.Services.SmartViewsHandler.SmartGridWebHandler: /SmartViews/Grid/{EntityName}/{ViewName}/{DetailTemplate}    handler12=Consultingwerk.Web2.Services.SmartViewsHandler.SmartGridWebHandler: /SmartViews/Grid/{EntityName}/{ViewName}    handler13=Consultingwerk.Web2.Services.SmartViewsHandler.SmartGridWebHandler: /SmartViews/Grid/{CustomViewName}    handler14=Consultingwerk.Web2.Services.SmartViewsHandler.SmartViewerWebHandler: /SmartViewer/Viewer/{EntityName}/{ViewName}    handler15=Consultingwerk.Web2.Services.SmartViewsHandler.SmartViewerWebHandler: /SmartViewer/Viewer/{ObjectName}    handler16=Consultingwerk.Web2.Services.SmartViewsHandler.SmartFormWebHandler: /SmartForm/{FormTemplate}/{EntityName}/{ViewName}    handler17=Consultingwerk.Web2.Services.SmartViewsHandler.SmartFormWebHandler: /SmartForm/{FormTemplate}/{ObjectName}    handler18=Consultingwerk.Web2.WebHandler.SmartMessageWebHandler: /SmartMessage/{MessageGroup}/{MessageNumber}    handler19=Consultingwerk.Web2.WebHandler.GetImageWebHandler: /Image/{FileName}    handler20=Consultingwerk.Web2.WebHandler.SmartValueListWebHandler: /ValueList/{ValueList}    handler21=Consultingwerk.Web2.WebHandler.SmartAttachmentsWebHandler: /Attachments/{Table}/{KeyValues}    handler22=Consultingwerk.Web2.WebHandler.SmartAttachmentWebHandler: /Attachment/{Guid}    handler23=Consultingwerk.Web2.WebHandler.SessionContextWebHandler: /SessionContext    handler24=Consultingwerk.Web2.WebHandler.ContextPropertiesWebHandler: /ContextProperties/{PropertyName}    handler25=Consultingwerk.Web2.WebHandler.ContextPropertiesWebHandler: /ContextProperties    handler26=Consultingwerk.Web2.WebHandler.SessionInfoWebHandler: /SessionInfo    handler27=Consultingwerk.Web2.WebHandler.FileSearchWebHandler: /FileSearch/{FileName}    handler28=Consultingwerk.Web2.WebHandler.ExecuteAblWebHandler: /ExecuteAbl    handler29=Consultingwerk.Web2.WebHandler.SmartLanguagesWebHandler: /Languages    handler30=Consultingwerk.OERA.RestResource.RestEntitiesWebHandler: /Entities    handler31=Consultingwerk.OERA.Swagger.SwaggerWebHandler: /Swagger/{EntityName}    handler32=Consultingwerk.OERA.Swagger.SwaggerRestEntitiesWebHandler: /SwaggerEntities/{OutputType}    handler33=Consultingwerk.Web2.WebHandler.SmartTokenSecurityCheckWebHandler: /TokenSecurityCheck/{ObjectName}    handler34=Consultingwerk.Web2.WebHandler.SmartTokenSecurityCheckWebHandler: /TokenSecurityCheck    handler35=Consultingwerk.Web2.WebHandler.SmartEntityTableMappingHandler: /EntityTableMapping/{EntityName}/{TableName}/{UiTypeCodes}    handler36=Consultingwerk.Web2.WebHandler.SmartTreeRootNodeWebHandler: /SmartViews/TreeRootNode/{rootnodeid}    handler37=Consultingwerk.Web2.WebHandler.SmartTreeChildNodesWebHandler: /SmartViews/TreeChildNodes/{parentnodeid}    handler38=Consultingwerk.Web2.WebHandler.SmartSecurityCheckWebHandler: /IsRestricted/{SecurityRealmCode}/{SecurityItemGuid}    handler39=Consultingwerk.Web2.WebHandler.SmartFieldSecurityCheckWebHandler: /RestrictedFields/{TableName}    handler40=Consultingwerk.Web2.WebHandler.GetImageNamesHandler: /ImageNames

...