Workflow implementations

In this SWF example, we will create four different Java classes:

  • Types.java: It has the project's domain, workflow, and activity type data which is shared with other components. It will help to handle registering these types with Amazon SWF.
  • Activity.java (activity worker): It polls activity tasks and, in response, it runs activities.
  • Worker.java (workflow worker or decider): Polls for decision tasks and schedules new tasks.
  • Starter.java (workflow starter): Starts new workflow executions.

You need to import two classes, such as AmazonSimpleWorkflow, AmazonSimpleWorkflowClientBuilder, and the simpleworkflow.model package for this example.

Also create an instance of AmazonSimpleWorkflowClientBuilder to implement Amazon ...

Get Expert AWS Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.