Open jiangliu23 opened 7 years ago
What's the benefit of using call to a subroutine vs. in-lining in a generated flow? Does it make the flow more readable or something?
Generally I don't like the idea of creating a new method like flow.call since it would be a very UFlex specific API and we are really trying to move away from all such things in the program generator.
However, I'm definitely not opposed to improving the UFlex generator output to make it create something that is more native looking, we just need more information about what/why you are trying to achieve by using call. Once we get that we can think about whether we need to provide a specific control for that to user, or whether we just universally make use of call in the generated output.
The advantage of doing subflow call can be experienced in the following scenarios:
There are a lot of useful flow control commands in Ultraflex which i understand that not everyone needs to take advantage of or has very little reason to, however there are always good use cases for these methods, to minimize the work load on the core team for requests like this, perhaps the testers Gem can provide an easy way to allow users to create their own custom flow op-codes (if they are not supported natively by the tester plugin?)
thanks.
Would use of render
as discussed here provide what you want re. calling sub flows?
https://stackoverflow.com/questions/46243808/does-origen-support-93k-multi-bin-feature
Much appreciate your help in adding in the render feature, it seems to be able to provide the functionality that's needed for calling sub flows
I'll leave this ticket open until we get a more permanent solution in place, I think we should implement an API like this:
flow.call_sub_flow "some_sub_flow"
For testers which support calling a sub-flow as a subroutine, like the UFlex, then it would generate the required flow line to make the call.
On testers which don't support that, like the J750 and V93K, then it would split the flow into two sections at that point. The top-level flow integrator could then insert the two sections on either side of the flow to be called in the test program.
This is conceptually very similar with how the tester.handshake
API is handled for patterns.
Ultraflex interface currently does not support the 'call' statement in the flow table which is a useful feature for handling subflows, it would be good to see this feature enabled for Ultraflex at some point.