class EnsLib.SQL.Operation.GenericOperation
extends Ens.BusinessOperation
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";
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.