Results 1 to 3 of 3

Thread: Coffee Machine, a se-Workflow sample

  1. #1

    Default Coffee Machine, a se-Workflow sample

    I've put together a getting started se-Workflow sample. The sample is called Coffee Machine and is intentionally simple: insert coins in a coffee machine and choose a drink. The machine makes the drink and returns the remaining coins. If the amount is insufficient the coins are returned as well.

    The sample is intended to showcase basic features including how to configure and kick start a workflow (annotation-driven config) and different transition related aspects (triggering transitions with parameters, simple and conditional transitions, returning objects as a result of a transitions.)

    Feel free to download, test the sample and give me your feedback. I've included the source code as well as the dependencies and an executable jar. Just unzip the archive, and type:

    Code:
    java -jar "Coffee Machine.jar"
    What I missed the most is the ability to configure before and after actions on a state and automatic transitions. I might be unaware of how to achieve this due to my newness to Workflow and I appreciate to hear your feedback on this.
    I also have a couple of bug reports and improvement requests that I'll submit on the Jira.

    Tareq
    Tareq Abedrabbo

    My Twitter
    My Blog

  2. #2

    Default

    Hi,
    Thanks for the application. The cofee machie seems to be the hello world for this domain. Personaly, i just played with the sample in spring workflow, most of the time trying to get it to work.
    About the app. I think asking the user to choose the cofee type should be done outside the state code. Like the nuber of coins inserted it is a user action and it should be sent as a parameter to inputChoice or transitions should be made for each type of cofee.

  3. #3

    Default

    About the app. I think asking the user to choose the cofee type should be done outside the state code. Like the nuber of coins inserted it is a user action and it should be sent as a parameter to inputChoice or transitions should be made for each type of cofee.
    Makes sense. Changed the code accordingly. Thanks for your suggestion and for taking the time.
    Tareq Abedrabbo

    My Twitter
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •