• 1Installation
  • 2Preliminary Knowledge
  • 3Big Picture
  • 4Compute
  • 5Step
  • 6State
  • 7Interruptions
  • 8Functional Support
  • 9Monitor

Atom.apex

  • Docs
  • Tutorials
Getting started with Atom.apex

Step

A step is the basic component of an Atom. Here is how we chain the steps into an Atom.

new Atom()
    .then(step1)
    .then(step2)
    .fork();

We have different kinds of steps in Atom.apex.

  • Simple Step

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();
  • Composite Step

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();
  • ForEach 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{ ... } };
new Atom(initialData)
    .then(new Atom.ForEachStep('item', 'items', new CustomStep()))
    .fork();
  • Range Step

A RangeStep is one that executes the given step with a range of numbers.

new Atom()
    .then(new Atom.RangeStep('n', 1, 10, new CustomStep()))
    .fork();
  • Repeat Step

A RepeatStep is one that repeats the given step until N times.

new Atom()
    .then(new Atom.RepeatStep(10, new CustomStep()))
    .fork();
Done