What is a Step?
A step is the basic component of an Atom.
Atom.apex supports many types of steps.
- Simple Step
- Composite Step
- ForEach Step
- Range Step
- Repeat Step
A step is the basic component of an Atom.
Atom.apex supports many types of steps.
A simple step is one that contains a compute. The only job for a simple step is to execute that compute.
new Atom()
.then(new Atom.SimpleStep(new CustomCompute()))
.then(new CustomCompute()) // equivalent to above
.fork();
Constructor | Description |
---|---|
SimpleStep(Atom.Compute) | Create a simple step from the compute |
A composite step is one that can contain multiple steps. It executes the children steps one by one.
new Atom()
.then(
new Atom.CompositeStep()
.then(...)
)
.fork();
Constructor | Description |
---|---|
CompositeStep() | Create an empty composite step |
Method | Description |
---|---|
CompositeStep then(Atom.Step) | Chain the next step |
CompositeStep then(Atom.Compute) | Chain the next compute as the step |
CompositeStep then(Func) | Chain the next Func as the step |
A ForEachStep is one that executes the 'for-each' loop with the given step. It looks up for the collection data with the given name from the Atom state, and creates a new looping item before invoking the looping step.
Map initialData = new Map{ 'items' => new List