I need to call activity GetAssets from flow action.
The flow action is in HSBC-Div-Unit-AppTwo-Work-CaseTwo And the activity is in the HSBC-Int-Assets-ApiAssets class
As they both reside in different classes, I created a wrapper Activity in HSBC-Div-Unit-AppTwo-Work-CaseTwo and called the activity with step Call HSBC-Int-Assets-ApiAssets.GetAssets.
It calls that activity without any problem. Now the problem is as below.
Activity GetAssets calls a Connect-Rest rule. This rule is also present in HSBC-Int-Assets-ApiAssets class. If I directly run this activity GetAssets, it works fine. Now if I call the wrapper activity present in the HSBC-Div-Unit-AppTwo-Work-CaseTwo, it calls GetAssets present in the HSBC-Int-Assets-ApiAssets class correctly, but it is trying to call the connect rest rule present in the HSBC-Div-Unit-AppTwo-Work-CaseTwo class.
This is very strange. Please let me know how I can solve this issue.
I got solution for this issue. The reason it was not able to find that particular rule was the classes to which they belong were not in the hierarchy. If we check the class hierarchy, it will not find that class. And this is the reason it was showing this error: couldn't find rule.
So the solution to this issue would be to save the connect rest rule in any class which is present in the hierarchy. It is upto the application architecture to decide exactly where to save this rule.