@startuml
!include <material/lambda>
!include <material/directions_fork>
!include <material/flag>
!include <material/transfer>
!include <material/autorenew>

left to right direction
skinparam defaultTextAlignment center

rectangle "<$ma_lambda>\nConstant\nGenerator" as gen #LightGreen
rectangle "<$ma_directions_fork>\nChoose\nOutput" as choose #LightPink
rectangle "<$ma_flag>\nFinish 1" as finish1 #LightPink
rectangle "<$ma_flag>\nFinish 2" as finish2 #LightPink
node "<$ma_transfer>\nQueue" as queue #DeepSkyBlue
rectangle "<$ma_autorenew>\nTransformer:\ncount > 10?" as gt #Salmon

interface " " as q2
interface " " as q4
interface " " as q5

interface " " as c1
interface " " as c2
interface " " as c3


gen --> q2: output

q2 -r-> choose: input
choose --> c2: out1
choose -r-> c3: out2
c1 -d-> choose: select

c2 --> finish1: input

c3 -r-> queue: enqueue
queue -d-> q4: dequeue
queue -u-> q5: count

q4 --> finish2: input

q5 -l-> gt: input
gt -l-> c1: transformed
@enduml
