-
|
Hi Team Current i have a workflow where i have document analysis step which will extract the document and summarizes it. Output of this will be passed to Policy verifier step . After that the next step is Fraud Detection , in this step i need output of both Policy verification step and document analysis step. how can i achive this. WorkflowBuilder()
.set_start_executor(document_analyzer)
.add_edge(document_analyzer, policy_verifier)
.add_edge(policy_verifier, fraud_detector)
.add_edge(fraud_detector, decision_maker)
.build() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can use .add_fan_in_edges([document_analyzer, policy_verifier], fraud_detector)This requires the output types of Alternatively, you can add edges directly to .add_edge(document_analyzer, fraud_detector)
`add_edge(policy_verifier, fraud_detector)But in |
Beta Was this translation helpful? Give feedback.
You can use
add_fan_in_edgesfromdocument_analyzerandpolicy_verifiertofraud_detector.This requires the output types of
document_analyzerandpolicy_verifierto be the same, and the handler infraud_detectorin this case should handle a list of that output type.Alternatively, you can add edges directly to
fraud_detector:But in
fraud_detector, you need to keep track of the previous inputs from either one of the source executors, and only start the real work when both inputs are available.