Class OrderProcessingWorkflow

java.lang.Object
com.example.workflows.OrderProcessingWorkflow

public final class OrderProcessingWorkflow extends Object
A port of ADK Kotlin's order-processing workflow sample, with fraud review. Nested fraud and inventory workflows and a credit-check tool run concurrently, and a JoinNode waits for all three before a risk agent decides whether the order is charged, reviewed by finance and compliance agents, or frozen as fraud. Every outcome ends with a receipt.
  • Method Details

    • create

      public static Workflow create(String model)
      Builds the workflow, with every agent on model.
    • main

      public static void main(String[] args)
      Runs the workflow on three orders, each in its own session, and prints what each step and agent did. It calls Gemini, so it needs the credentials the README describes; the first argument, if any, overrides the model.