Skip to content

Commit ff59e5d

Browse files
committed
result can be AgenticScope and Map<String, Object>
Signed-off-by: Dmitrii Tikhomirov <[email protected]>
1 parent 46e6632 commit ff59e5d

File tree

1 file changed

+27
-0
lines changed
  • experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic

1 file changed

+27
-0
lines changed

experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/WorkflowTests.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,20 @@ public void testParallel() throws ExecutionException, InterruptedException {
182182
assertEquals("Fake hero response", result.get("hero").toString());
183183
assertEquals("Fake setting response", result.get("conflict").toString());
184184
}
185+
186+
try (WorkflowApplication app = WorkflowApplication.builder().build()) {
187+
AgenticScope result =
188+
app.workflowDefinition(workflow)
189+
.instance(topic)
190+
.start()
191+
.get()
192+
.as(AgenticScope.class)
193+
.orElseThrow();
194+
195+
assertEquals("Fake conflict response", result.readState("setting").toString());
196+
assertEquals("Fake hero response", result.readState("hero").toString());
197+
assertEquals("Fake setting response", result.readState("conflict").toString());
198+
}
185199
}
186200

187201
@Test
@@ -225,6 +239,19 @@ public void testSeqAndThenParallel() throws ExecutionException, InterruptedExcep
225239
assertEquals(cultureTraits, result.get("culture"));
226240
assertEquals(technologyTraits, result.get("technology"));
227241
}
242+
243+
try (WorkflowApplication app = WorkflowApplication.builder().build()) {
244+
AgenticScope result =
245+
app.workflowDefinition(workflow)
246+
.instance(topic)
247+
.start()
248+
.get()
249+
.as(AgenticScope.class)
250+
.orElseThrow();
251+
252+
assertEquals(cultureTraits, result.readState("culture"));
253+
assertEquals(technologyTraits, result.readState("technology"));
254+
}
228255
}
229256

230257
@Test

0 commit comments

Comments
 (0)