View Full Version : Component Error Detection?

03-01-2006, 12:06 PM
I have an ANT Target Processor product action in a component. I would like to detect an error immediately after running the component and set a Property Manager property value. I have no problems setting property values but how do you detect failure of a component or product action?

ProductService ps = (ProductService)arg0.getServices().getService(ProductService.NAME);
ProductTree pt = ps.getSoftwareObjectTree(ps.DEFAULT_PRODUCT_SOURCE, null);
GenericSoftwareObject gso = (GenericSoftwareObject) pt.getRoot();

arg0.getServices().displayUserMessage("Install Status","GetBeanID: "+gso.getBeanId(),1);
arg0.getServices().displayUserMessage("Install Status","SoftwareObjectName: "+gso.getDisplayName(),1);

Using the code in the component "onInstalledcomponent" method I would like to get the status of the component bean or, more specifically, the Ant processor action bean.

Problem is with the code above, I can get the root product beanID but the DisplayName is blank. I tried to set gso to pt.getBean("beanid") with no luck.

Can anyone give me a clue how to detect bean errors from an install component method?


03-02-2006, 09:34 AM
Ok, using kb page:

I am able to get/set bean properties but don't yet see how to detect status.