Expand my Community achievements bar.

SOLVED

@Activate method not getting invoked

Avatar

Level 2

Dear All,

We have one service class with one @activate method  which is not getting invoked, But is working fine in other class of the same app. Is there a constraint that only one @activate can be used in one app-core?

 

Thanks in advance

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @NaziyaP 

Method with @Activate annotation will only be called once your Component(or Service) is activated. If Component has any dependencies it won't be activated hence your activate method won't be executed. Check if your Component/Service has any dependencies and try to resolve.

AG

View solution in original post

6 Replies

Avatar

Level 8

Hi @NaziyaP,

There is no constraints as such, can you please add code snippet/screenshot of class where this activate method is not getting invoked.

Avatar

Community Advisor

Please check logs for any errors and paste the code here

Avatar

Level 2
There is no error and it is a simple @activate method, cant paste code .

Avatar

Correct answer by
Community Advisor

Hi @NaziyaP 

Method with @Activate annotation will only be called once your Component(or Service) is activated. If Component has any dependencies it won't be activated hence your activate method won't be executed. Check if your Component/Service has any dependencies and try to resolve.

AG

Avatar

Level 4

There is no such constraint

Could you please go to systsem console and inder components tab go to your service and see if it is axtive or not not some refrences are in satisfied state.

If its not active it will not work, try to resolve dependencies.

Hope this helps

Avatar

Administrator
Wonderful reply, thanks for sharing the knowledge.


Kautuk Sahni