Working with FICO Drive
FICO Drive is implemented as a layer above Amazon's S3 service.
uses "s3"Then declare a variable of type s3bucket to represent the cloud-based bucket you wish to access:
declarations mybucket: s3bucket end-declarationsWhen invoked by Xpress Insight, a Mosel model instance is automatically configured to access a bucket available to all DMP components in the current solution. Its credentials can be initialized by a call to s3init with the string "solutionData", or the constant S3_DMP_SOLUTIONDATA which evaluates to it.
model DmpInitExample uses "s3" declarations mybucket: s3bucket end-declarations ! Initialize mybucket using ‘solutionData’ set of credentials s3init(mybucket, S3_DMP_SOLUTIONDATA) if s3status(mybucket)<>S3_OK then writeln("Bucket initialization error: ", s3getlasterror(mybucket)) exit(1) end-if ! mybucket now initialized and can be used end-modelFrom this point, mybucket is available to your Mosel code via an API that allows you to manipulate cloud-based files (upload, download, delete) and their metadata and tags, and access status objects that report on the success or failure of your API calls.
For further details of the FICO Drive API, refer to s3ref.pdf , located at http://www.fico.com/fico-xpress-optimization/docs/latest/mosel/S3/dhtml .
Determining if FICO Drive is Available
A new property, isS3Enabled, has been added to the insight object available via the Xpress Insight JavaScript API.
View developers can interrogate the value of insight.isS3Enabled to determine if an app is connected to FICO Drive, and make any necessary adjustments to the user interface. For example, they might wish to hide the Upload to cloud button if they know that the cloud service is not available.
Further information is available at http://www.fico.com/fico-xpress-optimization/docs/latest/insight/javascript_api.
© 2001-2019 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.