Initializing help system before first use

dmpinitwebservice

Purpose
Initialize a dmpresource to access a DMP webservice.
Synopsis
procedure dmpinitwebservice(res:dmpresource, functionid:text)
procedure dmpinitwebservice(res:dmpresource, id:text, functionid:text, env:text)
Arguments
res 
The dmpresource value to initialize.
id 
The ID of the solution service you want to access (or empty string)
functionid 
The ID of the function you want to access, ie the function name (or an empty string)
env 
The lifecycle stage of the service you want to access (or empty string), one of:
DMP_ENV_DESIGN 
Design or Root
DMP_ENV_STAGING 
Staging
DMP_ENV_PRODUCTION 
Production
Example
declarations
  res: dmpresource
end-declarations
dmpinitwebservice(res,"getBestPolicy")
if res.status<>DMP_OK then
  writeln('ERROR: ',res.lasterror)
end-if
Further information
1. This procedure will initialize a dmpresource to access a DMP function deployed as a SERVERLESS_REST type solution service. Typically this mean a DMP function deployed to AWS Lambda. It cannot be used with functions deployed as services in any other ways.
2. You can pass an empty string if you don't want to specify any of the arguments, but you must specify at least one of id and functionid.
3. The functionid value is usually the function name.
4. If you don't specify a lifecycle environment, the lifecycle of the component executing the model will be used.
5. When running in a solution with isolated lifecycles, you will only be able to access component instances from the same or lower lifecycle as the current component - e.g. a model run by a component in Staging can access resources in Staging and Design but not resources in Production.
6. You should check the status attribute of the dmpresource after calling this procedure.

© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.