POJO-actor Tutorial Part 2 (Second Half): Creating Workflows
Learn how to create and execute workflows using POJO-actor.
Read on CoderLegion →Build concurrent, distributed applications with plain Java objects. Declarative YAML workflows simple enough for AI agents to generate correctly—no more debugging AI-generated playbooks.
// Define any POJO as an actor
public class TaskRunner {
public String execute(String command) {
return Runtime.exec(command);
}
}
// Use it with the actor system
IIActorRef<TaskRunner> runner =
new IIActorRef<>("runner", new TaskRunner(), system);
// Call methods asynchronously
String result = runner.ask(r -> r.execute("deploy")).get();
No complex frameworks. No boilerplate. Just your Java classes with superpowers.
Use any POJO as an actor. No base classes to extend, no interfaces to implement.
Compile-time type checking with Java generics. No casting, no runtime surprises.
Define state machines in YAML. The interpreter handles transitions automatically.
Execute commands across distributed nodes. Each node is an independent actor.
name: deploy-workflow
steps:
- states: ["0", "1"]
actions:
- actor: nodeGroup
method: apply
arguments:
actor: "node-*"
method: executeCommand
arguments: ["./deploy.sh"]
Define your infrastructure operations in YAML. State machine semantics ensure reliable execution with automatic error handling and recovery. The minimal syntax is ideal for AI-assisted development—LLMs generate correct workflows without the trial-and-error of complex DSLs.
Tutorials, announcements, and insights from the team.
Learn how to create and execute workflows using POJO-actor.
Read on CoderLegion →Introduction to the workflow language and its core concepts.
Read on CoderLegion →Announcing POJO-actor v1.0 and its key features.
Read on CoderLegion →Your support helps us maintain and improve these open source tools.
Show your support and help others discover the project.
Priority assistance and dedicated support for your team.
Tailored solutions and workflow development for your needs.
Help fund ongoing development and new features.
Get started with POJO-actor and actor-IaC today.