Workflow Yapceu2010
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Workflow Yapceu2010

on

  • 2,963 views

This is a presentation of the Perl module Workflow available on CPAN. All examples mentioned are available as part of the workflow distribution. ...

This is a presentation of the Perl module Workflow available on CPAN. All examples mentioned are available as part of the workflow distribution.

http://search.cpan.org/~jonasbn/Workflow/lib/Workflow.pm
http://sourceforge.net/apps/mediawiki/perl-workflow/index.php?title=Main_Page

Statistics

Views

Total Views
2,963
Views on SlideShare
2,952
Embed Views
11

Actions

Likes
1
Downloads
6
Comments
6

2 Embeds 11

http://www.linkedin.com 6
http://lanyrd.com 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

15 of 6 Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Got rating from YAPC::Europe 2010 survey, first got depressed then discovered I had read the numbers all wrong. Rating 1-10

    * Your prior knowledge of subject? 3.7
    * Speaker's knowledge of subject? 9.2
    * Speaker's presentation of subject? 8.3
    * Quality of presentation materials? 6.7
    * Overall presentation rating? 8.2

    Feedback was a request for more advanced examples. A bit hard to squeeze into a 20-minute slot, my I will try to make a longer variation of the presentation with more complex material.
    Are you sure you want to
    Your message goes here
    Processing…
  • A video of my this presentation has been made public available at:

    http://www.presentingperl.org/ye2010/workflow/
    Are you sure you want to
    Your message goes here
    Processing…
  • Hmm, looks good. I have to check this out.
    Are you sure you want to
    Your message goes here
    Processing…
  • A new release of Workflow have been uploaded to CPAN, so the latest is now version 1.34 - It hopefully addresses the issue mentioned on slide #16 with newer versions of Perl.
    Are you sure you want to
    Your message goes here
    Processing…
  • Btw. there is a lie on slide #18, there are MORE than two items in the RT queue - sorry about that
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Workflow Yapceu2010 Presentation Transcript

  • 1. Illustration by xkcd used with permission: http://xkcd.com/518 1
  • 2. If you understand flowcharts you will have absolutely no problems understanding workflows... 2
  • 3. If you understand flowcharts you will have absolutely no problems understanding workflows... let’s go drink 2
  • 4. What is a workflow? A modeling and automation concept for processes, especially business related processes Or: a way to emulate and automate processes using reusable software components Or: a simple state machine to handle your data flow on a way suits can grasp Or: perhaps an attempt at 4GL? Or: plz read the wikipedia article 3
  • 5. So what is Workflow? A not so light weight Perl framework available on CPAN, which can be used to implement actual workflows Primarily focused on exploiting the best practice of doing configuration over coding... Well you will have to do “some” coding 4
  • 6. a workflow consists of: states actions/transitions 5
  • 7. Workflows Configurations are described in either XML or Perl - out of the box You can even write your own workflow configuration handler. A tutorial explains how to write a YAML configuration handler Actions (Perl methods - this is where you code) conditions (flow controllers) validators (Perl methods - this is where you can write code) Persisters Several persister options currently available and Workflow is DBI compatible 6
  • 8. <workflow> <type>Ticket</type> <description>This is the workflow for sample application Ticket</ description> <persister>TestPersister</persister> <state name="INITIAL"> <description>This is the state the workflow enters when instantiated. It's like a 'state zero' but since we're using names rather than IDs we cannot assume</description> <!-- This action is accessible from this state by everyone --> <action name="create issue" resulting_state="CREATED"/> </state> <state name="CREATED"> <description>State of ticket after it has been created</description> <action name="add comment" resulting_state="NOCHANGE"> <condition test="defined $context->{ticket}" /> </action> <action name="edit issue" resulting_state="IN_PROGRESS"> <condition name="IsWorker"/> </action> </state> ... 7
  • 9. <actions> <action name="create issue" class="App::Action::TicketCreate"> <description>Create a new issue</description> <field name="subject" label="Subject" description="Subject of issue" is_required="yes"/> <field name="description" label="Description" description="Description of issue" is_required="yes" /> <field name="creator" label="Creator" description="Name of user who is creating the ticket" is_required="yes" source_class="App::User"/> <field name="type" label="Type" description="Type of ticket" is_required="yes" source_list="Bug,Feature,Improvement,Task"/> <field name="due_date" label="Due Date" description="Date ticket is due (format: yyyy-mm-dd hh:mm)"/> <validator name="DateValidator"> <arg>$due_date</arg> </validator> </action> ... 8
  • 10. <conditions> <condition name="IsCreator" class="App::Condition::IsCreator"/> <condition name="IsWorker" class="App::Condition::IsWorker"/> <condition name="HasUserAndTicket" class="App::Condition::HasUserAndTicket"/> </conditions> 9
  • 11. <validators> <validator name="DateValidator" class="Workflow::Validator::MatchesDateFormat"> <description>Validator to ensure dates are proper</description> <param name="date_format" value="%Y-%m-%d %H:%M"/> </validator> </validators> 10
  • 12. <persisters> <persister name="TestPersister" class="Workflow::Persister::DBI::ExtraData" dsn="DBI:SQLite:dbname=db/ticket.db" extra_table="workflow_ticket" extra_data_field="ticket_id"/> </persisters> 11
  • 13. Criticism Workflow is not particularly Perl-ish, it is actually quite low on black magic Workflow is not as light weight as other CPAN/Perl modules You cannot just call Workflow->new and be good to go Yes - we are using patterns 12
  • 14. the Project Small community with some nice reference implementations (OpenXPKI etc.) High acceptance rate of patches and contributions Project Directives: Stability, we have people using this in production Extensibility, we want to make Workflow as useful as possible 13
  • 15. some history Initial implementation by Chris Winters (releases from 0.01 to 0.17). 11th. of October 2004 - Initial release to CPAN (0.10) 7th. of July 2006 Workflow handed over to me (jonasbn) for ongoing maintenance and development (my first release was 0.18) 19th. of September 2006 - Project set up at SourceForge Latest release 1.33, January 30th. 2010, yes we release early and often - well as early and often as it makes sense 14
  • 16. future stuff... In pursuit of stability: Aiming for higher test coverage, we have gone from: 63,4% (0.17) to 76.8% (1.33) Workflow does currently NOT work under Perl 5.12 and newer In pursuit of extensibility: Evaluation of issues in RT some of these are in regard to new features and not bugs In pursuit of a larger user base: Aiming for more and better documentation and examples, much of the documentation seems to reflect version 0.15 - so updating and proof reading is required 15
  • 17. about me Got interested in workflow after having worked with Oracle Workflow (a free commercial product, well free to the extent it does require Oracle) Got excited when discovering Workflow on CPAN - all free and all open source Took over from Chris Winters My own workflow projects stranded, but I still hope to this day to find use of it at some point - for now I only maintain Workflow... 16
  • 18. Resources http://perl-workflow.sourceforge.net/ Friendly community Documentation Wiki low-traffic mailing list Subversion repository RT queue, currently only holding two items, where one is an older patch not having been integrated yet Irregular releases, my bad jonasbn@cpan.org 17