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.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + itc99 itc99 2 years ago
    have you exploited something about repairs in such activity-based workflows? (see presentation in my profile)
Post a comment
Embed Video
Edit your comment Cancel

7 Favorites

A Workflow Engine for PHP 5 - Presentation Transcript

  1. ezcWorkflow A Workflow Engine for PHP 5 Sebastian Bergmann http://sebastian-bergmann.de/
  2. Who I Am
    • Sebastian Bergmann
    • Computer Scientist
    • Involved in the PHP Project since 2000
    • Author, Consultant, Coach, Trainer
    • Developer for eZ Systems AS
  3. Who are you?
    • Your experience with
      • 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)
    • Advanded 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 2nd 2007
    • 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
    • pear channel-discover components.ez.no
    • pear install ezc/ezcomponents
    <?php require 'ezc/Base/base.php' ; function __autoload ( $className ) { ezcBase :: autoload ( $className ); }
  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 Example: Defining a workflow programmatically $workflow = new ezcWorkflow ( 'Test' ); $input = new ezcWorkflowNodeInput ( array( 'choice' => new ezcWorkflowConditionIsBool ) ); $workflow->startNode -> addOutNode ( $input );
  27. ezcWorkflow Example: Defining a workflow programmatically $branch = new ezcWorkflowNodeExclusiveChoice ; $branch -> addInNode ( $input ); $branch -> addConditionalOutNode ( new ezcWorkflowConditionVariable ( 'choice' , new ezcWorkflowConditionIsTrue ), new ezcWorkflowNodeAction ( 'PrintTrue' ) ); // ...
  28. ezcWorkflow Example: Defining a workflow programmatically $merge = new ezcWorkflowNodeSimpleMerge ; $merge -> addInNode ( $true ) -> addInNode ( $false ) -> addOutNode ( $workflow -> endNode );
  29. ezcWorkflow Example: Saving a workflow definition to XML $merge = new ezcWorkflowNodeSimpleMerge ; $merge -> addInNode ( $true ) -> addInNode ( $false ) -> addOutNode ( $workflow -> endNode ); $storage = new ezcWorkflowDefinitionStorageXml ( '/path/to/xml/files' ); $storage -> save ( $workflow );
  30. ezcWorkflow Example: Saving a workflow definition to XML <?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>
  31. ezcWorkflow Example: Saving a workflow definition to a database $merge = new ezcWorkflowNodeSimpleMerge ; $merge -> addInNode ( $true ) -> addInNode ( $false ) -> addOutNode ( $workflow -> endNode ); $storage = new ezcWorkflowDatabaseDefinitionStorage ( ezcDbFactory :: create ( $dsn ) ); $storage -> save ( $workflow );
  32. ezcWorkflow Example: Executing a workflow $execution = new ezcWorkflowDatabaseExecution ( $db ); $execution -> setWorkflow ( $workflow ); $executionId = $execution -> start (); // ... $execution -> resume ( $executionId , array( 'choice' => true ) );
  33. ezcWorkflow Example: Testing a workflow $execution = new ezcWorkflowTestExecution ; $execution -> setWorkflow ( $workflow ); $execution -> setInputVariable ( 'choice' , true ); $execution -> start ();
  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
      • He is also working on an AJAXy workflow editor
    Early Adopters
  35. The End
    • Thank you for your interest!
    • These slides will be available shortly on http://sebastian-bergmann.de/talks/
  36. License
    • This presentation material is published under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported license.
    • You are free:
      • to Share – to copy, distribute and transmit 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).
      • Noncommercial. You may not use this work for commercial purposes.
      • No Derivative Works. You may not alter, transform, or build upon this work.
    • For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
    • 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

7105 views, 7 favs, 21 embeds more stats

Workflow Management (WfM) is becoming more and more more

More Info

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Go to text version
  • Total Views 7105
    • 5054 on SlideShare
    • 2051 from embeds
  • Comments 1
  • Favorites 7
  • Downloads 0
Most viewed embeds
  • 1902 views on http://sebastian-bergmann.de
  • 52 views on http://www.nexen.net
  • 41 views on http://www.planet-php.net
  • 12 views on http://www.phpeye.com
  • 9 views on http://www.planet-php.org

more

All embeds
  • 1902 views on http://sebastian-bergmann.de
  • 52 views on http://www.nexen.net
  • 41 views on http://www.planet-php.net
  • 12 views on http://www.phpeye.com
  • 9 views on http://www.planet-php.org
  • 9 views on http://kaloyan.info
  • 4 views on http://planet-php.org
  • 3 views on http://www.netvibes.com
  • 3 views on http://static.slideshare.net
  • 3 views on http://phpeye.com
  • 2 views on http://64.233.161.132
  • 2 views on http://209.85.135.104
  • 1 views on http://203.208.39.99
  • 1 views on http://74.125.67.132
  • 1 views on http://s3.amazonaws.com
  • 1 views on http://66.102.9.104
  • 1 views on http://lj-toys.com
  • 1 views on http://newsalloy.com
  • 1 views on http://www.techtakeaway.com
  • 1 views on https://pim.bluemaex.de
  • 1 views on http://72.14.235.104

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

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

Cancel

Categories