SUMMARY:
The issue described in this document has been classified as a documentation defect by Strategy. This issue occurs in Command Manager procedures in Strategy 10.x. A workaround is provided in the current document.
SYMPTOM:
Users may create a Command Manager procedure which uses one of the following two scripts to get information about Intelligent Cube caches:
LIST [ALL] INTELLIGENT CUBE CACHES [FOR PROJECT "project_name"];
LIST [ALL] PROPERTIES FOR INTELLIGENT CUBE CACHE (NAME "cube_name" [FOLDER "folder_name"] | GUID cache_guid) FOR PROJECT "project_name";
When users run these scripts in the Command Manager GUI, they correctly return information about the cube cache statuses. However, when used in a Command Manager procedure, users may notice that these scripts return null for the cube cache statuses. Specifically, the following method will return null information about the cube cache statuses:
getFieldValueString(DisplayPropertyEnum.CACHE_STATUS);
CAUSE:The Command Manager documentation incorrectly lists CACHE_STATUS as one of the columns returned in the STATUS_LIST ResultSet. CACHE_STATUS is not a valid DisplayPropertyEnum resulting in the method returning null results.
This is an identified documentation defect in Strategy 10.x.
WORKAROUND:The cube cache status information can be retrieved using the column index rather than the column name. The cube cache status information is stored in the column with index 0.
The following sample code prints out the cube cache statuses for the Intelligent Cube "My Intelligent Cube":
ResultSet oCubeProperties = executeCapture("LIST ALL PROPERTIES FOR INTELLIGENT CUBE CACHE NAME 'My Intelligent Cube' FOR PROJECT 'Strategy Tutorial';");
oCubeProperties.moveFirst();
ResultCell oCell = oCubeProperties.getResultCell(DisplayPropertyEnum.STATUS_LIST);
ResultSet oCubeStatus = (ResultSet) oCell.getValue();
oCubeStatus.moveFirst();
while(!oCubeStatus.isEof()){
printOut(oCubeStatus.getFieldValueString(0));
oCubeStatus.moveNext();
}
This sample code is offered as a courtesy by Strategy Technical Support to be used as-is. Strategy Technical Support cannot assist with modifying it per user requirements.
KB438788