Class Reference
EnsLib.SQL.Operation.GenericOperation
Server:appadmin-00044-deployment-6bf4cbc86d-9f4xc
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [EnsLib] >  [SQL] >  [Operation] >  [GenericOperation]
Private  Storage

class EnsLib.SQL.Operation.GenericOperation extends Ens.BusinessOperation

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
6 9 5


Summary

This is a Business Operation class.

The associated Adapter class is EnsLib.SQL.OutboundAdapter.

RequestResponse
Ens.Request Ens.Response

Properties
%AlertStartTime %ConfigName %ConfigQueueName %LastActionTime
%LastHandledTime %LastReportedError %QuitTask %RequestHeader
%SessionId %SuperSession %WarnedLatest %isShadow
Adapter AlertGroups AlertOnError AlertRetryGracePeriod
AllowTruncating ArchiveIO BusinessPartner DeferResponse
FailureTimeout IOLogEntry InactivityTimeout InputParameters
NoFailWhileDisconnected OnlyWarnOnce ParamSQLTypes Query
QueueCountAlert QueueWaitAlert ReplyCodeActions RequestClass
ResponseClass Retry RetryCount RetryInterval
SendSuperSession SuspendMessage ThrottleDelay

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %SuperSessionSet %ValidateObject AdapterName
AssignOneSetting CloseIOLogEntry CreateUpdateResponse DeferResponse
EnumerateSettingsClose EnumerateSettingsExecute EnumerateSettingsFetch GenerateSuperSession
GetDeferredResponseToken GetMessageList GetMsgHdrRequestKey GetProductionSettingValue
GetProductionSettings GetPropertyConnections GetSettings GetShadowInstance
IncludeSuperSession NewIOLogEntry OnError OnFailureTimeout
OnGenerateSuperSession OnGetConnections OnGetReplyAction OnInit
OnKeepalive OnMessage OnMonitor OnProductionStart
OnProductionStop OnTearDown ProcessProcedureResponse ProcessQueryResponse
QueueName SaveIOLogEntry SendAlert SendDeferredResponse
SendRequestAsync SendRequestSync

Subclasses
EnsLib.SQL.Operation.ProcOperation

Parameters

• parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";
The type of adapter used to communicate with external systems
• parameter DOMAIN = "Ensemble";
Use our own domain for localization
• parameter INVOCATION = "Queue";
2 modes: Queue, InProc
• parameter SETTINGS;
List of properties can be set as settings in the configuration file format is a comma separated list of property names
• parameter UIWIZARDREQUESTSETTING = "RequestClass";
• parameter UIWIZARDRESPONSESETTING = "ResponseClass";

Properties

• property Adapter as EnsLib.SQL.OutboundAdapter;
The adapter instance
• property AllowTruncating as %Boolean [ InitialExpression = 0 ];
If the returned data is longer than the MAXLEN of the property into which it is being set, issue a warning, but truncate it to the MAXLEN. If set to false, an error will be thrown when the returned data exceeds the MAXLEN of its associated property.
This is only relevant when ResponseClass is set because no truncating is required for json response messages..
• property InputParameters as %String(MAXLEN="");
A comma-separated list of input parameter value specifiers, if any. These correspond to any replaceable ? parameters in the query string.
* refers to message properties from the request message;
% refers to Adapter properties such as %LastKey;
$ refers to Service class properties;
• property OnlyWarnOnce as %Boolean [ InitialExpression = 1 ];
Limit warnings about multiple returned rows and truncated data.
Give a warning the first time that a call to this Operation returns multiple rows, but do not repeat the warning if any subsequent calls also return multiple rows. Likewise, give one warning per column if AllowTruncating is true and returned values must be truncated.
This is only relevant when ResponseClass is set because these warning are not issued for json response messages.
• property ParamSQLTypes as %String(MAXLEN="");
A comma-separated list of the SQL data types of each parameter used in the query (eg. SQL_CHAR,SQL_INTEGER). This may be required for the query to execute successfully if the datatypes are not SQL_VARCHAR (the default used when unspecified)
• property Query as %String(MAXLEN="") [ Required ];
The Base query string that will be executed when a new message is received
• property RequestClass as %String(MAXLEN=1000);
This is optional and is used by the BPL Editor UI call wizard and the input parameter popup helper dialog.
• property ResponseClass as %String(MAXLEN=1000);
Message class to use in generating the response object. If this is set and the query returns a result set, a response object of this class will be created and the values from the top row of query results will be set into the corresponding properties of the response object. If no ResponseClass is specified, then the response object will take the form of an Ens.StreamContainer message with the Stream property containing a json string which lists each row as a separate object. (eg. {"1":{"ID":"1","Name":"John Smith"},"2":{"ID":"2","Name":"Jane Doe"}})
Note, if a query returns multiple rows of results and a ResponseClass is specified, a message will be logged in the Event Log stating that there were multiple rows, but only one response message is generated. If no value is specified, all results will be included in the json response message.

Methods

• method CreateUpdateResponse(pNumRowsAffected As %Integer, Output pOutput As %RegisteredObject) as %Status
• method OnMessage(pRequest As Ens.Request, Output pResponse As Ens.Response) as %Status
This is the default message handler. All request types not declared in the message map are delivered here
• method ProcessProcedureResponse(pResults As %ListOfObjects = $$$NULLOREF, pOutputParms As %ListOfDataTypes = $$$NULLOREF, pOutputParmsNames As %String = "", Output pOutput As %RegisteredObject) as %Status
• method ProcessQueryResponse(pResult As EnsLib.SQL.GatewayResultSet, Output pOutput As %RegisteredObject) as %Status


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.