A Workflow Engine for PHP 5

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.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Notes on slide 1

    Theme created by Sakari Koivunen and Henrik Omma Released under the LGPL license.

    4 Favorites

    A Workflow Engine for PHP 5 - Presentation Transcript

    1. Welcome!
        • A Workflow Engine for PHP 5
        • or: Graph-Oriented Programming with PHP
        • Sebastian Bergmann
        • http://sebastian-bergmann.de/
        • March 14 th 2008
    2. Who I Am
      • Sebastian Bergmann
      • Contributor to the PHP Project since 2000
      • Creator of PHPUnit
      • Developer for eZ Systems AS
      • Author, Consultant, Trainer
    3. Who Are You?
      • Your Background
        • PHP 5?
        • OOP?
        • eZ Components?
        • Workflow?
    4. Introduction
      • Business enterprises need to reduce the cost of doing business and continually develop new services and products.
      • Enterprise Content Management
        • helps with storing business-critical content (customer data, documents, etc.) in a central repository and in a unified way.
      • Workflow Management
        • provides the methodologies and software that help with organizing the processes that operate on this content inside an organization.
    5. What is Workflow Management?
      • “The automation of a business process, in whole or parts, where documents, information or tasks are passed from one participant to another to be processed, according to a set of procedural rules” [RA01]
    6. What is Workflow Management?
      • “Technology supporting the reengineering of business and information processes. It involves: (1) defining workflows, i.e., describing those aspects of a process that are relevant to controlling and coordinating the execution of its tasks [...], and (2) providing for fast (re)design and (re)implementation of the processes as business needs and information systems change” [DG95]
    7. Motivation The workflow of eZ Publish 3
    8. Activity-Based Workflow Mgmt. Who must do what when and how ?
    9. Activity-Based Workflow Mgmt. Who must do what when and how ?
      • Directed Graph
        • Nodes represent activity steps
        • Edges between nodes represent the flow
          • Control Flow
          • Data Flow
        • Nodes can have service objects attached to them
    10. Workflow Patterns
      • W.M.P. van der Aalst, A.H.M. ter Hofstede, B. Kiepuszewski, and A.P. Barros. Workflow Patterns .
      • Requirements for Workflow Languages
      • Vocabulary to compare Workflow Languages
    11. Workflow Patterns
      • Basic Control Flow Patterns
        • Sequence, Parallel Split (AND-Split), Synchronization (AND-Join), Exclusive Choice (XOR-Split), Simple Merge (XOR-Join)
      • Advanced Branching and Synchronization
        • Multi-Choice (OR-Split), Synchronizing Merge (OR-Join), Multi-Merge, Discriminator
      • Structure
        • Arbitrary Cycles, Cancel Case, Implicit Termination
    12. Graph-Oriented Programming
      • Implementation technique for graph-based execution languages
        • Strategy for implementing graph execution on top of an object-oriented programming language
      • Original implementation: JBoss jBPM
    13. Graph-Oriented Programming
      • Provides the means to structure software around graphs
      • Adds wait states to object-oriented programming language
        • Ability to suspend and resume executions
    14. Graph-Oriented Programming
    15. Graph-Oriented Programming
    16. Graph-Oriented Programming
    17. Workflow Virtual Machine
      • Sérgio Miguel Fernandes, João Cachopo, and António Rito Silva. Supporting Evolution in Workflow Design Languages .
      • Isolate the core of the Workflow Management System from the Workflow Description Language
        • No standard Workflow Description Language
        • Workflow Description Languages change
      • „Compile“ frontend Workflow Description Language(s) to backend representation
    18. Micro-Workflow Architecture
      • Dragos A. Manolescu. An Extensible Workflow Architecture with Objects and Patterns .
      • Object-Oriented
        • Original implementation in Smalltalk
      • Component-Oriented
        • Separation of concerns
        • Components are exchangeable
    19. Micro-Workflow Architecture
      • Components
        • Core
          • Execution
          • Process
          • Synchronization
      • Persistence
      • Worklist
      • Manual Intervention
      • History
      • Monitoring
      • Federated Workflow
    20. ezcWorkflow
      • Reusable workflow engine component
      • Part of the eZ Components
        • Version 1.0 released on July 2 nd 2007
        • Version 1.1 released on December 17 th 2007
          • New node type to conveniently express loops
        • Version 1.2 exptected to be released in June
          • Support for the Cancel Case workflow
          • Plugin system to customize / extend the engine
          • Visualization of workflow execution
      • Developed as part of my Diploma Thesis
    21. Interlude: eZ Components
      • Provide a solid platform for PHP application development
      • Clean and simple API
      • Excellent documentation
      • Keep backward compatibility for longer periods of time
      • Stable and few regressions
      • Clean IP, Open Source friendly
    22. Interlude: eZ Components <?php require 'ezc/Base/base.php' ; function __autoload ( $className ) { ezcBase :: autoload ( $className ); }
      • pear channel-discover components.ez.no
      • pear install ezc/ezcomponents
    23. ezcWorkflow
      • Pragmatic approach to describe workflows through objects that encapsulate the workflow patterns
      • A workflow definition is an object graph than can be
        • programmatically created using the Workflow Definition API or
        • loaded from an XML file
        • and executed via the Workflow Execution API
    24. ezcWorkflow Data Storage Workflow Core Wf Definition API Wf Execution API GUI XML Mail / SOAP / ...
    25. ezcWorkflow
      • Workflow Definition API
        • Exposes functionality to create , modify , and delete workflow definitions
      • Workflow Execution API
        • Exposes functionality to start , suspend , resume , and stop workflow execution
        • Exposes functionality to monitor workflow execution
    26. ezcWorkflow $workflow = new ezcWorkflow ( 'Test' ); $input = new ezcWorkflowNodeInput ( array( 'choice' => new ezcWorkflowConditionIsBool ) ); $workflow -> startNode -> addOutNode ( $input ); Example: Defining a workflow
    27. ezcWorkflow $branch = new ezcWorkflowNodeExclusiveChoice ; $branch -> addInNode ( $input ); $branch -> addConditionalOutNode ( new ezcWorkflowConditionVariable ( 'choice' , new ezcWorkflowConditionIsTrue ), new ezcWorkflowNodeAction ( 'PrintTrue' ) ); // ... Example: Defining a workflow
    28. ezcWorkflow $merge = new ezcWorkflowNodeSimpleMerge ; $merge -> addInNode ( $true ) -> addInNode ( $false ) -> addOutNode ( $workflow -> endNode ); Example: Defining a workflow
    29. ezcWorkflow $merge = new ezcWorkflowNodeSimpleMerge ; $merge -> addInNode ( $true ) -> addInNode ( $false ) -> addOutNode ( $workflow -> endNode ); $storage = new ezcWorkflowDefinitionStorageXml ( '/path/to/xml/files' ); $storage -> save ( $workflow ); Example: Saving a workflow to XML
    30. ezcWorkflow <?xml version = &quot;1.0&quot; encoding = &quot;UTF-8&quot; ?> <workflow name = &quot;Test&quot; version = &quot;1&quot; > <node id = &quot;1&quot; type = &quot;Start&quot; > <outNode id = &quot;2&quot; /> </node> <node id = &quot;2&quot; type = &quot;Input&quot; > <variable name = &quot;choice&quot; > <condition type = &quot;IsBool&quot; /> </variable> <outNode id = &quot;3&quot; /> </node> <node id = &quot;3&quot; type = &quot;ExclusiveChoice&quot; > <condition type = &quot;Variable&quot; name = &quot;choice&quot; > <condition type = &quot;IsTrue&quot; /> <outNode id = &quot;4&quot; /> </condition> <condition type = &quot;Variable&quot; name = &quot;choice&quot; > <condition type = &quot;IsFalse&quot; /> <outNode id = &quot;5&quot; /> </condition> </node> <node id = &quot;4&quot; type = &quot;Action&quot; serviceObjectClass = &quot;PrintTrue&quot; > <outNode id = &quot;6&quot; /> </node> <node id = &quot;5&quot; type = &quot;Action&quot; serviceObjectClass = &quot;PrintFalse&quot; > <outNode id = &quot;6&quot; /> </node> <node id = &quot;6&quot; type = &quot;SimpleMerge&quot; > <outNode id = &quot;7&quot; /> </node> <node id = &quot;7&quot; type = &quot;End&quot; /> </workflow> Example: Saving a workflow to XML
    31. ezcWorkflow $merge = new ezcWorkflowNodeSimpleMerge ; $merge -> addInNode ( $true ) -> addInNode ( $false ) -> addOutNode ( $workflow -> endNode ); $storage = new ezcWorkflowDatabaseDefinitionStorage ( ezcDbFactory :: create ( $dsn ) ); $storage -> save ( $workflow ); Example: Saving a workflow to a database
    32. ezcWorkflow $execution = new ezcWorkflowDatabaseExecution ( $db ); $execution -> setWorkflow ( $workflow ); $executionId = $execution -> start (); // ... $execution -> resume ( $executionId , array( 'choice' => true ) ); Example: Executing a workflow
    33. ezcWorkflow $execution = new ezcWorkflowTestExecution ; $execution -> setWorkflow ( $workflow ); $execution -> setInputVariable ( 'choice' , true ); $execution -> start (); Example: Testing a workflow
    34. ezcWorkflow
      • OXID eSales GmbH has adopted ezcWorkflow
        • Thomas Nunninger (of OXID eSales GmbH) has developed a persistence backend for Zend_Db
      • Dave Heath has developed a persistence backend for Doctrine
      Early Adopters
    35. The End
      • Thank you for your interest!
      • These slides will be available shortly on http://sebastian-bergmann.de/talks/.
    36. Bibliography
      • Sebastian Bergmann. Design and Implementation of a Workflow Engine. Diploma Thesis to obtain the degree of Diplom-Informatiker (Univ.) from the Institute of Computer Science of the University of Bonn, Germany, February 2007.
    37. Bibliography
      • Rob Allen. Workflow: An Introduction . In: Workflow Handbook, Workflow Management Coalition, 2001.
      • Dimitrios Georgakopoulos and Mark F. Hornick and Amit P. Sheth. An Overview of Workflow Management: From Process Modeling to Workflow Automation Infrastructure . In: Distributed and Parallel Databases, Volume 3, Number 2, Pages 119-153, 1995.
    38. License
      • This presentation material is published under the Attribution-Share Alike 3.0 Unported license.
      • You are free:
          • to Share – to copy, distribute and transmit the work.
          • to Remix – to adapt the work.
      • Under the following conditions:
          • Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
          • Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.
      • For any reuse or distribution, you must make clear to others the license terms of this work.
      • Any of the above conditions can be waived if you get permission from the copyright holder.
      • Nothing in this license impairs or restricts the author's moral rights.

    + Sebastian BergmannSebastian Bergmann, 2 years ago

    custom

    2776 views, 4 favs, 8 embeds more stats

    Workflow Management (WfM) is becoming more and more more

    More info about this document

    CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

    Go to text version

    • Total Views 2776
      • 2318 on SlideShare
      • 458 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 0
    Most viewed embeds
    • 428 views on http://sebastian-bergmann.de
    • 12 views on http://www.planetezpublish.org
    • 8 views on http://www.planet-php.net
    • 5 views on http://planetezpublish.org
    • 2 views on http://64.233.161.132

    more

    All embeds
    • 428 views on http://sebastian-bergmann.de
    • 12 views on http://www.planetezpublish.org
    • 8 views on http://www.planet-php.net
    • 5 views on http://planetezpublish.org
    • 2 views on http://64.233.161.132
    • 1 views on http://static.slideshare.net
    • 1 views on http://66.249.89.132
    • 1 views on http://64.233.163.132

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories