Class SY_SagePEP

Inherits

SY_Password

Properties

LOCAL cPEPdllID$  
LOCAL cPEPThreadID$  
LOCAL cPEPdefaultURL$="https://na.pep.services.sage.com/PEPWebService.asmx"  
LOCAL cPathSYSTEM$="SYSTEM"  
LOCAL cFileINPUT=128  
PROPERTY LastErrorNum$  
PROPERTY LastErrorMsg$  
PROPERTY PEPApplicationID$   * Read Only *

Application ID's predefined by Sage PEP NA

PROPERTY IsPEPEnabled   * Read Only *
Boolean flag to determine if PEP is enabled (opt-in)
PROPERTY ChildPanelsLaunchTimes$  
Child panel(s) launch times
PROPERTY ChildPanelsCloseTimes$  
Child panel(s) close times

Methods

Currently supporting these two as a simple string collectWksID = Y/N. i.e. "collectWksID=Y" to enable collecting MachineID collectEnv = Y/N. i.e. "collectEnv=N" to disable collecting environment data collectAppData = Y/N. i.e. "collectAppData=N" to disable collecting application data

FUNCTION CloseFiles()  

Function to close the files used by this application. This method should only be called by SY_Installation which may require exclusive access to these files to perform a physical update.

Returns [Nothing]
FUNCTION FormatPepKeyValuePairs$(keyValuePairs$)  

Format the key value pair string for PEP upload.

ParameterDescription
keyValuePairs$ [input, string] Key value pairs in the format "key1=value1" + SEP + "key2=value2".
Returns [string] The key value pair string in the format " key1="value1" key2="value2".
FUNCTION GetTimeStamp$()  

GetTimeStamp$ returns the system time in YYYY-MM-DD hh:mm:ss format

FUNCTION LogChildTaskLaunched()  

Function to Log child panel launch and close times(OTF screens, HyperLink screens & other sub-screens)

Returns [Boolean] true - success
FUNCTION LogError(errNum$, errDesc$, errProg$, errProgLine$, buildNumber)  

LogError logs the help usage including what screen help was launched from, from what field the user pressed F1, etc.

ParameterDescription
errNum$ [input, string] The error number
errDesc$ [input, string] The error description
errProg$ [input, string] The error program
errProgLine$ [input, string] The error program line
buildNumber [input, numeric] The build number
FUNCTION LogGenericTracking(type$, id$)  
FUNCTION LogGenericTracking(type$, id$, desc$)  

LogGenericTracking logs any id/type contained in SY_SagePEPTrack

ParameterDescription
type$ [input, string] The type of the event, object, message, etc.
id$ [input, string] The id of the event, object, message, etc.
desc${optional} [input, string] Any additional description
FUNCTION LogHelp(helpFile$, screenName$, helpTopicID$)  
FUNCTION LogHelp(helpFile$, screenName$, helpTopicID$, panelName$)  
FUNCTION LogHelp(helpFile$, screenName$, helpTopicID$, panelName$, controlID$)  

LogHelp logs the help usage including what screen help was launched from, from what field the user pressed F1, etc.

ParameterDescription
helpFile$ [input, string] The .chm file name. i.e. IM.chm
screenName$ [input, string] The screen from where help is being launched. i.e. SalesOrder.M4L
helpTopicID$ [input, string] The help topic ID inside the chm file. i.e. #455
panelName${optional} [input, string] The panel inside the screen. i.e. dLINES
controlID${optional} [input, string] The name of the control from where user pressed F1. i.e. SALESORDERNO
FUNCTION LogKeyValuePair(keyName$, keyValue$)  

LogKeyValuePair logs a Key/Value pair to SY_SagePEP table

ParameterDescription
keyName [input, string] The key name
keyValue [input, string] The key value
FUNCTION LogSession(startTime$, endTime$)  

LogSession logs the start/end time from when the user opened the MAS launcher to when they exited

ParameterDescription
startTime$ [input, string] The starting timestamp
endTime$ [input, string] The ending timestamp
FUNCTION LogTaskLaunched(taskID, startTime$, endTime$)  
FUNCTION LogTaskLaunched(taskID, startTime$, endTime$, progName$)  

LogTaskLaunched logs launched tasks and start/end time

ParameterDescription
taskID [input, numeric] The task ID
startTime$ [input, string] The starting timestamp
endTime$ [input, string] The ending timestamp
progName$ [optional][input, string] The UI programname
FUNCTION OpenFiles()  

Function to open the files used by this application

Returns [Boolean]
ValueDescription
0 - if an error was encountered
non-zero - if the files were opened normally
FUNCTION PEPOnDemand()  
FUNCTION Upload()  
FUNCTION Upload(arguments$)  
FUNCTION Upload(installType)  

Upload performs the actual upload to PEP server

ParameterDescription
arguments${optional} [input, string] Arguments for the upload method
ParameterDescription
installType{optional} [input, numeric] To update key/value pair as "reinstall" if it is 1,as "upgrade" if it is 2 and "new" if it is 3
FUNCTION UploadNotification(notificationCode$, notificationData$)  

Upload pre-defined notification data to PEP server. Notifcation name/value pairs must be agreed upon with the PEP dba (Mitch Spuril) in order to be recognized on the PEP server.

ParameterDescription
notificationCode$ [input, string] Unique notification code that defines the service or purpose for the notification.
notificationData$ [input, string] Collection of SEP separated name/value pairs that make up the notification record.
Returns [Boolean]
ValueDescription
0 - If an error was encountered.
non-zero - If the upload completed normally.

Properties inherited from: SY_Password

AESCipher$, AES256Cipher$

Methods inherited from: SY_Password

ConfirmAESKey(), ConfirmPassword(), EncryptAESData(), EncryptAESKey(), EncryptAESPassword(), EncryptPassword(), GetAESDataTest$(), PasswordAcceptable(), ValidateAESData(), ValidateAESPassword(), ValidatePassword(), VerifyAESDataEncryption(), DecryptAESData(), DecryptAESKey(), DecryptAESPassword(), DecryptAltAESData(), DecryptPassword(), EncryptAltAESData(), GetKEK$(), InitAESKey(), InitializeAES(), InitializeAltAES(), ValidateAltAESData(), VerifyAltAESDataEncryption()