Giter Site home page Giter Site logo

week-07-workflow's Introduction

Week 7 Workflow Example

Outline

  • Exercise

    • Complete the tests of the Technology Workflow (make it up)
    • Or create your own Object and Workflow
  • Advanced Exploration

Developing and Testing Workflows

What is workflow?

Workflow is a finite-state-machine-inspired API for modeling and interacting with what we tend to refer to as 'workflow'.

A lot of business modeling tends to involve workflow-like concepts, and the aim of this library is to make the expression of these concepts as clear as possible, using similar terminology as found in state machine theory.

So, a workflow has a state. It can only be in one state at a time. When a workflow changes state, we call that a transition. Transitions occur on an event, so events cause transitions to occur. Additionally, when an event fires, other arbitrary code can be executed, we call those actions. So any given state has a bunch of events, any event in a state causes a transition to another state and potentially causes code to be executed (an action). We can hook into states when they are entered, and exited from, and we can cause transitions to fail (guards), and we can hook in to every transition that occurs ever for whatever reason we can come up with.

Exercise

Review the Workflow Gem documentation.

  1. Fork and clone this repository to make your own, called yourname-week-07-workflow.

  2. Add yet another workflow state and a spec for it. Or create your own workflow.

  3. Is it a one way workflow, or can it be rolled back? You decide.

  4. Make sure you have an acceptible level of test coverage. Your test coverage percentage is your grade. Just kidding.

  5. Tag it complete and push it back to github

Advanced Exploration

  1. Make some methods that do other things besides puts to standard out.
  2. For example, send an email https://github.com/mikel/mail
  3. or Wrap a sinatra web service around your Class. Test the web service (of course!)
  4. re-implement using AASM instead of Workflow gem

week-07-workflow's People

Contributors

ivanoats avatar

Stargazers

John Hildebrant avatar

Watchers

John Hildebrant avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.