Policy to create a SubCategory and display that subcategory in the Visual Browse Window
I have to write a custom RAM policy which will do the following:-
User will create a SubCategory and that subCategory should be displayed on the left-hand visual browse window in RAM client.
It is understood that the subCatgory will not be displayed until it has a leaf node under it. But the requirement is that it should be displayed as soon as it is created (after the client refreshes).
When the user creates a "SubCategory Asset", I create the subCategory using the following API.
matchedCategory= subCategory.createSubCategory(assetObj.getName());
and then I try to categorize assetObj which the "SubCategory Asset" that I just created, with the newly created subCategory.
categorize(assetObj,matchedCategory);
But this gives the following error.
Exception in thread "main" com.ibm.ram.common.data.exception.RAMRuntimeException: Subcategory Business Capability Catalog/Business Capabilities/Move Money & Process Payments/My Buss Cap Asset23 was not found for the asset My Buss Cap Asset23[1.0].
at com.ibm.ram.client.RAMAsset.categorize(RAMAsset.java:2300)
at com.cof.custom.policy.CustomPolicyUtility.categorize(CustomPolicyUtility.java:572)
at com.cof.custom.policy.CustomPolicyUtility.createUpdateSubCategory(CustomPolicyUtility.java:538)
at com.cof.custom.policy.CustomPolicyUtility.categorizeSubCategoryAssets(CustomPolicyUtility.java:495)
at com.cof.custom.policy.CustomPolicyUtility.manageAssets(CustomPolicyUtility.java:426)
at com.cof.custom.policy.CustomPolicyUtility.main(CustomPolicyUtility.java:882)
Will appreciate your help.
Thanks,
Sourav
User will create a SubCategory and that subCategory should be displayed on the left-hand visual browse window in RAM client.
It is understood that the subCatgory will not be displayed until it has a leaf node under it. But the requirement is that it should be displayed as soon as it is created (after the client refreshes).
When the user creates a "SubCategory Asset", I create the subCategory using the following API.
matchedCategory= subCategory.createSubCategory(assetObj.getName());
and then I try to categorize assetObj which the "SubCategory Asset" that I just created, with the newly created subCategory.
categorize(assetObj,matchedCategory);
But this gives the following error.
Exception in thread "main" com.ibm.ram.common.data.exception.RAMRuntimeException: Subcategory Business Capability Catalog/Business Capabilities/Move Money & Process Payments/My Buss Cap Asset23 was not found for the asset My Buss Cap Asset23[1.0].
at com.ibm.ram.client.RAMAsset.categorize(RAMAsset.java:2300)
at com.cof.custom.policy.CustomPolicyUtility.categorize(CustomPolicyUtility.java:572)
at com.cof.custom.policy.CustomPolicyUtility.createUpdateSubCategory(CustomPolicyUtility.java:538)
at com.cof.custom.policy.CustomPolicyUtility.categorizeSubCategoryAssets(CustomPolicyUtility.java:495)
at com.cof.custom.policy.CustomPolicyUtility.manageAssets(CustomPolicyUtility.java:426)
at com.cof.custom.policy.CustomPolicyUtility.main(CustomPolicyUtility.java:882)
Will appreciate your help.
Thanks,
Sourav