Module RemoteEntryMixin.pkg

****************************************************************************// // $File name : RemoteEntry_MX.pkg // $File title : RemoteEntryMixin class // Notice : // $Author(s) : John Tuohy // // Confidential Trade Secret. // Copyright 1998-1999 Data Access Corporation, Miami FL, USA // All Rights reserved // DataFlex is a registered trademark of Data Access Corporation. // $Rev History // // $Rev History // JJT 8/1/99 Added RequestDDUpdate function // JJT 7/30/99 Added peFieldMultiUser for field level change checking // JJT 7/26/99 Added pbAllowxxx to disable save, delete, clear,find // // JJT 9/15/98 Added pbReportErrors, if false errors are not displayed // allowing developer to control how errors are reported. // Added ErrorQueueStart/End. // HasErrors changed to ErrorCount // JJT 8/27/98 Changed messages to functions (doRequestSave, etc) // which return non-zero error status values // JJT 8/6/98 Added support to pbShowEntryError. Only saves will ask // the DD to return errors (all others just ignore the data) // JW 1998-06-27 Source Merge for Internet by Janne Wassberg // // ****************************************************************************// Pkg: RemoteEntry_mx.pkg Class: RemoteEntryMixin This provides mixin support to add save, delete, clear, find logic to a BPO. This could have been sub-classed. Creating a mixin gives us a bit more flexibility. These methods assume that there is no permanance in these BPO processes. When a process is started (e.g. a save) all DD data is cleared and it is expected that all information will be provided by the remote object. The remote object will refind any existing records (the remote object must know what those records are) and will update any changed data. Once this is completed, the BPO will take over and process the data as needed. Usage: Use RemoteEntry_mx.pkg Class RemoteEntryProcess is an DistributedBusinessProcess Procedure Construct_Object Forward Send Construct_Object Send Define_RemoteEntryMixin End_procedure Import_Class_Protocol RemoteEntryMixin End_Class Remote BPO requests The following Public Request Functions are supported below In all cases they return an integer error status. If 0, operation was successful, if not zero the Stat_code for the last operation is returned DoRequestSave sFileName DoRequestClear sFileName bClearAll DoRequestDelete sFileName DoRequestFind sFileName sFieldName iFindMode DoRequestDDUpdate sFileName bShowErrors Properties pbAllowSaveNew Boolean - If false, DoRequestSave for new records is disabled pbAllowSaveEdit Boolean - If false, DoRequestSave for old (edited) records is disabled pbAllowClear Boolean - If false, DoRequestClear is disabled pbAllowDelete Boolean - If false, DoRequestDelete is disabled pbAllowFind Boolean - If false, DoRequestFindSave is disabled pbAllowDDupdate Boolean - if false, DoRequestDDUpdate is disabled peFieldMultiUser mode - 0-don't check, 1-check required, 2-check desired pbClearAfterSave Boolean - determines is a clear should occur after save pbReportErrors Boolean - should errors be reported after process? phREO_MainDD - these are set during request and can be queried piREO_OperationStatus to determine what happened. The Following messages are suitable for augmentation OnReportSaveStatus by default, the report status messages OnReportDeleteStatus report errors by sending ReportAllErrors OnReportClearStatus OnReportFindStatus OnReportValidateStatus Get SaveConfirmation The confirmation messages do nothing and are Get DeleteConfirmation supplied for future augmentation. Get ClearConfirmation All of these messages send an error status reporting procedure passing the error status. Those messages are ReportxxxxStatus where xxxx is "save", "clear", "delete" and "find". By default they report all errors. These are intended to be augmentation points where you can add custom code concerning the result of operation These messages require the additional following Support from the class they are mixed into: Get MapFileNametoDD - return DD object ID of passed filename Get MaptoFileNumber - return file number from fieldname Get MaptoFieldNumber - return field number from file number and field name Get RequestUpdateData - Update all records & data to DD. Refind recs/update values Get RequestUpdateRecords - loads all records to DD and finds as needed Get RequestUpdateFileFieldValues - Load all data into DDs Send ReportAllErrors - Report all errors in the handler queue Get ErrorCount - return true, if errors exist in queue Send ErrorQueueStart - start queueing of errors Send ErrorQueueEnd - end queueing of errors

References (1):

ModuleLine
cRemoteEntryProcess.pkg19

Field References (0):

ModuleContaining SymbolLine