Skip to content

Commit da42e17

Browse files
committed
add helper conditional to the AgenticDSL class
Signed-off-by: Dmitrii Tikhomirov <[email protected]>
1 parent 640c484 commit da42e17

File tree

1 file changed

+4
-0
lines changed
  • experimental/fluent/agentic/src/main/java/io/serverlessworkflow/fluent/agentic/dsl

1 file changed

+4
-0
lines changed

experimental/fluent/agentic/src/main/java/io/serverlessworkflow/fluent/agentic/dsl/AgenticDSL.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ public static AgentTaskConfigurer agent(Object agent) {
140140
return list -> list.agent(agent);
141141
}
142142

143+
public static AgentTaskConfigurer conditional(Predicate<?> predicate, Object agent) {
144+
return list -> list.agent(agent).when(predicate);
145+
}
146+
143147
public static AgentTaskConfigurer emit(Consumer<FuncEmitTaskBuilder> event) {
144148
return list -> list.emit(event);
145149
}

0 commit comments

Comments
 (0)