Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is a useful base activity called TimeoutActivity which you can derive from to make your own activity which can be started/stopped/failed and which can be timed out.

...

Composition Activities

Description

JoinAll

Performs a join on all the given child activities. So the activity waits until all the child activities have completed, then it completes itself. You can add additional constraints to the activity using derivation. The default is to wait for all the child activities to complete; though you can enable fast-fail mode so that the activity fails as soon as a child activity fails

JoinQuorum

This activity is useful for implementing clustering style activities where you want a quorum of activities to complete. e.g. if you have 5 child activities you want to wait for at least 3 activities to complete succesfully before continuing

AsynchronousActivity

Executes any Runnable or Callable on an Executor and complete the activity when it has completed so that it can be used in joins

ParallelActivity

Allows a collection of parallel Runnable or Callable objects to be performed on an Executor then performing some kind of join on them completing

...

So we have a base class called Workflow which adds a new State object for the current step (which allows actvities to listen to the step changing) together with helper methods for moving to different steps, for suspending and so forth.

...