Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ public static AgentWorkflowBuilder workflow(String name, String ns) {
return new AgentWorkflowBuilder(name, ns, DEFAULT_VERSION);
}

public AgentWorkflowBuilder agent(Object agent) {
return agent(UUID.randomUUID().toString(), agent);
}

public AgentWorkflowBuilder agent(String name, Object agent) {
final AgentDoTaskBuilder doTaskBuilder = this.newDo();
doTaskBuilder.agent(name, agent);
this.workflow.setDo(doTaskBuilder.build().getDo());
return this;
}

public AgentWorkflowBuilder sequence(Object... agents) {
return sequence(UUID.randomUUID().toString(), agents);
}
Expand Down