You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you said, I think that is a bug. I'll fix it and ensure that the usage of inheritance of classes which has an inner flow works as expected. But, I would like to recommend the usage of composition over inheritance, in this case, you could duplicate the flow declaration in both classes, or create a common flow to be the first step of these classes to avoid inheritance.
Hi @agramms, I thought about your issue and the root cause of it hurts one of the goals of this project. (Solve complex business logic, by allowing the composition of use cases.).
So, because of this, I won't fix it. But, I'll add a new feature that will raise an exception if somebody tries to inherit from a use case that has an inner flow.
When I use a class that inherit from a class that use Micro::Case with a flow defined, this class have a different behavior from expected.
First, i have to define the same flow that is defined in top level class, the flow was not called if it isn't declared in leaf class.
Top Level Class:
Leaf one:
But even with that, in the tests it some times call the leaf call! class, and others from the inherited class. I'm using rspec for the tests.
If I call only one test, the result is ok:
but when I run all the tests, the Success response is from the inherited calls, not from the other one:
I think that it can be a unexpected way of using flow.
I'm using flow in the right way?
Let me know if you need any additional information.
Thanks!
The text was updated successfully, but these errors were encountered: