📄 book_openwfe.txt
字号:
OpenWFEOpen source WorkFlow EngineJohn Mettraux _________________________________________________________ Table of Contents 1. Introduction What is OpenWFE ? System requirements 2. Installation about the README files Installing a Java Development Kit Downloading an OpenWFE release Unpacking the release and setting the environment Content of OpenWFE's releases Engine Worklist Webclient Apre Droflo 3. Running OpenWFE Start scripts troubleshooting Starting the engine and the other components First web login 4. Configuration An overview OpenWFE's architecture Services and applications The participant map Listeners and dispatchers Worklist user management Roles, participants and users Launch permissions Query stores Modifying etc/worklist/passwd.xml directly SqlPasswdCodec User management web interface Putting a relational database behind OpenWFE XlobEpressionStore XlobWorkItemStore The relational database 'swis', the SqlWorkItemStore SqlPasswdCodec Implementing and using a data source Dispatchers and listeners Dispatching over a socket Dispatching over a smtp Securing the dispatch How should the workitem get encoded OpenWFE as a service OpenWFE as a linux service OpenWFE as a windows service 5. An example : a ticket system 6. Workflow definitions How does the workflow engine works ? Workflow definitions Expressions Workitems Expressing a business process The 'participant' expression set if case equals not and or greater-than lesser-than when sleep save and restore inc unset undefined defined subprocess log using variables with the dollar notation using constants with the dollar notation functions Implementing your own expressions Validation of an XML workflow definition 7. Workflow Patterns Pattern 1 (Sequence) Pattern 2 (Parallel Split) Pattern 3 (Synchronization) Synchronization through correlation Pattern 4 (Exclusive choice) Pattern 5 (Simple merge) Pattern 6 (Multi-choice) Pattern 7 (Synchronizing Merge) Pattern 8 (Multiple Merge) Pattern 9 (Discriminator) Pattern 9a (N out of M join) Pattern 10 (Arbitrary Cycles) Pattern 11 (Implicit Termination) Pattern 12 (Multiple Instances without Synchronization) Pattern 13 (Multiple Instances with Design Time Knowledge) Pattern 14 (Multiple Instances with Run Time Knowledge) Iterator Pattern 15 (Multiple Instances without Run Time Knowledge) Pattern 16 (Deferred Choice) Pattern 17 (Interleaved Parallel Routing) Pattern 18 (Milestone) Pattern 19 (Cancel Activity) Pattern 20 (Cancel Case) 8. Command line tools wfcmd.sh control.sh 9. The APRE and the Automatic Participants The Apre The Pyya Apre The Agents Agent's result 10. Invoking web services from OpenWFE The 'WsInvoker' dispatcher class The ws-param-map.xml file 11. Embedding OpenWFE The embedded engine Using the FsPersistedEngine Using the DbPersistedEngine Embedded worklists Using the the InMemoryWorklist 12. Business Activity Monitoring TextHistory SqlHistory The Status service Auditing modifications on workitems 13. The RMI WorkSession An example Playing with a WorkItem An easier way of handling workitem attributes : owfe2java() and back Storing beans in a workitem 14. OpenWFE's application framework The configuration file Looking up services Sub-contexts (referring to other config files) The passwd.xml file The policy files Writing your own service A simple example 15. Pyya The Pyya Worksession The Pyya Apre An example python agent : the 'to-pdf-agent' 16. openwfe-dotnet Establishing a WorkSession 17. The "Mail Form" system A flow with a 'mail form' Emitting 'mail forms' Listening for 'mail forms' 18. OpenWFE tips and tricks Lauching a flow with netcat List of Figures 4.1. a etc/worklist/query-map.xml example 4.2. OpenWFE Debian start scriptChapter 1. Introduction Table of Contents What is OpenWFE ? System requirementsWhat is OpenWFE ? OpenWFE is an Open source WorkFlow Engine. OpenWFE is also a complete workflow management system. It features four components. The engine of course, a worklist handler, an apre (Automatic Participant Runtime Environment) and a web interface. The web interface as released is just a 'proof of concept'. OpenWFE is currently released only in its full suite. The 4 components are packaged to interact with each other. A fifth component was added : 'Droflo', a web interface for modelling business processes. If you want to learn more about OpenWFE's architecture, you should take a look at its website (http://www.openwfe.org).System requirements OpenWFE requires a system with a Java Development Kit (JDK) of version 1.4.0 or younger. A Java Runtime Environment (JRE) of version 1.4.0 or younger is ok if you won't use the webapplication. The webapplication requires a JDK because it contains the javac compiler that is necessary in order to compile JSP (java server pages) into servlets.Chapter 2. Installation Table of Contents about the README files Installing a Java Development Kit Downloading an OpenWFE release Unpacking the release and setting the environment Content of OpenWFE's releases Engine Worklist Webclient Apre Drofloabout the README files The best and the most up to date information about installing and running an OpenWFE suite can be found in the README.windows.txt or README.linux.txt found in your OpenWFE binary package. These readme do not provide information about configuring an OpenWFE system, they just help you in your first step : setting up and running a default OpenWFE suite.Installing a Java Development Kit Before installing, you should make sure your system has a properly installed java virtual machine. Make sure to install a JDK and not a JRE (a Java Runtime Environment). If you intend to run the full OpenWFE suite, you should have a JDK (Java Dev Kit) and not only a JRE (Java Runtime Environment). The web interface needs the java compiler in order to turn jsp pages into servlet bytecode. You should have at least a Java 1.4.0 virtual machine. Earlier versions won't work. On the windows platform, you should use at least the 1.4.1 JDK. You can find a JDK at http://java.sun.comDownloading an OpenWFE release Having checked this, you can go and download OpenWFE : http://sourceforge.net/project/showfiles.php?group_id=54621 Download for example openwfe-1.5.1.tgz Always make sure to download the latest version. Some versions are pre-releases they introduce bug fixes or new feature, seeing OpenWFE gently evolving into an even better solution. You have the opportunity to download a source release. It includes the source code that got compiled into fellow releases.Unpacking the release and setting the environment Once you have this package, go in your home directory or create a directory for it. Remember that the package will contain a first level of directory. Unpack the file and then go into what you've just unpacked. On GNU/Linux, make sure that all the .sh files present are executable (chmod a+x *.sh). You then have to indicate to the OpenWFE where your Java Development Kit is located. You do this by editing the openwfe-x.x.x/base.sh file. It sets three For example, if you have your JDK in /usr/local/j2sdk145, make sure that base.sh contains :JAVA_HOME=/usr/local/j2sdk145 Or, you can comment (#) this line of definition if your command line environment already holds a value for JAVA_HOME. You can check this by typingecho $JAVA_HOME If a valid path is returned, you can comment the JAVA_HOME definition in base.sh (or set it to the echoed value). On a windows system, you should use the commandecho %JAVA_HOME% to determine if your environment is correct. This environment variable can be set in the 'user profile' of your system. There is for the moment (OpenWFE 1.3.2) no equivalent of base.sh for the Windows platform.Content of OpenWFE's releasesEngine The heart of the system, it's our workflow execution environment.Worklist The worklist is a set of stores for workitems. Workitems are emitted by the engine upon encountering a ParticipantExpression. A worklist stores workitems and let participants retrieve and use them. Since 0.6.2, a new kind of store appeared. It is generally used as the unique store of a worklist, and queries are defined for each users trying to access it.Webclient Also called the webappserver. The webclient is in fact a web application devised to interact with the worklist. It embeds Jetty (http://jetty.mortbay.com) so that you don't have to care about setting up a servlet/jsp container yourself.Apre The apre is a carrier for agent implemented either in java or in jython. For example there is an agent named 'EmailNotificationAgent' that is implemented in jython and that does what its name stands for. You can find its implementation under apre-scripts/EmailNotificationAgent.py. Flow 1.7 and flow 1.8 make use of such agents.Droflo Droflo is a web based workflow design tool. It means that you
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -