CyberStore Documentation
Improved SYSPRO Data Layer
In This Topic

New SYSPRO Data Layer using MakeEnetCall method (#9507)

CyberStore's SYSPRO communication layer has been enhanced with version 2.15. Changes can be summarized as follows:

In previous versions of CyberStore each individual business object would require unique methods for executing SYSPRO calls, with this update those calls have been consolidated into a single code path greatly improving performance and stability between versions. The centralized method is called MakeEnetCall.

Prior to this release, only direct calls to SYSPRO were logged when verbose logging was enabled. With this update, logging options include the ability to also log cached results allowing for advanced troubleshooting. For more information, see the Site Manager > Site Configuration for the Logging settings. 

The updates to the SYSPRO data layer also added a built-in ability to capture the duration it takes to receive a response from the SYSPRO server for each call logged. No matter the SYSPRO object called, the parent node of the returned XML will contain a new Duration property that will include the length of time it took for SYSPRO to return the results to CyberStore. This duration is recorded in milliseconds (1/1000th of a second). 

The example below shows the Duration property on a sample SORRSL call which will be found in the <SoLine> parent node.

Example XML .OUT Log File
Copy Code
<?xml version="1.0" encoding="Windows-1252"?>
<SoLine Language="05" Language2="EN" CssStyle="" DecFormat="1" DateFormat="01" Role="01" Version="6.1.014" OperatorPrimaryRole="   " Duration="21ms">
  <Customer>0000010</Customer>
  <Name>B2C Default Customer</Name>
  <StockCode>A100</StockCode>
  <Description>15 Speed Mountain Bike Boys</Description>
     .
     .
     .
 <ReturnableItem>N</ReturnableItem> 
</SoLine>

In order to provide better management of unique logins with e.net, individual user identifiers (called GUIDs) are centrally tracked by the updated e.net calling method. 

The centralized e.net calling method is now able to logout when active GUID errors are returned from SYSPRO. Any subsequent e.net calls will then log in again and obtain a new GUID (the same function as clicking Refresh Operator in the SYSPRO Configuration screen). In addition, the method will retry the previously failed call one additional time in an attempt to recover from a temporary disconnect with SYSPRO. (If the retry fails, the second failure will not be logged in the event log, though verbose logs will be saved if enabled).

Note: 

The SYSPRO e.net call retry will occur only once for any given call and cannot be expected to handle actual outages or other issues that may cause SYSPRO to become unavailable for a period of time. 

Logoff and Retry SYSPRO calls that return invalid XML (#9647)

Within the SYSPRO Data Layer the MakeEnetCall method performs all communications with SYSPRO. In certain conditions it is possible that the response XML received from SYSPRO could either be malformed or blank. When this occurs, it is assumed that there is an issue with the current Web Operator's active login, or GUID. Previously, this could in most cases be resolved by using the "Refresh Operator" button in the SYSPRO Configuration screen in the CyberStore Console. 

In order to better handle this situation in stride, the current active Web Operator login will be logged out, thus establishing a new GUID on the next call attempt. Furthermore, if the originating call is a Query, Browse or Fetch (i.e. a data request) then that call will be retried one time following the Logout in an attempt to retrieve the desired data back from SYSPRO. If the event were a Post, Aadd, Delete or Build, it will not be retried since there is no way to know if the originating call was successful and thus normal error processing will occur. 

Event Logging

A corresponding error message will appear in the Event Log with the following Event information:

The message will contain the name of the object being called at the time of the issue, and what was received as a response. 

The Event Log error message will appear similar to the following: 

MakeENetCall encountered an error when attempting to parse the response from the COMPRF business object: 
---START---
---END---

Ability to configure SYSPRO call latency factor to aid in simulating real world environments (#9686)

In order to help simulate deploy configurations where additional latency may be introduced into SYSPRO communications, a new development feature has been built into the SYSPRO Data Layer. 

This feature allows for the injection of a specified delay in communications with SYSPRO. Only available in DEBUG versions of the code, both a delay and minimum duration can be set via Application Keys in the Ecommerce\web.config file. 

The Application Key variables are:

These keys expect numeric values representing a number of milliseconds, and the default values for both SYPSROCallDelay and SYSPROCallMinimumDuration are "0".

Note:

As a DEBUG operation only, this feature is only available for advanced troubleshooting and will not affect release versions of CyberStore, even if the Application Key values are greater than 0.

The following example shows the keys as found in the Ecommerce\web.config file:

web.config
Copy Code
<configuration>
  <appSettings>
    <add key="SYSPROCallDelay" value="250" />
    <add key="SYSPROCallMinimumDuration" value="500" />
    <!-- .... other keys as configured .... -->
  </appSettings>
</configuration>
See Also

Release Notes