cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
duncan20928
Level 3

Component Error Detection?

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?

Thanks!
Labels (1)
0 Kudos
(1) Reply
duncan20928
Level 3

Ok, using kb page:
http://support.installshield.com/kb/view.asp?articleid=Q105052

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