• Like

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Workflow NPW2010

  • 804 views
Uploaded on

This is a revised version of my Workflow presentation for Nordic Perl Workshop 2010 (NPW2010) in Reykjavik, Iceland

This is a revised version of my Workflow presentation for Nordic Perl Workshop 2010 (NPW2010) in Reykjavik, Iceland

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
804
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
3
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

  • Wikipedia reference?
  • Wikipedia reference?
  • The statemachine?












  • How many open tickets?

Transcript

  • 1. Illustration by xkcd used with permission: http://xkcd.com/518
  • 2. If you understand flowcharts you will have absolutely no problems understanding workflows...
  • 3. If you understand flowcharts you will have absolutely no problems understanding workflows... let’s go drink
  • 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
  • 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
  • 6. a workflow consists of: states actions/transitions
  • 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
  • 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> ...
  • 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> ...
  • 10. <conditions> <condition name="IsCreator" class="App::Condition::IsCreator"/> <condition name="IsWorker" class="App::Condition::IsWorker"/> <condition name="HasUserAndTicket" class="App::Condition::HasUserAndTicket"/> </conditions>
  • 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>
  • 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>
  • 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
  • 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
  • 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.34, August 6th. 2010, yes we release early and often - well as early and often as it makes sense
  • 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
  • 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...
  • 18. Resources http://perl-workflow.sourceforge.net/ Friendly community Documentation Wiki low-traffic welcoming mailing list Subversion repository RT queue, currently holds 7 items, some contain patches for improvements Irregular releases, my bad jonasbn@cpan.org