Skip to content

Parallel Workflow returns only one result instead of two #825

@treblereel

Description

@treblereel

What happened:

Int the resulted Object only one List presented, instead of two

What you expected to happen:
two objects

How to reproduce it:

    var foodExpert = AgentsUtils.newFoodExpert();
    var movieExpert = AgentsUtils.newMovieExpert();

    Workflow wf = workflow("parallelFlow").parallel(foodExpert, movieExpert).build();
    Map<String, Object> input = Map.of("mood", "romantic");

    Object result;
    try (WorkflowApplication app = WorkflowApplication.builder().build()) {
      result = app.workflowDefinition(wf).instance(input).start().get().asJavaObject();
    } catch (Exception e) {
      throw new RuntimeException("Workflow execution failed", e);
    }

    System.out.println(result);

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions