Let me make it a little complex:
Assuming I have a source, for each element A of the source:
if(A.property1 == 1) goes to flow1 + flow2 + flow3
if(A.property1 ==2) goes to flow4 + flow5
if(A.property1 == 3) goes to flow6 + flow7 + flow8 + flow9
...
...
a lot of other branches
It seems what I want is a black box composite flow that encapsulate all above sub flows and output them in orders.
How should I do branching for above cases?
As you suggested, maybe I should model them as a single flow:
Flow1~> flow2 ~> ... ~> flow9
And in each flow, I do property check to see whether it's acceptable according to A.property1. (if yes, do biz, if no, do nothing and pass on to next flow)
I looks OK, but it introduce some "low level" logical dependencies, for example maybe I want to reuse a complex composite flow created by others and I can't add checking logic for A.property1.
What I want is actually a "high level" branching "Fan-out" ( like a conditional Balance) + ordered "Fan-in"
Leon
在 2015年11月25日星期三 UTC-8上午2:50:02,Akka Team写道: