Reputation: 1596
The Origen test program generation docs mention importing sub_flows. Is there a way to override where Origen searches for the sub-flow files? In the examples, just the name of the sub-flow is passed to the import method, as so:
Flow.create(environment: :probe) do
import "vreg"
end
Upvotes: 1
Views: 19
Reputation: 1596
Yes, this can be done in two ways.
1) Place the path in the flow file. The downside of this method is the repetitive nature of the solution.
# 1)
Flow.create(environment: :probe) do
import '../sub_flows/vreg'
end
2) Override the import method in your test interface. This method solves the issue for everyone at once and cleans up the flow files.
# 2)
# Flow file
Flow.create(environment: :probe) do
import 'vreg'
end
# Test interface file
def import(sub_flow, options = {})
sub_flow = "../sub_flows/#{sub_flow}"
super(sub_flow, options)
end
Upvotes: 1