请求回复工作流
patterns
此工作流模拟一个同步请求并等待回复。
完整 FlowZap 代码
user { # User
n1: circle label:"Start Request Reply"
n3: rectangle label:"Validate Request Reply conditions"
n5: rectangle label:"Record Request Reply outcome"
n7: circle label:"End Request Reply"
n1.handle(bottom) -> app.n2.handle(top) [label="Success"]
n3.handle(bottom) -> app.n4.handle(top)
n5.handle(bottom) -> app.n6.handle(top)
}
app { # App
n2: rectangle label:"Receive Request Reply event"
n4: rectangle label:"Execute Request Reply action"
n6: diamond label:"Monitor Request Reply status"
n2.handle(right) -> user.n3.handle(left)
n4.handle(right) -> user.n5.handle(left) [label="Valid"]
n6.handle(left) -> user.n5.handle(left) [label="Retry/Rejected"]
n6.handle(right) -> user.n7.handle(bottom)
}